mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-17 17:24:33 +00:00
chore(Core/Misc): Some cleanup (#19970)
* remove weird blanks * update if * ) ) to )) * missed some ) ) * now switch * .
This commit is contained in:
@@ -382,7 +382,7 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch(events.ExecuteEvent())
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -799,7 +799,7 @@ public:
|
||||
if (!summon)
|
||||
return;
|
||||
summons.Summon(summon);
|
||||
switch(summon->GetEntry())
|
||||
switch (summon->GetEntry())
|
||||
{
|
||||
case NPC_ARCANE_OVERLOAD:
|
||||
summon->CastSpell(summon, SPELL_ARCANE_OVERLOAD_DMG, true);
|
||||
@@ -989,7 +989,7 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
switch(param)
|
||||
switch (param)
|
||||
{
|
||||
case 1:
|
||||
MoveTimer = 1;
|
||||
@@ -1123,7 +1123,7 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch(events.ExecuteEvent())
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -1183,7 +1183,7 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch(events.ExecuteEvent())
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -1321,12 +1321,12 @@ public:
|
||||
|
||||
void DoAction(int32 param) override
|
||||
{
|
||||
switch(param)
|
||||
switch (param)
|
||||
{
|
||||
case 1: // move to next point
|
||||
if (Vehicle* v = me->GetVehicleKit())
|
||||
if (Unit* pass = v->GetPassenger(0))
|
||||
switch(pass->GetEntry())
|
||||
switch (pass->GetEntry())
|
||||
{
|
||||
case NPC_NEXUS_LORD:
|
||||
{
|
||||
@@ -1357,7 +1357,7 @@ public:
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
switch(events.ExecuteEvent())
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -1397,7 +1397,7 @@ public:
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
events.Update(diff);
|
||||
switch(events.ExecuteEvent())
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch(creature->GetEntry())
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_MALYGOS:
|
||||
NPC_MalygosGUID = creature->GetGUID();
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch(go->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_IRIS_N:
|
||||
case GO_IRIS_H:
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
switch(type)
|
||||
switch (type)
|
||||
{
|
||||
case DATA_IRIS_ACTIVATED:
|
||||
if (EncounterStatus == NOT_STARTED)
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
break;
|
||||
case DATA_ENCOUNTER_STATUS:
|
||||
EncounterStatus = data;
|
||||
switch(data)
|
||||
switch (data)
|
||||
{
|
||||
case NOT_STARTED:
|
||||
bPokeAchiev = false;
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch(type)
|
||||
switch (type)
|
||||
{
|
||||
case DATA_MALYGOS_GUID:
|
||||
return NPC_MalygosGUID;
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
|
||||
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId) override
|
||||
{
|
||||
switch(eventId)
|
||||
switch (eventId)
|
||||
{
|
||||
case 20158:
|
||||
if (GameObject* go = instance->GetGameObject(GO_PlatformGUID))
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* /*target*/, uint32 /*miscvalue1*/) override
|
||||
{
|
||||
switch(criteria_id)
|
||||
switch (criteria_id)
|
||||
{
|
||||
case ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_10:
|
||||
case ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_25:
|
||||
|
||||
@@ -105,9 +105,9 @@ public:
|
||||
{
|
||||
pInstance->SetData(DATA_DRAKOS, DONE);
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( ObjectGuid guid = pInstance->GetGuidData(DATA_DCD_1 + i) )
|
||||
if( GameObject* pGo = ObjectAccessor::GetGameObject(*me, guid) )
|
||||
if( pGo->GetGoState() != GO_STATE_ACTIVE )
|
||||
if (ObjectGuid guid = pInstance->GetGuidData(DATA_DCD_1 + i))
|
||||
if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, guid))
|
||||
if (pGo->GetGoState() != GO_STATE_ACTIVE )
|
||||
{
|
||||
pGo->SetLootState(GO_READY);
|
||||
pGo->UseDoorOrButton(0, false);
|
||||
@@ -125,17 +125,17 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
@@ -206,10 +206,10 @@ public:
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
{
|
||||
if( type != POINT_MOTION_TYPE || id != 1 )
|
||||
if (type != POINT_MOTION_TYPE || id != 1)
|
||||
return;
|
||||
|
||||
if( !located )
|
||||
if (!located)
|
||||
gonext = true;
|
||||
}
|
||||
|
||||
@@ -231,21 +231,21 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( timer == 0 )
|
||||
if (timer == 0)
|
||||
me->CastSpell(me, SPELL_TELEPORT_VISUAL, true);
|
||||
|
||||
timer += diff;
|
||||
|
||||
if( timer > 10000 )
|
||||
if (timer > 10000)
|
||||
{
|
||||
if( !located )
|
||||
if (!located)
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
located = true;
|
||||
me->CastSpell(me, SPELL_UNSTABLE_SPHERE_PULSE, true);
|
||||
timer -= 2000;
|
||||
}
|
||||
|
||||
if( !located && gonext )
|
||||
if (!located && gonext)
|
||||
{
|
||||
PickNewLocation();
|
||||
gonext = false;
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_EREGOS, NOT_STARTED);
|
||||
if( pInstance->GetData(DATA_UROM) != DONE )
|
||||
if (pInstance->GetData(DATA_UROM) != DONE )
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
else
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -110,17 +110,17 @@ public:
|
||||
{
|
||||
pInstance->SetData(DATA_EREGOS, IN_PROGRESS);
|
||||
|
||||
if( me->FindNearestCreature(NPC_AMBER_DRAKE, 750.0f, true) )
|
||||
if (me->FindNearestCreature(NPC_AMBER_DRAKE, 750.0f, true))
|
||||
pInstance->SetData(DATA_AMBER_VOID, 0);
|
||||
else
|
||||
pInstance->SetData(DATA_AMBER_VOID, 1);
|
||||
|
||||
if( me->FindNearestCreature(NPC_EMERALD_DRAKE, 750.0f, true) )
|
||||
if (me->FindNearestCreature(NPC_EMERALD_DRAKE, 750.0f, true))
|
||||
pInstance->SetData(DATA_EMERALD_VOID, 0);
|
||||
else
|
||||
pInstance->SetData(DATA_EMERALD_VOID, 1);
|
||||
|
||||
if( me->FindNearestCreature(NPC_RUBY_DRAKE, 750.0f, true) )
|
||||
if (me->FindNearestCreature(NPC_RUBY_DRAKE, 750.0f, true))
|
||||
pInstance->SetData(DATA_RUBY_VOID, 0);
|
||||
else
|
||||
pInstance->SetData(DATA_RUBY_VOID, 1);
|
||||
@@ -148,10 +148,10 @@ public:
|
||||
|
||||
void DamageTaken(Unit*, uint32& /*damage*/, DamageEffectType, SpellSchoolMask) override
|
||||
{
|
||||
if( !me->GetMap()->IsHeroic() )
|
||||
if (!me->GetMap()->IsHeroic())
|
||||
return;
|
||||
|
||||
if( shiftNumber <= uint32(1) && uint32(me->GetHealth() * 100 / me->GetMaxHealth()) <= uint32(60 - shiftNumber * 40) )
|
||||
if (shiftNumber <= uint32(1) && uint32(me->GetHealth() * 100 / me->GetMaxHealth()) <= uint32(60 - shiftNumber * 40))
|
||||
{
|
||||
++shiftNumber;
|
||||
events.RescheduleEvent(EVENT_SPELL_PLANAR_SHIFT, 0ms);
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* pSummon) override
|
||||
{
|
||||
if( pSummon->GetEntry() != NPC_LEY_GUARDIAN_WHELP )
|
||||
if (pSummon->GetEntry() != NPC_LEY_GUARDIAN_WHELP )
|
||||
return;
|
||||
|
||||
DoZoneInCombat(pSummon, 300.0f);
|
||||
@@ -175,25 +175,25 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if( me->HasAura(SPELL_PLANAR_SHIFT) || me->HasAura(SPELL_DRAKE_STOP_TIME) )
|
||||
if (me->HasAura(SPELL_PLANAR_SHIFT) || me->HasAura(SPELL_DRAKE_STOP_TIME))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_SPELL_ARCANE_BARRAGE:
|
||||
if( Unit* v = me->GetVictim() )
|
||||
if (Unit* v = me->GetVictim())
|
||||
me->CastSpell(v, SPELL_ARCANE_BARRAGE, false);
|
||||
events.Repeat(2500ms);
|
||||
break;
|
||||
@@ -224,8 +224,8 @@ public:
|
||||
Talk(SAY_SHIELD);
|
||||
me->CastSpell(me, SPELL_PLANAR_SHIFT, false);
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
if( Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 300.0f, false) )
|
||||
if( Creature* pa = me->SummonCreature(NPC_PLANAR_ANOMALY, *me, TEMPSUMMON_TIMED_DESPAWN, 17000) )
|
||||
if (Unit* t = SelectTarget(SelectTargetMethod::Random, 0, 300.0f, false))
|
||||
if (Creature* pa = me->SummonCreature(NPC_PLANAR_ANOMALY, *me, TEMPSUMMON_TIMED_DESPAWN, 17000))
|
||||
{
|
||||
pa->SetCanFly(true);
|
||||
pa->SetDisableGravity(true);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
pa->CastSpell(pa, SPELL_PLANAR_AURA_DAMAGE, true);
|
||||
if (Aura* a = pa->GetAura(SPELL_PLANAR_AURA_DAMAGE))
|
||||
a->SetDuration(15000);
|
||||
if( pa->AI() )
|
||||
if (pa->AI())
|
||||
{
|
||||
pa->AI()->AttackStart(t);
|
||||
pa->GetMotionMaster()->MoveChase(t, 0.01f);
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_UROM, NOT_STARTED);
|
||||
if( pInstance->GetData(DATA_VAROS) != DONE )
|
||||
if (pInstance->GetData(DATA_VAROS) != DONE )
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
else
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -143,20 +143,20 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if( lock )
|
||||
if (lock)
|
||||
return;
|
||||
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
if( phase == 3 )
|
||||
if (phase == 3)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if( pInstance )
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_UROM, IN_PROGRESS);
|
||||
|
||||
me->SetInCombatWithZone();
|
||||
me->SetHomePosition(cords[0][0], cords[0][1], cords[0][2], cords[0][3]);
|
||||
if( me->FindCurrentSpellBySpellId(SPELL_EVOCATION) )
|
||||
if (me->FindCurrentSpellBySpellId(SPELL_EVOCATION))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
events.RescheduleEvent(EVENT_FROSTBOMB, 7s, 11s);
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
{
|
||||
lock = true;
|
||||
|
||||
switch( phase )
|
||||
switch (phase)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_SUMMON_1);
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if( lock )
|
||||
if (lock)
|
||||
return;
|
||||
|
||||
if (me->GetDistance(1103.0f, 1049.0f, 510.0f) < 55.0f)
|
||||
@@ -200,8 +200,8 @@ public:
|
||||
void JustSummoned(Creature* pSummon) override
|
||||
{
|
||||
pSummon->SetInCombatWithZone();
|
||||
if( Unit* v = pSummon->SelectVictim() )
|
||||
if( pSummon->AI() )
|
||||
if (Unit* v = pSummon->SelectVictim())
|
||||
if (pSummon->AI())
|
||||
pSummon->AI()->AttackStart(v);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
switch( spell->Id )
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_SUMMON_MENAGERIE_1:
|
||||
{
|
||||
@@ -299,9 +299,9 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( releaseLockTimer )
|
||||
if (releaseLockTimer)
|
||||
{
|
||||
if( releaseLockTimer >= 5000 )
|
||||
if (releaseLockTimer >= 5000)
|
||||
{
|
||||
lock = false;
|
||||
if (me->IsInCombat())
|
||||
@@ -315,27 +315,27 @@ public:
|
||||
releaseLockTimer += diff;
|
||||
}
|
||||
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_FROSTBOMB:
|
||||
if( Unit* v = me->GetVictim() )
|
||||
if (Unit* v = me->GetVictim())
|
||||
me->CastSpell(v, SPELL_FROSTBOMB, false);
|
||||
events.Repeat(7s, 11s);
|
||||
break;
|
||||
case EVENT_TIME_BOMB:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
DoCast(target, DUNGEON_MODE(SPELL_TIME_BOMB_N, SPELL_TIME_BOMB_H));
|
||||
events.Repeat(20s, 25s);
|
||||
break;
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
if (pInstance)
|
||||
{
|
||||
pInstance->SetData(DATA_VAROS, NOT_STARTED);
|
||||
if( pInstance->GetData(DATA_CC_COUNT) < 10 )
|
||||
if (pInstance->GetData(DATA_CC_COUNT) < 10 )
|
||||
{
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->CastSpell(me, 50053, true);
|
||||
@@ -157,23 +157,23 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if( !UpdateVictim() )
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if( me->HasUnitState(UNIT_STATE_CASTING) )
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case EVENT_AMPLIFY_MAGIC:
|
||||
{
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 50.0f, true))
|
||||
me->CastSpell(target, SPELL_AMPLIFY_MAGIC, false);
|
||||
events.Repeat(17s + 500ms, 22s + 500ms);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
{
|
||||
Talk(SAY_AZURE);
|
||||
Talk(SAY_AZURE_EMOTE);
|
||||
switch( events.ExecuteEvent() )
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_CALL_AZURE_RING_CAPTAIN_1:
|
||||
me->CastSpell(me, SPELL_CALL_AZURE_RING_CAPTAIN_1, true);
|
||||
@@ -204,11 +204,11 @@ public:
|
||||
events.ScheduleEvent(EVENT_CALL_AZURE_RING_CAPTAIN_1, 16s);
|
||||
break;
|
||||
}
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true) )
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
|
||||
{
|
||||
if( Creature* trigger = me->SummonCreature(NPC_ARCANE_BEAM, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 13000) )
|
||||
if (Creature* trigger = me->SummonCreature(NPC_ARCANE_BEAM, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 13000))
|
||||
{
|
||||
if( Creature* c = me->FindNearestCreature(NPC_AZURE_RING_CAPTAIN, 500.0f, true) )
|
||||
if (Creature* c = me->FindNearestCreature(NPC_AZURE_RING_CAPTAIN, 500.0f, true))
|
||||
c->CastSpell(trigger, SPELL_ARCANE_BEAM_VISUAL, true);
|
||||
trigger->GetMotionMaster()->MoveChase(target, 0.1f);
|
||||
trigger->CastSpell(me, SPELL_ARCANE_BEAM_PERIODIC_DAMAGE, true);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->CastSpell((Unit*)nullptr, SPELL_ENERGIZE_CORES, false);
|
||||
ZapAngle += M_PI / 2;
|
||||
if( ZapAngle >= 2 * M_PI )
|
||||
if (ZapAngle >= 2 * M_PI)
|
||||
ZapAngle -= 2 * M_PI;
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_THIN, 2s);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
void OnCreatureCreate(Creature* pCreature) override
|
||||
{
|
||||
switch( pCreature->GetEntry() )
|
||||
switch (pCreature->GetEntry())
|
||||
{
|
||||
case NPC_DRAKOS:
|
||||
uiDrakosGUID = pCreature->GetGUID();
|
||||
@@ -82,19 +82,19 @@ public:
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo) override
|
||||
{
|
||||
switch( pGo->GetEntry() )
|
||||
switch (pGo->GetEntry())
|
||||
{
|
||||
case GO_DRAGON_CAGE_DOOR:
|
||||
for( uint8 i = 0; i < 3; ++i )
|
||||
{
|
||||
if( DragonCageDoorGUID[i] )
|
||||
if (DragonCageDoorGUID[i])
|
||||
continue;
|
||||
|
||||
DragonCageDoorGUID[i] = pGo->GetGUID();
|
||||
break;
|
||||
}
|
||||
if( m_auiEncounter[DATA_DRAKOS] == DONE )
|
||||
if( pGo->GetGoState() != GO_STATE_ACTIVE )
|
||||
if (m_auiEncounter[DATA_DRAKOS] == DONE)
|
||||
if (pGo->GetGoState() != GO_STATE_ACTIVE )
|
||||
{
|
||||
pGo->SetLootState(GO_READY);
|
||||
pGo->UseDoorOrButton(0, false);
|
||||
@@ -129,11 +129,11 @@ public:
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
{
|
||||
switch( type )
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DRAKOS:
|
||||
m_auiEncounter[DATA_DRAKOS] = data;
|
||||
if( data == DONE )
|
||||
if (data == DONE)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10 - CentrifugeCount);
|
||||
@@ -144,18 +144,18 @@ public:
|
||||
break;
|
||||
case DATA_VAROS:
|
||||
m_auiEncounter[DATA_VAROS] = data;
|
||||
if( data == DONE )
|
||||
if (data == DONE)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
|
||||
if( Creature* urom = instance->GetCreature(uiUromGUID) )
|
||||
if (Creature* urom = instance->GetCreature(uiUromGUID))
|
||||
urom->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
break;
|
||||
case DATA_UROM:
|
||||
m_auiEncounter[DATA_UROM] = data;
|
||||
if( data == DONE )
|
||||
if( Creature* eregos = instance->GetCreature(uiEregosGUID) )
|
||||
if (data == DONE)
|
||||
if (Creature* eregos = instance->GetCreature(uiEregosGUID))
|
||||
eregos->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
break;
|
||||
case DATA_EREGOS:
|
||||
@@ -174,13 +174,13 @@ public:
|
||||
}
|
||||
break;
|
||||
case DATA_CC_COUNT:
|
||||
if( CentrifugeCount < 10 )
|
||||
if (CentrifugeCount < 10)
|
||||
{
|
||||
++CentrifugeCount;
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 10 - CentrifugeCount);
|
||||
}
|
||||
if( CentrifugeCount >= 10 )
|
||||
if( Creature* varos = instance->GetCreature(uiVarosGUID) )
|
||||
if (CentrifugeCount >= 10)
|
||||
if (Creature* varos = instance->GetCreature(uiVarosGUID))
|
||||
{
|
||||
varos->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
varos->InterruptNonMeleeSpells(false);
|
||||
@@ -198,13 +198,13 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if( data == DONE )
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
{
|
||||
switch( type )
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DRAKOS:
|
||||
case DATA_VAROS:
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
ObjectGuid GetGuidData(uint32 identifier) const override
|
||||
{
|
||||
switch( identifier )
|
||||
switch (identifier)
|
||||
{
|
||||
case DATA_DRAKOS:
|
||||
return uiDrakosGUID;
|
||||
@@ -259,24 +259,24 @@ public:
|
||||
|
||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* /*target*/, uint32 /*miscvalue1*/) override
|
||||
{
|
||||
switch(criteria_id)
|
||||
switch (criteria_id)
|
||||
{
|
||||
case CRITERIA_EXPERIENCED_AMBER:
|
||||
if( source )
|
||||
if( Unit* drake = source->GetVehicleBase() )
|
||||
if( drake->GetEntry() == NPC_AMBER_DRAKE )
|
||||
if (source)
|
||||
if (Unit* drake = source->GetVehicleBase())
|
||||
if (drake->GetEntry() == NPC_AMBER_DRAKE )
|
||||
return true;
|
||||
break;
|
||||
case CRITERIA_EXPERIENCED_EMERALD:
|
||||
if( source )
|
||||
if( Unit* drake = source->GetVehicleBase() )
|
||||
if( drake->GetEntry() == NPC_EMERALD_DRAKE )
|
||||
if (source)
|
||||
if (Unit* drake = source->GetVehicleBase())
|
||||
if (drake->GetEntry() == NPC_EMERALD_DRAKE )
|
||||
return true;
|
||||
break;
|
||||
case CRITERIA_EXPERIENCED_RUBY:
|
||||
if( source )
|
||||
if( Unit* drake = source->GetVehicleBase() )
|
||||
if( drake->GetEntry() == NPC_RUBY_DRAKE )
|
||||
if (source)
|
||||
if (Unit* drake = source->GetVehicleBase())
|
||||
if (drake->GetEntry() == NPC_RUBY_DRAKE )
|
||||
return true;
|
||||
break;
|
||||
case CRITERIA_AMBER_VOID:
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if(me->GetEntry() == NPC_BELGARISTRASZ)
|
||||
if (me->GetEntry() == NPC_BELGARISTRASZ)
|
||||
{
|
||||
Talk(SAY_BELGARISTRASZ);
|
||||
}
|
||||
@@ -167,10 +167,10 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if(creature->IsQuestGiver())
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if(creature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE)
|
||||
if (creature->GetInstanceScript()->GetData(DATA_DRAKOS) == DONE)
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
@@ -251,10 +251,10 @@ public:
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
switch(creature->GetEntry())
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_VERDISA:
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
SendGossipMenuFor(player, GOSSIP_TEXTID_VERDISA2, creature->GetGUID());
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
CloseGossipMenuFor(player);
|
||||
break;
|
||||
case NPC_BELGARISTRASZ:
|
||||
switch(uiAction)
|
||||
switch (uiAction)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF:
|
||||
openedMenu[player->GetGUID()] = true;
|
||||
@@ -415,11 +415,11 @@ public:
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
for( uint8 i = 0; i < 8; ++i )
|
||||
if( me->m_spells[i] == spell->Id )
|
||||
if (me->m_spells[i] == spell->Id)
|
||||
{
|
||||
if( target && target->IsAlive() && !target->CanFly() && target->IsHostileTo(me) && !spell->IsTargetingArea())
|
||||
if (target && target->IsAlive() && !target->CanFly() && target->IsHostileTo(me) && !spell->IsTargetingArea())
|
||||
{
|
||||
if( Unit* charmer = me->GetCharmer() )
|
||||
if (Unit* charmer = me->GetCharmer())
|
||||
Unit::Kill(charmer, charmer, false);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user