mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Add 4 new special attacks to Perl/Lua.
- IMMUNE_DAMAGE_CLIENT (47) Immune to all damage except NPC damage. - IMMUNE_DAMAGE_NPC (48) Immune to all damage except Client damage. - IMMUNE_AGGRO_CLIENT (49) Immune to aggro by a Client. - IMMUNE_AGGRO_NPC (50) Immune to aggro by an NPC, clients must attack directly to gain aggro, allows pet only boss mechanics and stuff.
This commit is contained in:
@@ -468,6 +468,12 @@ bool Mob::IsAttackAllowed(Mob *target, bool isSpellAttack)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target->GetSpecialAbility(IMMUNE_DAMAGE_CLIENT) && IsClient())
|
||||
return false;
|
||||
|
||||
if (target->GetSpecialAbility(IMMUNE_DAMAGE_NPC) && IsNPC())
|
||||
return false;
|
||||
|
||||
// can't damage own pet (applies to everthing)
|
||||
Mob *target_owner = target->GetOwner();
|
||||
Mob *our_owner = GetOwner();
|
||||
|
||||
Reference in New Issue
Block a user