mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
fix(Core/Creature): Creatures will periodically call for assistance. (#5065)
This commit is contained in:
@@ -9902,6 +9902,7 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
|
||||
|
||||
creature->SendAIReaction(AI_REACTION_HOSTILE);
|
||||
creature->CallAssistance();
|
||||
creature->SetAssistanceTimer(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD));
|
||||
}
|
||||
|
||||
// delay offhand weapon attack to next attack time
|
||||
@@ -13058,6 +13059,8 @@ void Unit::ClearInCombat()
|
||||
if (HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED))
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, creature->GetCreatureTemplate()->dynamicflags);
|
||||
|
||||
creature->SetAssistanceTimer(0);
|
||||
|
||||
// Xinef: will be recalculated at follow movement generator initialization
|
||||
if (!IsPet() && !IsCharmed())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user