refactor(Core/ScriptedAI): few improvements with threat methods (#13146)

improve threat scripts

Co-authored-by: Maelthyrr <lynethris@protonmail.ch>
This commit is contained in:
Maelthyr
2022-11-12 13:29:28 +01:00
committed by GitHub
parent 758ed35db3
commit c1c9dc6105
50 changed files with 100 additions and 73 deletions

View File

@@ -496,7 +496,7 @@ public:
{
if (me->GetVictim())
{
DoModifyThreatPercent(me->GetVictim(), -100);
DoModifyThreatByPercent(me->GetVictim(), -100);
}
me->AddThreat(target, 1000000.0f);

View File

@@ -915,7 +915,7 @@ public:
DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
TempThreat = DoGetThreat(target);
if (TempThreat)
DoModifyThreatPercent(target, -100);
DoModifyThreatByPercent(target, -100);
HoodGUID = target->GetGUID();
me->AddThreat(target, 1000000.0f);
ChaseTimer = 20000;
@@ -930,7 +930,7 @@ public:
{
HoodGUID.Clear();
if (DoGetThreat(target))
DoModifyThreatPercent(target, -100);
DoModifyThreatByPercent(target, -100);
me->AddThreat(target, TempThreat);
TempThreat = 0;
}