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

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;

View File

@ -194,7 +194,8 @@ enum {
CASTING_RESIST_DIFF = 43,
COUNTER_AVOID_DAMAGE = 44,
PROX_AGGRO = 45,
MAX_SPECIAL_ATTACK = 46
IMMUNE_RANGED_ATTACKS = 46,
MAX_SPECIAL_ATTACK = 47
};
typedef enum { //fear states