diff --git a/changelog.txt b/changelog.txt index e3762b3dd..cd25aa82c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/24/2016 == +Kayen: Fix for AE taunt to use correct range and hate modifier. + Fix for spell effect version of taunt to use correct range. + == 03/05/2016 == mackal: Implement extra bind points (secondary recall) For SE_Gate, base2 is which bind to use (starting at 1) diff --git a/zone/effects.cpp b/zone/effects.cpp index 05f6cd927..52b148fc9 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -712,10 +712,10 @@ void Client::SendDisciplineTimer(uint32 timer_id, uint32 duration) } } -void EntityList::AETaunt(Client* taunter, float range) +void EntityList::AETaunt(Client* taunter, float range, int32 bonus_hate) { if (range == 0) - range = 100; //arbitrary default... + range = 40; //Live AE taunt range - Hardcoded. range = range * range; @@ -729,7 +729,7 @@ void EntityList::AETaunt(Client* taunter, float range) && taunter->IsAttackAllowed(them) && DistanceSquaredNoZ(taunter->GetPosition(), them->GetPosition()) <= range) { if (taunter->CheckLosFN(them)) { - taunter->Taunt(them, true); + taunter->Taunt(them, true,0,true,bonus_hate); } } ++it; diff --git a/zone/entity.h b/zone/entity.h index 0b9521179..df0b327a5 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -323,7 +323,7 @@ public: void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true); void AEAttack(Mob *attacker, float dist, int Hand = MainPrimary, int count = 0, bool IsFromSpell = false); - void AETaunt(Client *caster, float range = 0); + void AETaunt(Client *caster, float range=0, int32 bonus_hate=0); void AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true, int16 resist_adjust = 0); void MassGroupBuff(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true); void AEBardPulse(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true); diff --git a/zone/mob.h b/zone/mob.h index 11c11573f..c4a75b5aa 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -799,7 +799,7 @@ public: void StartEnrage(); void ProcessEnrage(); bool IsEnraged(); - void Taunt(NPC* who, bool always_succeed, float chance_bonus = 0); + void Taunt(NPC* who, bool always_succeed, float chance_bonus=0, bool FromSpell=false, int32 bonus_hate=0); virtual void AI_Init(); virtual void AI_Start(uint32 iMoveDelay = 0); diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 6c6177d29..27a72f62c 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -2103,7 +2103,7 @@ void Client::DoClassAttacks(Mob *ca_target, uint16 skill, bool IsRiposte) } } -void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) { +void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus, bool FromSpell, int32 bonus_hate) { if (who == nullptr) return; @@ -2111,7 +2111,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) { if(DivineAura()) return; - if(!CombatRange(who)) + if(!FromSpell && !CombatRange(who)) return; if(!always_succeed && IsClient()) @@ -2167,7 +2167,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) { if (tauntchance > zone->random.Real(0, 1)) { if (hate_top && hate_top != this){ - newhate = (who->GetNPCHate(hate_top) - who->GetNPCHate(this)) + 1; + newhate = (who->GetNPCHate(hate_top) - who->GetNPCHate(this)) + 1 + bonus_hate; who->CastToNPC()->AddToHateList(this, newhate); Success = true; } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index ca10259a1..ecf2bb7ba 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2230,17 +2230,18 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove break; } - case SE_AETaunt://Dook- slapped it in the spell effect so client does the animations - { // and incase there are similar spells we havent found yet + case SE_AETaunt: + { #ifdef SPELL_EFFECT_SPAM snprintf(effect_desc, _EDLEN, "AE Taunt"); #endif if(caster && caster->IsClient()){ - float range = 0.0f; - if (spells[spell_id].base2[i]) - range = (float)spells[spell_id].base[i]; + //Live AE Taunt range is hardcoded at 40 (Spells for AE taunt all use zero range) Target type should be self only. + float range = 40; + if (spells[spell_id].max[i])//custom support if you want to alter range of AE Taunt. + range = spells[spell_id].max[i]; - entity_list.AETaunt(caster->CastToClient(), range); + entity_list.AETaunt(caster->CastToClient(), range, spells[spell_id].base[i]); } break; } @@ -2650,10 +2651,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove case SE_Taunt: { if (IsNPC()){ - caster->Taunt(this->CastToNPC(), false, static_cast(spell.base[i])); - - if (spell.base2[i] > 0) - CastToNPC()->SetHateAmountOnEnt(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i])); + caster->Taunt(this->CastToNPC(), false, static_cast(spell.base[i]), true, spell.base2[i]); } break; }