diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c91c49e4f..ba575de79 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20480,4 +20480,5 @@ void Player::SendDuelCountdown(uint32 counter) { WorldPacket data(SMSG_DUEL_COUNTDOWN, 4); data << uint32(counter); // seconds - GetSession()->SendPacket(&data); \ No newline at end of file + GetSession()->SendPacket(&data); +} diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp index b847dc8da..d9f422e2e 100644 --- a/src/game/Totem.cpp +++ b/src/game/Totem.cpp @@ -85,8 +85,8 @@ void Totem::UnSummon() { CombatStop(); RemoveAurasDueToSpell(GetSpell()); - Unit *owner = GetOwner(); - if (owner) + + if (Unit *owner = GetOwner()) { // clear owner's totem slot for(int i = 0; i < MAX_TOTEM; ++i) @@ -106,8 +106,7 @@ void Totem::UnSummon() ((Player*)owner)->SendAutoRepeatCancel(this); // Not only the player can summon the totem (scripted AI) - Group *pGroup = ((Player*)owner)->GetGroup(); - if (pGroup) + if (Group *pGroup = ((Player*)owner)->GetGroup()) { for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) {