Core/GameObjects: add script hook when destructable building is damaged.
This commit is contained in:
@@ -1710,7 +1710,7 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
||||
if (Battleground* bg = pwho->GetBattleground())
|
||||
bg->DestroyGate(pwho, this, m_goInfo->building.destroyedEvent);
|
||||
hitType = BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED;
|
||||
sScriptMgr->OnGameObjectDestroyed(pwho, this, m_goInfo->building.destroyedEvent);
|
||||
sScriptMgr->OnGameObjectDestroyed(this, pwho, m_goInfo->building.destroyedEvent);
|
||||
}
|
||||
if (pwho)
|
||||
if (Battleground* bg = pwho->GetBattleground())
|
||||
@@ -1732,6 +1732,7 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.damagedDisplayId);
|
||||
EventInform(m_goInfo->building.damagedEvent);
|
||||
sScriptMgr->OnGameObjectDamaged(this, pwho, m_goInfo->building.damagedEvent);
|
||||
hitType = BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED;
|
||||
}
|
||||
if (pwho)
|
||||
|
||||
Reference in New Issue
Block a user