aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorShauren <none@none>2010-09-02 22:04:08 +0200
committerShauren <none@none>2010-09-02 22:04:08 +0200
commite25846a08ee15a9bc4c1e55d58c3c64f240ea21c (patch)
tree18b89c49a0830e6b420b04d0b8355905b8f7ee62 /src/server/game/Spells/SpellEffects.cpp
parent1198591bacb3a80bbe0f57c8fc7d8b883b1a5ecd (diff)
Core/Spells: Fixed crash in EffectFeedPet
Closes issue #3728. Closes issue #3752. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 3b177cfc57f..fc847e77874 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -5794,12 +5794,12 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
if (benefit <= 0)
return;
+ ExecuteLogEffectDestroyItem(effIndex, foodItem->GetEntry());
+
uint32 count = 1;
- _player->DestroyItemCount(foodItem,count,true);
+ _player->DestroyItemCount(foodItem, count, true);
// TODO: fix crash when a spell has two effects, both pointed at the same item target
- ExecuteLogEffectDestroyItem(effIndex, foodItem->GetEntry());
-
m_caster->CastCustomSpell(pet, m_spellInfo->EffectTriggerSpell[effIndex], &benefit, NULL, NULL, true);
}