Fix for CastSpell if the spellID is invalid thus not having a name

This commit is contained in:
Natedog2012 authored and Michael Cook (mackal) committed 2015-01-24 14:08:56 -05:00
1 parent 26018ec898
commit 069572fe15
1 file changed
+1 -1
+1 -1
View File
@@ -148,7 +148,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
uint32 timer, uint32 timer_duration, uint32 type, int16 *resist_adjust)
{
Log.Out(Logs::Detail, Logs::Spells, "CastSpell called for spell %s (%d) on entity %d, slot %d, time %d, mana %d, from item slot %d",
spells[spell_id].name, spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
(IsValidSpell(spell_id))?spells[spell_id].name:"UNKNOWN SPELL", spell_id, target_id, slot, cast_time, mana_cost, (item_slot==0xFFFFFFFF)?999:item_slot);
if(casting_spell_id == spell_id)
ZeroCastingVars();