mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
[Cleanup] Cleanup Special Ability Code (#4365)
* [Cleanup] Cleanup Special Ability-based Code * Update emu_constants.cpp * Update emu_constants.cpp * Update emu_constants.cpp * Update special_ability.cpp * Cleanup * Update emu_constants.cpp
This commit is contained in:
+11
-11
@@ -1544,7 +1544,7 @@ void EntityList::RemoveFromTargetsFadingMemories(Mob *spell_target, bool RemoveF
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mob->GetSpecialAbility(IMMUNE_FADING_MEMORIES)) {
|
||||
if (mob->GetSpecialAbility(SpecialAbility::MemoryFadeImmunity)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -3638,7 +3638,7 @@ void EntityList::ClearFeignAggro(Mob *targ)
|
||||
while (it != npc_list.end()) {
|
||||
// add Feign Memory check because sometimes weird stuff happens
|
||||
if (it->second->CheckAggro(targ) || (targ->IsClient() && it->second->IsOnFeignMemory(targ))) {
|
||||
if (it->second->GetSpecialAbility(IMMUNE_FEIGN_DEATH)) {
|
||||
if (it->second->GetSpecialAbility(SpecialAbility::FeignDeathImmunity)) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
@@ -3667,7 +3667,7 @@ void EntityList::ClearFeignAggro(Mob *targ)
|
||||
|
||||
it->second->RemoveFromHateList(targ);
|
||||
|
||||
if (it->second->GetSpecialAbility(SPECATK_RAMPAGE)) {
|
||||
if (it->second->GetSpecialAbility(SpecialAbility::Rampage)) {
|
||||
it->second->RemoveFromRampageList(targ, true);
|
||||
}
|
||||
|
||||
@@ -4384,10 +4384,10 @@ void EntityList::AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy)
|
||||
if (n && n->GetSwarmInfo()) {
|
||||
if (n->GetSwarmInfo()->owner_id == owner->GetID()) {
|
||||
if (
|
||||
!n->GetSpecialAbility(IMMUNE_AGGRO) &&
|
||||
!(other->IsBot() && n->GetSpecialAbility(IMMUNE_AGGRO_BOT)) &&
|
||||
!(other->IsClient() && n->GetSpecialAbility(IMMUNE_AGGRO_CLIENT)) &&
|
||||
!(other->IsNPC() && n->GetSpecialAbility(IMMUNE_AGGRO_NPC))
|
||||
!n->GetSpecialAbility(SpecialAbility::AggroImmunity) &&
|
||||
!(other->IsBot() && n->GetSpecialAbility(SpecialAbility::BotAggroImmunity)) &&
|
||||
!(other->IsClient() && n->GetSpecialAbility(SpecialAbility::ClientAggroImmunity)) &&
|
||||
!(other->IsNPC() && n->GetSpecialAbility(SpecialAbility::NPCAggroImmunity))
|
||||
) {
|
||||
n->hate_list.AddEntToHateList(other, 0, 0, bFrenzy);
|
||||
}
|
||||
@@ -4411,10 +4411,10 @@ void EntityList::AddTempPetsToHateListOnOwnerDamage(Mob *owner, Mob* attacker, i
|
||||
attacker &&
|
||||
attacker != n &&
|
||||
!n->IsEngaged() &&
|
||||
!n->GetSpecialAbility(IMMUNE_AGGRO) &&
|
||||
!(attacker->IsBot() && n->GetSpecialAbility(IMMUNE_AGGRO_BOT)) &&
|
||||
!(attacker->IsClient() && n->GetSpecialAbility(IMMUNE_AGGRO_CLIENT)) &&
|
||||
!(attacker->IsNPC() && n->GetSpecialAbility(IMMUNE_AGGRO_NPC)) &&
|
||||
!n->GetSpecialAbility(SpecialAbility::AggroImmunity) &&
|
||||
!(attacker->IsBot() && n->GetSpecialAbility(SpecialAbility::BotAggroImmunity)) &&
|
||||
!(attacker->IsClient() && n->GetSpecialAbility(SpecialAbility::ClientAggroImmunity)) &&
|
||||
!(attacker->IsNPC() && n->GetSpecialAbility(SpecialAbility::NPCAggroImmunity)) &&
|
||||
!attacker->IsTrap() &&
|
||||
!attacker->IsCorpse()
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user