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:
@@ -5472,7 +5472,10 @@ namespace Game.Entities
|
||||
return null;
|
||||
|
||||
// not unfriendly/hostile
|
||||
if (!creature.HasUnitFlag2(UnitFlags2.InteractWhileHostile) && creature.GetReactionTo(this) <= ReputationRank.Unfriendly)
|
||||
if (!creature.IsInteractionAllowedWhileHostile() && creature.GetReactionTo(this) <= ReputationRank.Unfriendly)
|
||||
return nullptr;
|
||||
|
||||
if (creature.IsInCombat() && !creature.IsInteractionAllowedInCombat())
|
||||
return null;
|
||||
|
||||
// not too far, taken from CGGameUI::SetInteractTarget
|
||||
|
||||
Reference in New Issue
Block a user