Add IMMUNE_RANGED_ATTACKS

This makes them immune to archery/throwing

This also needs more work as comments state, but good enough for now
This commit is contained in:
Michael Cook (mackal)
2018-01-18 18:30:29 -05:00
parent e7ce79261d
commit b82100bcd7
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -3363,6 +3363,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
damage = DMG_INVULNERABLE;
}
// this should actually happen MUCH sooner, need to investigate though -- good enough for now
if ((skill_used == EQEmu::skills::SkillArchery || skill_used == EQEmu::skills::SkillThrowing) && GetSpecialAbility(IMMUNE_RANGED_ATTACKS)) {
Log(Logs::Detail, Logs::Combat, "Avoiding %d damage due to IMMUNE_RANGED_ATTACKS.", damage);
damage = DMG_INVULNERABLE;
}
if (spell_id != SPELL_UNKNOWN || attacker == nullptr)
avoidable = false;