Core/Spells: Fixed crash in EffectFeedPet

Closes issue #3728.
Closes issue #3752.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-09-02 22:04:08 +02:00
parent 1198591bac
commit e25846a08e
+4 -4
View File
@@ -5794,12 +5794,12 @@ void Spell::EffectFeedPet(SpellEffIndex effIndex)
if (benefit <= 0)
return;
uint32 count = 1;
_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());
uint32 count = 1;
_player->DestroyItemCount(foodItem, count, true);
// TODO: fix crash when a spell has two effects, both pointed at the same item target
m_caster->CastCustomSpell(pet, m_spellInfo->EffectTriggerSpell[effIndex], &benefit, NULL, NULL, true);
}