From 01c580224d8f71c801007a4943236c3fc460a020 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Sat, 15 Nov 2014 23:40:13 -0500 Subject: [PATCH] Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range. --- changelog.txt | 3 ++- zone/common.h | 3 ++- zone/hate_list.cpp | 7 +++++++ zone/perl_mob.cpp | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 566cb393b..64dd57286 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- -== 11/15/2014 == +== 11/16/2014 == +Kayen: Implemented NPC Special Ability 41 'Allow To Tank', gives NPC opportunity to take aggro over a client in melee range. Kayen: Updated swarm pet AI to be consistent with live. *OLD AI: Swarm pet would lock on to target until target died, then depop as soon as target died. diff --git a/zone/common.h b/zone/common.h index 64b6e38af..ea299ab11 100644 --- a/zone/common.h +++ b/zone/common.h @@ -133,7 +133,8 @@ enum { ALLOW_BENEFICIAL = 38, DISABLE_MELEE = 39, NPC_CHASE_DISTANCE = 40, - MAX_SPECIAL_ATTACK = 41 + ALLOW_TO_TANK = 41, + MAX_SPECIAL_ATTACK = 42 }; diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 2ee904453..4c4290232 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -403,6 +403,13 @@ Mob *HateList::GetTop(Mob *center) } } + if (!isTopClientType) { + if (top->GetSpecialAbility(ALLOW_TO_TANK)){ + isTopClientType = true; + topClientTypeInRange = top; + } + } + if(!isTopClientType) return topClientTypeInRange ? topClientTypeInRange : nullptr; diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 10e94f47e..17ac9c3ac 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -1571,7 +1571,7 @@ XS(XS_Mob_TypesTempPet) { dXSARGS; if (items < 2 || items > 7) - Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, typesid, name=nullptr, duration=0, follow=0, sticktarg=0, target=nullptr)"); + Perl_croak(aTHX_ "Usage: Mob::TypesTempPet(THIS, typesid, name=nullptr, duration=0, follow=0, target=nullptr, sticktarg=0,)"); { Mob * THIS; uint32 typesid = (uint32)SvUV(ST(1));