Core/Creatures: Implemented serverside checks for UNIT_FLAG2_INTERACT_WHILE_HOSTILE and UNIT_FLAG3_ALLOW_INTERACTION_WHILE_IN_COMBAT

* Also stop sending npc flags for hostile creatures
Port From (https://github.com/TrinityCore/TrinityCore/commit/c2e36dea6c6af6139bf60454e9299447ec7d9897)
This commit is contained in:
hondacrx
2024-03-05 18:16:38 -05:00
parent 0325d8b523
commit e646b8008d
8 changed files with 125 additions and 39 deletions
+5
View File
@@ -98,7 +98,12 @@ namespace Game
if (staticFlags.HasFlag(CreatureStaticFlags3.CannotTurn))
unitFlags2 |= (uint)UnitFlags2.CannotTurn;
if (staticFlags.HasFlag(CreatureStaticFlags5.InteractWhileHostile))
unitFlags2 |= (uint)UnitFlags2.InteractWhileHostile;
unitFlags3 = data != null && data.unit_flags3.HasValue ? data.unit_flags3.Value : cInfo.UnitFlags3;
if (staticFlags.HasFlag(CreatureStaticFlags3.AllowInteractionWhileInCombat))
unitFlags3 |= (uint)UnitFlags3.AllowInteractionWhileInCombat;
}
public static ResponseCodes CheckPlayerName(string name, Locale locale, bool create = false)