mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Feature] Add Immune to Headshot Special Ability (#3624)
# Notes - Allows mobs normally susceptible to Headshot to be made immune to it.
This commit is contained in:
parent
f5e4c6a127
commit
16ab1839e8
@ -208,6 +208,7 @@ enum {
|
||||
IMMUNE_FADING_MEMORIES = 52,
|
||||
IMMUNE_OPEN = 53,
|
||||
IMMUNE_ASSASSINATE = 54,
|
||||
IMMUNE_HEADSHOT = 55,
|
||||
MAX_SPECIAL_ATTACK
|
||||
};
|
||||
|
||||
|
||||
@ -3758,7 +3758,8 @@ luabind::scope lua_register_special_abilities() {
|
||||
luabind::value("immune_aggro_npc", static_cast<int>(IMMUNE_AGGRO_NPC)),
|
||||
luabind::value("modify_avoid_damage", static_cast<int>(MODIFY_AVOID_DAMAGE)),
|
||||
luabind::value("immune_open", static_cast<int>(IMMUNE_OPEN)),
|
||||
luabind::value("immune_assassinate", static_cast<int>(IMMUNE_ASSASSINATE))
|
||||
luabind::value("immune_assassinate", static_cast<int>(IMMUNE_ASSASSINATE)),
|
||||
luabind::value("immune_headshot", static_cast<int>(IMMUNE_HEADSHOT))
|
||||
)];
|
||||
}
|
||||
|
||||
|
||||
@ -2301,7 +2301,8 @@ int Mob::TryHeadShot(Mob *defender, EQ::skills::SkillType skillInUse)
|
||||
!defender->IsClient() &&
|
||||
skillInUse == EQ::skills::SkillArchery &&
|
||||
GetTarget() == defender &&
|
||||
(defender->GetBodyType() == BT_Humanoid || !RuleB(Combat, HeadshotOnlyHumanoids))
|
||||
(defender->GetBodyType() == BT_Humanoid || !RuleB(Combat, HeadshotOnlyHumanoids)) &&
|
||||
!defender->GetSpecialAbility(IMMUNE_HEADSHOT)
|
||||
) {
|
||||
uint32 HeadShot_Dmg = aabonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG] + spellbonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG] + itembonuses.HeadShot[SBIndex::FINISHING_EFFECT_DMG];
|
||||
uint8 HeadShot_Level = 0; // Get Highest Headshot Level
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user