Invisible/Hide mechanics when cast on

Updated mechanics to be consistent with live regarding how invisible breaks when the client is the target of a spell.
Invisible will drop whenever a client is hit with a detrimental spell, regardless of if resisted, if it does damage or AOE.
Hide skill now also follows the same rules as above.
Implemented support for Rogue AA - Nerves of Steel which gives a chance for hide NOT to break
when client is hit with an AOE spell.
This commit is contained in:
KayenEQ
2015-10-10 15:16:49 -04:00
parent aae073f588
commit 261b6a4623
11 changed files with 102 additions and 8 deletions
+3 -3
View File
@@ -805,7 +805,7 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
}
CheckIncreaseSkill(SkillArchery, GetTarget(), -15);
CommonBreakInvisible();
CommonBreakInvisibleFromCombat();
}
void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const ItemInst* Ammo, uint16 weapon_damage, int16 chance_mod, int16 focus, int ReuseTime,
@@ -1237,7 +1237,7 @@ void NPC::RangedAttack(Mob* other)
DoRangedAttackDmg(other);
CommonBreakInvisible();
CommonBreakInvisibleFromCombat();
}
}
@@ -1433,7 +1433,7 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
//consume ammo
DeleteItemInInventory(ammo_slot, 1, true);
CheckIncreaseSkill(SkillThrowing, GetTarget());
CommonBreakInvisible();
CommonBreakInvisibleFromCombat();
}
void Mob::DoThrowingAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Item_Struct* AmmoItem, uint16 weapon_damage, int16 chance_mod,int16 focus, int ReuseTime, uint32 range_id, int AmmoSlot, float speed)