aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 4daa17fa0be..47036aa38c5 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1147,10 +1147,10 @@ void GameObject::Use(Unit* user)
break;
}
- if (BattleGround* bg = player->GetBattleGround())
- {
- bg->EventPlayerUsedGO(player, this);
- }
+ if (BattleGround* bg = player->GetBattleGround())
+ {
+ bg->EventPlayerUsedGO(player, this);
+ }
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
}
@@ -1593,12 +1593,12 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.destroyedDisplayId);
EventInform(m_goInfo->building.destroyedEvent);
- if(pwho)
- {
- if(BattleGround* bg = pwho->GetBattleGround())
- bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
- }
- }
+ if(pwho)
+ {
+ if(BattleGround* bg = pwho->GetBattleGround())
+ bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
+ }
+ }
}
else // from intact to damaged
{