aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2019-06-17 13:06:24 -0300
committerShauren <shauren.trinity@gmail.com>2021-12-11 14:56:14 +0100
commitb3493935b6684b74b14ea9a6aa9d7145303ec4c5 (patch)
treedaaea8b2b83aae105771b2e23f42a2ef18c786fb /src
parent253527a6dc9cee6dfdebf2f5a4a9d46d2d852088 (diff)
Core/Scripts: Fixed a reference error introduced in 394b119664bc16dc5376f1404925b6d0b5a26876
(cherry picked from commit 70cbedd75dff077fa75e25c4c467f0efd4bb6252)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
index ff9e0c624ca..dd94a92ac6f 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.cpp
@@ -1891,7 +1891,7 @@ std::vector<uint32> DarkFallensEmotes =
struct npc_icc_orb_controller : public ScriptedAI
{
- npc_icc_orb_controller(Creature* creature) : ScriptedAI(creature), _isInCombat(false) { }
+ npc_icc_orb_controller(Creature* creature) : ScriptedAI(creature), _isInCombat(false), _isLongRepeat(false) { }
void Reset() override
{
@@ -1910,14 +1910,14 @@ struct npc_icc_orb_controller : public ScriptedAI
if (creatures.empty())
return;
- bool isLongRepeat = false;
- _scheduler.Schedule(1s, [this, &isLongRepeat](TaskContext visual)
+ _isLongRepeat = false;
+ _scheduler.Schedule(1s, [this](TaskContext visual)
{
ObjectGuid guid = Trinity::Containers::SelectRandomContainerElement(_minionGuids);
if (Unit* minion = ObjectAccessor::GetUnit(*me, guid))
minion->CastSpell(nullptr, SPELL_BLOOD_ORB_VISUAL);
- visual.Repeat(isLongRepeat ? 21s : 3s);
- isLongRepeat = !isLongRepeat;
+ visual.Repeat(_isLongRepeat ? 21s : 3s);
+ _isLongRepeat = !_isLongRepeat;
});
}
@@ -1966,6 +1966,7 @@ private:
TaskScheduler _scheduler;
GuidVector _minionGuids;
bool _isInCombat;
+ bool _isLongRepeat;
};
struct DarkFallenAI : public ScriptedAI