diff --git a/src/TrialOfStrength.cpp b/src/TrialOfStrength.cpp index 203b561..7784e68 100644 --- a/src/TrialOfStrength.cpp +++ b/src/TrialOfStrength.cpp @@ -168,6 +168,11 @@ void ToSWorldScript::OnAfterConfigLoad(bool reload) sToSMapMgr->CurseTemplates.clear(); } + if (!sConfigMgr->GetOption("TrialOfStrength.Enable", false)) + { + return; + } + LoadWaveTemplates(); LoadEnemyGroups(); LoadRewardTemplates(); diff --git a/src/scripts/AI/ToSAIMeleeTrapper.h b/src/scripts/AI/ToSAIMeleeTrapper.h index c92442c..bd68a59 100644 --- a/src/scripts/AI/ToSAIMeleeTrapper.h +++ b/src/scripts/AI/ToSAIMeleeTrapper.h @@ -19,7 +19,7 @@ class ToSAIMeleeTrapper : public CreatureScript { TOS_EVENT_COMBATANT_SPELL_ID_NET = 50762, // Net - TOS_EVENT_COMBATANT_SPELL_RANDOM = 1, + TOS_EVENT_COMBATANT_SPELL_NET = 1, }; EventMap events; @@ -33,7 +33,7 @@ class ToSAIMeleeTrapper : public CreatureScript { events.Reset(); - events.ScheduleEvent(TOS_EVENT_COMBATANT_SPELL_RANDOM, 3s); + events.ScheduleEvent(TOS_EVENT_COMBATANT_SPELL_NET, 3s); } void UpdateAI(uint32 diff) override @@ -45,15 +45,15 @@ class ToSAIMeleeTrapper : public CreatureScript switch (events.ExecuteEvent()) { - case TOS_EVENT_COMBATANT_SPELL_RANDOM: - RandomAttack(); + case TOS_EVENT_COMBATANT_SPELL_NET: + TrapTarget(); break; } DoMeleeAttackIfReady(); } - void RandomAttack() + void TrapTarget() { auto creature = me->GetVictim(); if (!creature) @@ -63,7 +63,7 @@ class ToSAIMeleeTrapper : public CreatureScript me->CastSpell(creature, TOS_EVENT_COMBATANT_SPELL_ID_NET); - events.ScheduleEvent(TOS_EVENT_COMBATANT_SPELL_RANDOM, 15s); + events.ScheduleEvent(TOS_EVENT_COMBATANT_SPELL_NET, 15s); } }; };