Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int32 Mob::GetExtraSpellAmt(uint16 spell_id, int32 extra_spell_amt, int32 base_spell_dmg)
- {
- int total_cast_time = 0;
- if (spells[spell_id].recast_time >= spells[spell_id].recovery_time)
- total_cast_time = spells[spell_id].recast_time + spells[spell_id].cast_time;
- else
- total_cast_time = spells[spell_id].recovery_time + spells[spell_id].cast_time;
- if (total_cast_time > 0 && total_cast_time <= 2500)
- extra_spell_amt = extra_spell_amt*(25/100.0f);
- else if (total_cast_time > 2500 && total_cast_time < 7000)
- extra_spell_amt = extra_spell_amt*(0.167*((total_cast_time - 1000)/1000.0f));
- else
- extra_spell_amt = extra_spell_amt * (total_cast_time / 7000.0f);
- if(extra_spell_amt*2 < base_spell_dmg)
- return 0;
- return extra_spell_amt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement