aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRat <gmstreetrat@gmail.com>2015-04-06 19:50:21 +0200
committerRat <gmstreetrat@gmail.com>2015-04-06 19:50:21 +0200
commit11f6b9af0bb59458721abc8486757ce5e1e4b6b0 (patch)
treef9ed31834522853395db6490c811a00cb229141e
parente248d5a4062a83e1016bcd646073992f20fac291 (diff)
Core/Spells: small cleanup in EffectDestroyItem
-rw-r--r--src/server/game/Spells/SpellEffects.cpp10
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);
}