diff options
author | Rat <gmstreetrat@gmail.com> | 2015-04-06 19:50:21 +0200 |
---|---|---|
committer | Rat <gmstreetrat@gmail.com> | 2015-04-06 19:50:21 +0200 |
commit | 11f6b9af0bb59458721abc8486757ce5e1e4b6b0 (patch) | |
tree | f9ed31834522853395db6490c811a00cb229141e /src | |
parent | e248d5a4062a83e1016bcd646073992f20fac291 (diff) |
Core/Spells: small cleanup in EffectDestroyItem
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 6063a97d2ca..3106ac4bc5a 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5796,10 +5796,8 @@ void Spell::EffectDestroyItem(SpellEffIndex effIndex) return; Player* player = unitTarget->ToPlayer(); - if (SpellEffectInfo const* effect = GetEffect(effIndex)) - { - uint32 itemId = effect->ItemType; - if (Item* item = player->GetItemByEntry(itemId)) - player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); - } + SpellEffectInfo const* effect = GetEffect(effIndex); + uint32 itemId = effect->ItemType; + if (Item* item = player->GetItemByEntry(itemId)) + player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true); } |