mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Rules] Add Frontal Stun Immunity Rules. (#2217)
* [Rules] Add Frontal Stun Immunity Rules. - Add Combat:FrontalStunImmunityClasses rule for determining Frontal Stun Immunity by class bitmasks - Add Combat:FrontalStunImmunityRaces rule for determining Frontal Stun Immunity by race bitmasks - Add Combat:NPCsUseFrontalStunImmunityClasses rule for determining if NPCs use Frontal Stun Immunity by class bitmasks - Add Combat:NPCsUseFrontalStunImmunityRaces rule for determining if NPCs uses Frontal Stun Immunity by race bitmasks - Cleanup GetDefaultGender() as best as possible with the globalload I have. - Combat:NPCsUseFrontalStunImmunityRaces defaults to true as NPCs currently use Frontal Stun Immunity. - Added **all** Ogre races to the check for Frontal Stun Immunity. * Remove other Ogre races.
This commit is contained in:
+51
-3
@@ -3832,11 +3832,59 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
can_stun = true;
|
||||
}
|
||||
|
||||
if ((GetBaseRace() == OGRE || GetBaseRace() == OGGOK_CITIZEN) &&
|
||||
!attacker->BehindMob(this, attacker->GetX(), attacker->GetY()))
|
||||
bool is_immune_to_frontal_stun = false;
|
||||
|
||||
if (IsBot() || IsClient() || IsMerc()) {
|
||||
if (
|
||||
IsPlayerClass(GetClass()) &&
|
||||
RuleI(Combat, FrontalStunImmunityClasses) & GetPlayerClassBit(GetClass())
|
||||
) {
|
||||
is_immune_to_frontal_stun = true;
|
||||
}
|
||||
|
||||
|
||||
if (
|
||||
(
|
||||
IsPlayerRace(GetBaseRace()) &&
|
||||
RuleI(Combat, FrontalStunImmunityRaces) & GetPlayerRaceBit(GetBaseRace())
|
||||
) ||
|
||||
GetBaseRace() == RACE_OGGOK_CITIZEN_93
|
||||
) {
|
||||
is_immune_to_frontal_stun = true;
|
||||
}
|
||||
} else if (IsNPC()) {
|
||||
if (
|
||||
RuleB(Combat, NPCsUseFrontalStunImmunityClasses) &&
|
||||
IsPlayerClass(GetClass()) &&
|
||||
RuleI(Combat, FrontalStunImmunityClasses) & GetPlayerClassBit(GetClass())
|
||||
) {
|
||||
is_immune_to_frontal_stun = true;
|
||||
}
|
||||
|
||||
if (
|
||||
RuleB(Combat, NPCsUseFrontalStunImmunityRaces) &&
|
||||
(
|
||||
(
|
||||
IsPlayerRace(GetBaseRace()) &&
|
||||
RuleI(Combat, FrontalStunImmunityRaces) & GetPlayerRaceBit(GetBaseRace())
|
||||
) ||
|
||||
GetBaseRace() == RACE_OGGOK_CITIZEN_93
|
||||
)
|
||||
) {
|
||||
is_immune_to_frontal_stun = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
is_immune_to_frontal_stun &&
|
||||
!attacker->BehindMob(this, attacker->GetX(), attacker->GetY())
|
||||
) {
|
||||
can_stun = false;
|
||||
if (GetSpecialAbility(UNSTUNABLE))
|
||||
}
|
||||
|
||||
if (GetSpecialAbility(UNSTUNABLE)) {
|
||||
can_stun = false;
|
||||
}
|
||||
}
|
||||
if (can_stun) {
|
||||
int bashsave_roll = zone->random.Int(0, 100);
|
||||
|
||||
Reference in New Issue
Block a user