Added lower bounds for chance of charm fading.

Parsed on live to be approximately no lower
than 5% regardless of level difference.
This commit is contained in:
KayenEQ
2014-03-02 19:44:42 -05:00
parent c02ba17845
commit 84c85a4605
3 changed files with 15 additions and 8 deletions
+5 -1
View File
@@ -4048,7 +4048,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
// pvp_resist_base
// pvp_resist_calc
// pvp_resist_cap
float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool CharismaCheck)
float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use_resist_override, int resist_override, bool CharismaCheck, bool CharmTick)
{
if(!caster)
@@ -4277,6 +4277,10 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use
resist_chance = spells[spell_id].MinResist;
}
//Charm can not have less than 5% chance to fail.
if (CharmTick && (resist_chance < 10))
resist_chance = 10;
//Finally our roll
int roll = MakeRandomInt(0, 200);
if(roll > resist_chance)