diff --git a/zone/mob.h b/zone/mob.h index f4b89a754..df64b0566 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -207,7 +207,7 @@ public: virtual bool DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot = 10, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 timer = 0xFFFFFFFF, uint32 timer_duration = 0, uint32 type = 0, int16 resist_adjust = 0); - void CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot, uint16 mana_used, + void CastedSpellFinished(uint16 spell_id, uint32 target_id, uint8 slot, uint16 mana_used, uint32 inventory_slot = 0xFFFFFFFF, int16 resist_adjust = 0); bool SpellFinished(uint16 spell_id, Mob *target, uint16 slot = 10, uint16 mana_used = 0, uint32 inventory_slot = 0xFFFFFFFF, int16 resist_adjust = 0, bool isproc = false); diff --git a/zone/spells.cpp b/zone/spells.cpp index ea6de77f9..09fa0c268 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -113,7 +113,7 @@ void Mob::SpellProcess() { spellend_timer.Disable(); delaytimer = false; - CastedSpellFinished(casting_spell_id, casting_spell_targetid, casting_spell_slot, + CastedSpellFinished(casting_spell_id, casting_spell_targetid, (uint8)casting_spell_slot, casting_spell_mana, casting_spell_inventory_slot, casting_spell_resist_adjust); } @@ -444,7 +444,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot, // cast time is 0, just finish it right now and be done with it if(cast_time == 0) { - CastedSpellFinished(spell_id, target_id, slot, mana_cost, item_slot, resist_adjust); + CastedSpellFinished(spell_id, target_id, (uint8)slot, mana_cost, item_slot, resist_adjust); return(true); } @@ -872,7 +872,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid) // NOTE: do not put range checking, etc into this function. this should // just check timed spell specific things before passing off to SpellFinished // which figures out proper targets etc -void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot, +void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint8 slot, uint16 mana_used, uint32 inventory_slot, int16 resist_adjust) { bool IsFromItem = false; @@ -4390,7 +4390,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use resist_chance = 1; } - float partial_modifier = ((150 * (roll - resist_chance)) / resist_chance); + float partial_modifier = ((150.0f * (roll - resist_chance)) / resist_chance); if(IsNPC()) {