Revert "Core/GameObjects: Fix possible crash in GameObject::SetDestructibleState."
This reverts commit 85c7a916a0.
Ty Shauren.
This commit is contained in:
1 parent
6078eebc45
commit
e67a33eaaa
1 file changed
+2
-4
@@ -1791,12 +1791,10 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
case GO_DESTRUCTIBLE_DAMAGED:
|
||||
{
|
||||
EventInform(m_goInfo->building.damagedEvent);
|
||||
sScriptMgr->OnGameObjectDamaged(this, eventInvoker);
|
||||
if (eventInvoker)
|
||||
{
|
||||
sScriptMgr->OnGameObjectDamaged(this, eventInvoker);
|
||||
if (Battleground* bg = eventInvoker->GetBattleground())
|
||||
bg->EventPlayerDamagedGO(eventInvoker, this, m_goInfo->building.damagedEvent);
|
||||
}
|
||||
|
||||
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
|
||||
@@ -1820,10 +1818,10 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player*
|
||||
}
|
||||
case GO_DESTRUCTIBLE_DESTROYED:
|
||||
{
|
||||
sScriptMgr->OnGameObjectDestroyed(this, eventInvoker);
|
||||
EventInform(m_goInfo->building.destroyedEvent);
|
||||
if (eventInvoker)
|
||||
{
|
||||
sScriptMgr->OnGameObjectDestroyed(this, eventInvoker);
|
||||
if (Battleground* bg = eventInvoker->GetBattleground())
|
||||
{
|
||||
bg->EventPlayerDamagedGO(eventInvoker, this, m_goInfo->building.destroyedEvent);
|
||||
|
||||
Reference in new issue
Block a user