From 738fa380471eda76788aafc4aa958dada53ddee4 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 13 Nov 2014 02:46:22 -0500 Subject: [PATCH] Implemented target type (50) which excludes players pets from target AE's. --- common/spdat.h | 3 +++ zone/effects.cpp | 2 ++ zone/spells.cpp | 1 + 3 files changed, 6 insertions(+) diff --git a/common/spdat.h b/common/spdat.h index 83af3cd73..b71b3c2ad 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -135,6 +135,9 @@ typedef enum { /* 45 */ ST_Ring = 0x2d, /* 46 */ ST_TargetsTarget = 0x2e, // uses the target of your target /* 47 */ ST_PetMaster = 0x2f, // uses the master as target +/* 48 */ // UNKNOWN +/* 49 */ // NOT USED +/* 50 */ ST_TargetAENoPlayersPets = 0x32, } SpellTargetType; typedef enum { diff --git a/zone/effects.cpp b/zone/effects.cpp index 02060c10b..9888258d9 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -764,6 +764,8 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_ continue; if (curmob == caster && !affect_caster) //watch for caster too continue; + if (spells[spell_id].targettype == ST_TargetAENoPlayersPets && curmob->IsPetOwnerClient()) + continue; if (spells[spell_id].targettype == ST_Ring) { dist_targ = curmob->DistNoRoot(caster->GetTargetRingX(), caster->GetTargetRingY(), caster->GetTargetRingZ()); diff --git a/zone/spells.cpp b/zone/spells.cpp index e5178faa3..e6cab8422 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1614,6 +1614,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce case ST_UndeadAE: //should only affect undead... case ST_TargetAETap: case ST_AETarget: + case ST_TargetAENoPlayersPets: { if(!spell_target) {