diff --git a/zone/attack.cpp b/zone/attack.cpp index f9edb46ac..ce96675a0 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -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; diff --git a/zone/common.h b/zone/common.h index f7b157115..df6b22637 100644 --- a/zone/common.h +++ b/zone/common.h @@ -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