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

@@ -143,7 +143,7 @@ public:
if (me->isAttackReady())
me->SetFacingToObject(me->GetVictim());
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

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

View File

@@ -81,7 +81,7 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -206,7 +206,7 @@ public:
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
{
ClearGossipMenuFor(player);
switch(uiAction)
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
CloseGossipMenuFor(player);

View File

@@ -151,7 +151,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
switch(type)
switch (type)
{
case DATA_BRONJAHM:
m_auiEncounter[type] = data;
@@ -180,22 +180,22 @@ public:
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
{
switch(criteria_id)
switch (criteria_id)
{
case 12752: // Soul Power
if( Creature* c = instance->GetCreature(NPC_BronjahmGUID) )
if (Creature* c = instance->GetCreature(NPC_BronjahmGUID))
{
std::list<Creature*> L;
uint8 count = 0;
c->GetCreaturesWithEntryInRange(L, 200.0f, 36535); // find all Corrupted Soul Fragment (36535)
for( std::list<Creature*>::const_iterator itr = L.begin(); itr != L.end(); ++itr )
if( (*itr)->IsAlive() )
if ((*itr)->IsAlive())
++count;
return (count >= 4);
}
break;
case 12976:
if( Creature* c = instance->GetCreature(NPC_DevourerGUID) )
if (Creature* c = instance->GetCreature(NPC_DevourerGUID))
return (bool)c->AI()->GetData(1);
break;
}

View File

@@ -245,7 +245,7 @@ public:
void DoAction(int32 actionId) override
{
switch(actionId)
switch (actionId)
{
case ACTION_START_INTRO:
events.ScheduleEvent(EVENT_START_INTRO, 0ms);
@@ -1767,7 +1767,7 @@ public:
if (me->IsNonMeleeSpellCast(false, true, true))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case EVENT_LK_CHECK_COMBAT:
if (me->isActiveObject()) // during fight
@@ -1953,7 +1953,7 @@ public:
void DoAction(int32 actionId) override
{
switch(actionId)
switch (actionId)
{
case ACTION_START_INTRO:
events.ScheduleEvent(EVENT_LK_SAY_AGGRO, 0ms);
@@ -2001,7 +2001,7 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case EVENT_LK_SAY_AGGRO:
if (Creature* lkboss = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_LICH_KING_BOSS)))

View File

@@ -228,7 +228,7 @@ public:
}
}
switch(creature->GetEntry())
switch (creature->GetEntry())
{
case NPC_SYLVANAS_PART1:
creature->SetVisible(false);
@@ -372,7 +372,7 @@ public:
void OnGameObjectCreate(GameObject* go) override
{
switch(go->GetEntry())
switch (go->GetEntry())
{
case GO_FROSTMOURNE:
GO_FrostmourneGUID = go->GetGUID();
@@ -408,7 +408,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
switch(type)
switch (type)
{
case DATA_INTRO:
EncounterMask |= (1 << DATA_INTRO);
@@ -597,7 +597,7 @@ public:
if (EncounterMask & (1 << DATA_BATTERED_HILT))
return;
switch(data)
switch (data)
{
case 1: // talked to leader
EncounterMask |= (1 << DATA_BATTERED_HILT);
@@ -667,7 +667,7 @@ public:
uint32 GetData(uint32 type) const override
{
switch(type)
switch (type)
{
case DATA_INTRO:
case DATA_FALRIC:
@@ -687,7 +687,7 @@ public:
ObjectGuid GetGuidData(uint32 type) const override
{
switch(type)
switch (type)
{
case NPC_DARK_RANGER_LORALEN:
return NPC_GuardGUID;

View File

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

View File

@@ -175,7 +175,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -212,7 +212,7 @@ public:
break;
case EVENT_SPECIAL:
switch(urand(0, 2))
switch (urand(0, 2))
{
case 0: // Pursuit
if (Creature* k = GetKrick())
@@ -305,7 +305,7 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;

View File

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

View File

@@ -261,7 +261,7 @@ public:
void SetData(uint32 type, uint32 data) override
{
switch(type)
switch (type)
{
case DATA_INSTANCE_PROGRESS:
if (InstanceProgress < data)
@@ -306,7 +306,7 @@ public:
void SetGuidData(uint32 type, ObjectGuid data) override
{
switch(type)
switch (type)
{
case DATA_NECROLYTE_1_GUID:
NPC_Necrolyte1GUID = data;
@@ -374,7 +374,7 @@ public:
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/) override
{
switch(criteria_id)
switch (criteria_id)
{
case 12993: // Doesn't Go to Eleven (4524)
return bAchievEleven;

View File

@@ -73,7 +73,7 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -469,7 +469,7 @@ public:
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -521,7 +521,7 @@ public:
{
if (type != POINT_MOTION_TYPE)
return;
switch(id)
switch (id)
{
case 1:
events.RescheduleEvent(id, 0ms);
@@ -532,7 +532,7 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -1013,7 +1013,7 @@ public:
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;
@@ -1198,7 +1198,7 @@ public:
if (type != WAYPOINT_MOTION_TYPE)
return;
switch(id)
switch (id)
{
case 0:
Talk(me->GetEntry() == NPC_JAINA_PART2 ? SAY_JAINA_OUTRO_2 : SAY_SYLVANAS_OUTRO_2);
@@ -1221,7 +1221,7 @@ public:
{
events.Update(diff);
switch(events.ExecuteEvent())
switch (events.ExecuteEvent())
{
case 0:
break;