mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[11032] Implement CREATURE_FLAG_EXTRA_AGGRO_ZONE.
This let control zone wide aggro in DB data instead need special script code. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
3bb16cacdb
commit
54cb8f1a63
5 changed files with 21 additions and 6 deletions
|
|
@ -7711,11 +7711,17 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
|||
if (getStandState() == UNIT_STAND_STATE_CUSTOM)
|
||||
SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
if (((Creature*)this)->AI())
|
||||
((Creature*)this)->AI()->EnterCombat(enemy);
|
||||
Creature* pCreature = (Creature*)this;
|
||||
|
||||
if (pCreature->AI())
|
||||
pCreature->AI()->EnterCombat(enemy);
|
||||
|
||||
// Some bosses are set into combat with zone
|
||||
if (GetMap()->IsDungeon() && (pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_AGGRO_ZONE))
|
||||
pCreature->SetInCombatWithZone();
|
||||
|
||||
if (InstanceData* mapInstance = GetInstanceData())
|
||||
mapInstance->OnCreatureEnterCombat((Creature*)this);
|
||||
mapInstance->OnCreatureEnterCombat(pCreature);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue