mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Fix for AE taunt to use correct range and hate modifier.
Fix for spell effect version of taunt to use correct range.
This commit is contained in:
parent
8cbcd48461
commit
fc5d6bd792
@ -1,5 +1,9 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
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 ==
|
== 03/05/2016 ==
|
||||||
mackal: Implement extra bind points (secondary recall)
|
mackal: Implement extra bind points (secondary recall)
|
||||||
For SE_Gate, base2 is which bind to use (starting at 1)
|
For SE_Gate, base2 is which bind to use (starting at 1)
|
||||||
|
|||||||
@ -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)
|
if (range == 0)
|
||||||
range = 100; //arbitrary default...
|
range = 40; //Live AE taunt range - Hardcoded.
|
||||||
|
|
||||||
range = range * range;
|
range = range * range;
|
||||||
|
|
||||||
@ -729,7 +729,7 @@ void EntityList::AETaunt(Client* taunter, float range)
|
|||||||
&& taunter->IsAttackAllowed(them)
|
&& taunter->IsAttackAllowed(them)
|
||||||
&& DistanceSquaredNoZ(taunter->GetPosition(), them->GetPosition()) <= range) {
|
&& DistanceSquaredNoZ(taunter->GetPosition(), them->GetPosition()) <= range) {
|
||||||
if (taunter->CheckLosFN(them)) {
|
if (taunter->CheckLosFN(them)) {
|
||||||
taunter->Taunt(them, true);
|
taunter->Taunt(them, true,0,true,bonus_hate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
|
|||||||
@ -323,7 +323,7 @@ public:
|
|||||||
void QueueManaged(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true);
|
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 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 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 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);
|
void AEBardPulse(Mob *caster, Mob *center, uint16 spell_id, bool affect_caster = true);
|
||||||
|
|||||||
@ -799,7 +799,7 @@ public:
|
|||||||
void StartEnrage();
|
void StartEnrage();
|
||||||
void ProcessEnrage();
|
void ProcessEnrage();
|
||||||
bool IsEnraged();
|
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_Init();
|
||||||
virtual void AI_Start(uint32 iMoveDelay = 0);
|
virtual void AI_Start(uint32 iMoveDelay = 0);
|
||||||
|
|||||||
@ -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)
|
if (who == nullptr)
|
||||||
return;
|
return;
|
||||||
@ -2111,7 +2111,7 @@ void Mob::Taunt(NPC* who, bool always_succeed, float chance_bonus) {
|
|||||||
if(DivineAura())
|
if(DivineAura())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!CombatRange(who))
|
if(!FromSpell && !CombatRange(who))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!always_succeed && IsClient())
|
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 (tauntchance > zone->random.Real(0, 1)) {
|
||||||
if (hate_top && hate_top != this){
|
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);
|
who->CastToNPC()->AddToHateList(this, newhate);
|
||||||
Success = true;
|
Success = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2230,17 +2230,18 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SE_AETaunt://Dook- slapped it in the spell effect so client does the animations
|
case SE_AETaunt:
|
||||||
{ // and incase there are similar spells we havent found yet
|
{
|
||||||
#ifdef SPELL_EFFECT_SPAM
|
#ifdef SPELL_EFFECT_SPAM
|
||||||
snprintf(effect_desc, _EDLEN, "AE Taunt");
|
snprintf(effect_desc, _EDLEN, "AE Taunt");
|
||||||
#endif
|
#endif
|
||||||
if(caster && caster->IsClient()){
|
if(caster && caster->IsClient()){
|
||||||
float range = 0.0f;
|
//Live AE Taunt range is hardcoded at 40 (Spells for AE taunt all use zero range) Target type should be self only.
|
||||||
if (spells[spell_id].base2[i])
|
float range = 40;
|
||||||
range = (float)spells[spell_id].base[i];
|
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;
|
break;
|
||||||
}
|
}
|
||||||
@ -2650,10 +2651,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
case SE_Taunt:
|
case SE_Taunt:
|
||||||
{
|
{
|
||||||
if (IsNPC()){
|
if (IsNPC()){
|
||||||
caster->Taunt(this->CastToNPC(), false, static_cast<float>(spell.base[i]));
|
caster->Taunt(this->CastToNPC(), false, static_cast<float>(spell.base[i]), true, spell.base2[i]);
|
||||||
|
|
||||||
if (spell.base2[i] > 0)
|
|
||||||
CastToNPC()->SetHateAmountOnEnt(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i]));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user