From e25846a08ee15a9bc4c1e55d58c3c64f240ea21c Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 2 Sep 2010 22:04:08 +0200 Subject: Core/Spells: Fixed crash in EffectFeedPet Closes issue #3728. Closes issue #3752. --HG-- branch : trunk --- src/server/game/Spells/SpellEffects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3