From 2d6c012e1d320d65906aca73c9eb278158720894 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Fri, 8 Dec 2023 00:10:51 +0100 Subject: [PATCH] fix(Scripts/SSC): codestyle fix in SSC after recent PR (#17952) initial --- .../SerpentShrine/instance_serpent_shrine.cpp | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index 085db54fb..31b8e007d 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -64,7 +64,7 @@ public: LoadObjectData(creatureData, nullptr); LoadMinionData(minionData); - AliveKeepersCount = 0; + _aliveKeepersCount = 0; } bool SetBossState(uint32 type, EncounterState state) override @@ -74,7 +74,7 @@ public: if (type == DATA_LADY_VASHJ) for (uint8 i = 0; i < 4; ++i) - if (GameObject* gobject = instance->GetGameObject(ShieldGeneratorGUID[i])) + if (GameObject* gobject = instance->GetGameObject(_shieldGeneratorGUID[i])) gobject->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE); return true; @@ -88,7 +88,7 @@ public: case GO_SHIELD_GENERATOR2: case GO_SHIELD_GENERATOR3: case GO_SHIELD_GENERATOR4: - ShieldGeneratorGUID[go->GetEntry() - GO_SHIELD_GENERATOR1] = go->GetGUID(); + _shieldGeneratorGUID[go->GetEntry() - GO_SHIELD_GENERATOR1] = go->GetGUID(); break; } @@ -102,7 +102,7 @@ public: case NPC_COILFANG_SHATTERER: case NPC_COILFANG_PRIESTESS: if (creature->GetPositionX() > 190.0f) - --AliveKeepersCount; + --_aliveKeepersCount; break; case NPC_CYCLONE_KARATHRESS: creature->GetMotionMaster()->MoveRandom(50.0f); @@ -125,17 +125,15 @@ public: switch (type) { case DATA_PLATFORM_KEEPER_RESPAWNED: - ++AliveKeepersCount; - if (AliveKeepersCount > MAX_KEEPER_COUNT) + if (_aliveKeepersCount < MAX_KEEPER_COUNT) { - AliveKeepersCount = MAX_KEEPER_COUNT; + ++_aliveKeepersCount; } break; case DATA_PLATFORM_KEEPER_DIED: - --AliveKeepersCount; - if (AliveKeepersCount < MIN_KEEPER_COUNT) + if (_aliveKeepersCount > MIN_KEEPER_COUNT) { - AliveKeepersCount = MIN_KEEPER_COUNT; + --_aliveKeepersCount; } break; case DATA_BRIDGE_ACTIVATED: @@ -145,7 +143,7 @@ public: case DATA_ACTIVATE_SHIELD: if (Creature* vashj = GetCreature(DATA_LADY_VASHJ)) { - for (auto const& shieldGuid : ShieldGeneratorGUID) + for (auto const& shieldGuid : _shieldGeneratorGUID) { if (GameObject* gobject = instance->GetGameObject(shieldGuid)) { @@ -161,14 +159,14 @@ public: uint32 GetData(uint32 type) const override { if (type == DATA_ALIVE_KEEPERS) - return AliveKeepersCount; + return _aliveKeepersCount; return 0; } private: - ObjectGuid ShieldGeneratorGUID[4]; - int32 AliveKeepersCount; + ObjectGuid _shieldGeneratorGUID[4]; + int32 _aliveKeepersCount; }; InstanceScript* GetInstanceScript(InstanceMap* map) const override