chore(Core/Misc): Some cleanup (#19970)

* remove weird blanks

* update if

* ) ) to ))

* missed some ) )

* now switch

* .
This commit is contained in:
Kitzunu
2024-09-21 19:34:31 +02:00
committed by GitHub
parent 0ba59c0053
commit 386aea03ee
157 changed files with 1606 additions and 1616 deletions

View File

@@ -99,7 +99,7 @@ public:
{
if (!target || !spell)
return;
switch(spell->Id)
switch (spell->Id)
{
case SPELL_ARCANE_VACUUM:
target->NearTeleportTo(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f, target->GetOrientation());
@@ -117,7 +117,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -116,7 +116,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -280,7 +280,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -110,7 +110,7 @@ public:
if (!me->IsAlive())
return;
switch(param)
switch (param)
{
case ACTION_WATER_ELEMENT_HIT:
if (pInstance)

View File

@@ -88,7 +88,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -91,7 +91,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -104,7 +104,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -103,7 +103,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

@@ -107,7 +107,7 @@ public:
void OnCreatureCreate(Creature* creature) override
{
switch(creature->GetEntry())
switch (creature->GetEntry())
{
case NPC_SINCLARI:
NPC_SinclariGUID = creature->GetGUID();
@@ -162,7 +162,7 @@ public:
void OnGameObjectCreate(GameObject* go) override
{
switch(go->GetEntry())
switch (go->GetEntry())
{
case GO_ACTIVATION_CRYSTAL:
HandleGameObject(ObjectGuid::Empty, false, go); // make go not used yet
@@ -202,7 +202,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
switch(type)
switch (type)
{
case DATA_ACTIVATE_DEFENSE_SYSTEM:
{
@@ -277,7 +277,7 @@ public:
void SetGuidData(uint32 type, ObjectGuid data) override
{
switch(type)
switch (type)
{
case DATA_ADD_TRASH_MOB:
trashMobs.insert(data);
@@ -291,7 +291,7 @@ public:
uint32 GetData(uint32 type) const override
{
switch(type)
switch (type)
{
case DATA_ENCOUNTER_STATUS:
return (uint32)EncounterStatus;
@@ -333,7 +333,7 @@ public:
{
Creature* pBoss = nullptr;
switch(uiBoss)
switch (uiBoss)
{
case BOSS_MORAGG:
HandleGameObject(GO_MoraggCellGUID, true);
@@ -403,13 +403,13 @@ public:
void Update(uint32 diff) override
{
events.Update(diff);
switch( events.ExecuteEvent() )
switch (events.ExecuteEvent())
{
case 0:
break;
case EVENT_CHECK_PLAYERS:
{
if( DoNeedCleanup(false) )
if (DoNeedCleanup(false))
InstanceCleanup();
events.Repeat(5s);
}
@@ -522,7 +522,7 @@ public:
void OnPlayerEnter(Player* plr) override
{
if( DoNeedCleanup(plr->IsAlive()) )
if (DoNeedCleanup(plr->IsAlive()))
InstanceCleanup();
if (EncounterStatus == IN_PROGRESS)
@@ -542,19 +542,19 @@ public:
uint8 aliveCount = 0;
Map::PlayerList const& pl = instance->GetPlayers();
for( Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr )
if( Player* plr = itr->GetSource() )
if( plr->IsAlive() && !plr->IsGameMaster() && !plr->HasAura(27827)/*spirit of redemption aura*/ )
if (Player* plr = itr->GetSource())
if (plr->IsAlive() && !plr->IsGameMaster() && !plr->HasAura(27827)/*spirit of redemption aura*/ )
++aliveCount;
bool need = enter ? aliveCount <= 1 : aliveCount == 0;
if( !need && CLEANED )
if (!need && CLEANED)
CLEANED = false;
return need;
}
void InstanceCleanup()
{
if( CLEANED )
if (CLEANED)
return;
CLEANED = true;
@@ -638,7 +638,7 @@ public:
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
{
switch(criteria_id)
switch (criteria_id)
{
case CRITERIA_DEFENSELESS:
return GateHealth == 100 && !bDefensesUsed;

View File

@@ -91,7 +91,7 @@ public:
{
ClearGossipMenuFor(player);
switch(uiAction)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
CloseGossipMenuFor(player);
@@ -172,7 +172,7 @@ public:
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -325,7 +325,7 @@ struct violet_hold_trashAI : public npc_escortAI
if (!bAddedWP)
{
bAddedWP = true;
switch(PLoc)
switch (PLoc)
{
case 0:
for(int i = 0; i < 6; i++)
@@ -1040,30 +1040,30 @@ public:
if (!pInstance)
return;
switch(uiBoss)
switch (uiBoss)
{
case 1:
if(uiWPointId == 2)
if (uiWPointId == 2)
FinishPointReached();
break;
case 2:
if(uiWPointId == 2)
if (uiWPointId == 2)
FinishPointReached();
break;
case 3:
if(uiWPointId == 1)
if (uiWPointId == 1)
FinishPointReached();
break;
case 4:
if(uiWPointId == 0)
if (uiWPointId == 0)
FinishPointReached();
break;
case 5:
if(uiWPointId == 0)
if (uiWPointId == 0)
FinishPointReached();
break;
case 6:
if(uiWPointId == 4)
if (uiWPointId == 4)
FinishPointReached();
break;
}
@@ -1073,10 +1073,10 @@ public:
{
npc_escortAI::UpdateAI(diff);
if(!bAddedWPs)
if (!bAddedWPs)
{
bAddedWPs = true;
switch(uiBoss)
switch (uiBoss)
{
case 1:
for(int i = 0; i < 3; i++)