From 2a48b199d2901aacf68dbaed4441609432e8c37b Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Wed, 25 Jun 2014 15:25:22 -0400 Subject: [PATCH] Update SE_Taunt - Limit value if present will now add instant hate. --- changelog.txt | 2 ++ zone/spell_effects.cpp | 25 ++++++++++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index 9b890da6a..5a77ec900 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) == 06/25/2014 == Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. Kayen: Updated SE_FadingMemories - Base value will be properly utilized to set % chance for fade effect to work. +Kayen: Implemented SE_StrikeThough (Was incorrectly defined as implemented previously) - Works same as item bonus. +Kayen: Update SE_Taunt - Limit value if present will now add instant hate. == 06/17/2014 == Kayen: Implemented SE_AStacker, SE_BStacker, SE_CStacker, SE_DStacker. diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 5861d31e6..b073b65e2 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2646,9 +2646,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_Taunt: { - if (IsNPC()) + if (IsNPC()){ caster->Taunt(this->CastToNPC(), false, spell.base[i]); - + + if (spell.base2[i] > 0) + CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) + spell.base2[i])); + } break; } @@ -2673,9 +2676,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_AddHatePct: { - if (IsNPC()) - CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) * (100 + spell.base[i]) / 100)); + if (IsNPC()){ + int32 new_hate = CastToNPC()->GetHateAmount(caster) * (100 + spell.base[i]) / 100; + if (new_hate <= 0) + new_hate = 1; + CastToNPC()->SetHate(caster, new_hate); + } break; } @@ -3562,9 +3569,13 @@ void Mob::DoBuffTic(uint16 spell_id, int slot, uint32 ticsremaining, uint8 caste case SE_AddHateOverTimePct: { - if (IsNPC()) - CastToNPC()->SetHate(caster, (CastToNPC()->GetHateAmount(caster) * (100 + spell.base[i]) / 100)); - + if (IsNPC()){ + int32 new_hate = CastToNPC()->GetHateAmount(caster) * (100 + spell.base[i]) / 100; + if (new_hate <= 0) + new_hate = 1; + + CastToNPC()->SetHate(caster, new_hate); + } break; }