converted all tabs to 4 spaces

This commit is contained in:
Yehonal
2016-06-26 19:23:57 +02:00
parent 52f305111c
commit f6eefedcd5
717 changed files with 132388 additions and 132388 deletions

View File

@@ -49,17 +49,17 @@ public:
enum eChallenge
{
QUEST_THE_CHALLENGE = 9015,
GO_BANNER_OF_PROVOCATION = 181058,
GO_ARENA_SPOILS = 181074,
QUEST_THE_CHALLENGE = 9015,
GO_BANNER_OF_PROVOCATION = 181058,
GO_ARENA_SPOILS = 181074,
NPC_GRIMSTONE = 10096,
NPC_THELDREN = 16059,
NPC_GRIMSTONE = 10096,
NPC_THELDREN = 16059,
};
uint32 theldrenTeam[] =
{
16053, 16055, 16050, 16051, 16049, 16052, 16054, 16058
16053, 16055, 16050, 16051, 16049, 16052, 16054, 16058
};
uint32 RingMob[]=
@@ -130,39 +130,39 @@ public:
{
instance = creature->GetInstanceScript();
MobSpawnId = rand()%6;
eventPhase = 0;
eventTimer = 1000;
theldrenEvent = false;
summons.DespawnAll();
eventPhase = 0;
eventTimer = 1000;
theldrenEvent = false;
summons.DespawnAll();
}
InstanceScript* instance;
SummonList summons;
SummonList summons;
uint8 eventPhase;
uint32 eventTimer;
uint8 MobSpawnId;
bool theldrenEvent;
bool theldrenEvent;
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
void JustSummoned(Creature* summon)
{
summons.Summon(summon);
if (Unit* target = SelectTargetFromPlayerList(100.0f))
summon->AI()->AttackStart(target);
}
void JustSummoned(Creature* summon)
{
summons.Summon(summon);
if (Unit* target = SelectTargetFromPlayerList(100.0f))
summon->AI()->AttackStart(target);
}
void SummonedCreatureDies(Creature* summon, Unit*)
{
summons.Despawn(summon);
// All Summons killed, next phase
if (summons.empty())
eventTimer = 5000;
}
void SummonedCreatureDies(Creature* summon, Unit*)
{
summons.Despawn(summon);
// All Summons killed, next phase
if (summons.empty())
eventTimer = 5000;
}
void WaypointReached(uint32 waypointId)
{
@@ -204,19 +204,19 @@ public:
instance->HandleGameObject(instance->GetData64(id), open);
}
void SummonBoss()
{
if (me->FindNearestGameObject(GO_BANNER_OF_PROVOCATION, 100.0f))
{
theldrenEvent = true;
me->SummonCreature(NPC_THELDREN, 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
uint8 rand = urand(0, 4);
for (uint8 i = rand; i < rand+4; ++i)
me->SummonCreature(theldrenTeam[i], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
else
me->SummonCreature(RingBoss[rand()%6], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
void SummonBoss()
{
if (me->FindNearestGameObject(GO_BANNER_OF_PROVOCATION, 100.0f))
{
theldrenEvent = true;
me->SummonCreature(NPC_THELDREN, 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
uint8 rand = urand(0, 4);
for (uint8 i = rand; i < rand+4; ++i)
me->SummonCreature(theldrenTeam[i], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
else
me->SummonCreature(RingBoss[rand()%6], 644.300f, -175.989f, -53.739f, 3.418f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
void UpdateEscortAI(uint32 diff)
{
@@ -229,77 +229,77 @@ public:
{
switch (eventPhase)
{
case 0:
Talk(SAY_TEXT5);
HandleGameObject(DATA_ARENA4, false);
Start(false, false);
eventTimer = 0;
break;
case 1:
SetEscortPaused(false);
eventTimer = 0;
break;
case 2:
eventTimer = 2000;
break;
case 3:
HandleGameObject(DATA_ARENA1, true);
eventTimer = 3000;
break;
case 4:
SetEscortPaused(false);
me->SetVisible(false);
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 8000;
break;
case 5:
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 8000;
break;
case 6:
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 0;
break;
case 7:
me->SetVisible(true);
HandleGameObject(DATA_ARENA1, false);
Talk(SAY_TEXT6);
SetEscortPaused(false);
eventTimer = 0;
break;
case 8:
HandleGameObject(DATA_ARENA2, true);
eventTimer = 5000;
break;
case 9:
me->SetVisible(false);
SummonBoss();
eventTimer = 0;
break;
case 10:
if (theldrenEvent)
{
if (GameObject* go = me->SummonGameObject(GO_ARENA_SPOILS, 596.48f, -187.91f, -54.14f, 4.9f, 0.0f, 0.0f, 0.0f, 0.0f, 300))
go->SetOwnerGUID(0);
case 0:
Talk(SAY_TEXT5);
HandleGameObject(DATA_ARENA4, false);
Start(false, false);
eventTimer = 0;
break;
case 1:
SetEscortPaused(false);
eventTimer = 0;
break;
case 2:
eventTimer = 2000;
break;
case 3:
HandleGameObject(DATA_ARENA1, true);
eventTimer = 3000;
break;
case 4:
SetEscortPaused(false);
me->SetVisible(false);
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 8000;
break;
case 5:
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 8000;
break;
case 6:
me->SummonCreature(RingMob[MobSpawnId], 608.960f, -235.322f, -53.907f, 1.857f, TEMPSUMMON_DEAD_DESPAWN, 0);
eventTimer = 0;
break;
case 7:
me->SetVisible(true);
HandleGameObject(DATA_ARENA1, false);
Talk(SAY_TEXT6);
SetEscortPaused(false);
eventTimer = 0;
break;
case 8:
HandleGameObject(DATA_ARENA2, true);
eventTimer = 5000;
break;
case 9:
me->SetVisible(false);
SummonBoss();
eventTimer = 0;
break;
case 10:
if (theldrenEvent)
{
if (GameObject* go = me->SummonGameObject(GO_ARENA_SPOILS, 596.48f, -187.91f, -54.14f, 4.9f, 0.0f, 0.0f, 0.0f, 0.0f, 300))
go->SetOwnerGUID(0);
Map::PlayerList const &pl = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
itr->GetSource()->KilledMonsterCredit(16166, 0);
}
Map::PlayerList const &pl = me->GetMap()->GetPlayers();
for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
itr->GetSource()->KilledMonsterCredit(16166, 0);
}
HandleGameObject(DATA_ARENA2, false);
HandleGameObject(DATA_ARENA3, true);
HandleGameObject(DATA_ARENA4, true);
SetEscortPaused(false);
break;
HandleGameObject(DATA_ARENA2, false);
HandleGameObject(DATA_ARENA3, true);
HandleGameObject(DATA_ARENA4, true);
SetEscortPaused(false);
break;
}
++eventPhase;
}
else
eventTimer -= diff;
else
eventTimer -= diff;
}
}
}
};
};

View File

@@ -60,7 +60,7 @@ enum DataTypes
DATA_SF_BRAZIER_S = 26,
DATA_MOIRA = 27,
DATA_OPEN_COFFER_DOORS = 30,
DATA_OPEN_COFFER_DOORS = 30,
};
#endif

View File

@@ -38,7 +38,7 @@ enum Creatures
NPC_MAGMUS = 9938,
NPC_MOIRA = 8929,
NPC_WATCHMAN_DOOMGRIP = 9476,
NPC_WATCHMAN_DOOMGRIP = 9476,
};
enum GameObjects
@@ -116,7 +116,7 @@ public:
uint64 TombEventStarterGUID;
uint32 TombTimer;
uint32 TombEventCounter;
uint32 OpenedCoofers;
uint32 OpenedCoofers;
void Initialize()
{
@@ -154,7 +154,7 @@ public:
TombEventStarterGUID = 0;
TombTimer = TIMER_TOMBOFTHESEVEN;
TombEventCounter = 0;
OpenedCoofers = 0;
OpenedCoofers = 0;
for (uint8 i = 0; i < 7; ++i)
TombBossGUIDs[i] = 0;
@@ -262,15 +262,15 @@ public:
case DATA_GHOSTKILL:
GhostKillCount += data;
break;
case DATA_OPEN_COFFER_DOORS:
OpenedCoofers += 1;
if (OpenedCoofers == 12)
{
Position pos = {812.15f, -348.91f, -50.579f, 0.7f};
if (TempSummon* summon = instance->SummonCreature(NPC_WATCHMAN_DOOMGRIP, pos))
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
}
break;
case DATA_OPEN_COFFER_DOORS:
OpenedCoofers += 1;
if (OpenedCoofers == 12)
{
Position pos = {812.15f, -348.91f, -50.579f, 0.7f};
if (TempSummon* summon = instance->SummonCreature(NPC_WATCHMAN_DOOMGRIP, pos))
summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
}
break;
}
if (data == DONE || GhostKillCount >= 7)

View File

@@ -115,8 +115,8 @@ enum GameObjectsIds
GO_DR_PORTCULLIS = 175185,
GO_PORTCULLIS_ACTIVE = 164726,
GO_PORTCULLIS_TOBOSSROOMS = 175186,
// Urok Doomhowl
GO_UROK_PILE = 175621,
// Urok Doomhowl
GO_UROK_PILE = 175621,
};
#endif

View File

@@ -24,7 +24,7 @@ enum Spells
SPELL_REND = 16509,
SPELL_STRIKE = 15580,
SPELL_INTIMIDATING_ROAR = 16508,
SPELL_UROK_SPAWN = 16473,
SPELL_UROK_SPAWN = 16473,
};
enum Says
@@ -54,11 +54,11 @@ public:
_Reset();
}
void InitializeAI()
{
me->CastSpell(me, SPELL_UROK_SPAWN, true);
BossAI::InitializeAI();
}
void InitializeAI()
{
me->CastSpell(me, SPELL_UROK_SPAWN, true);
BossAI::InitializeAI();
}
void EnterCombat(Unit* /*who*/)
{

View File

@@ -73,7 +73,7 @@ public:
go_blackrockaltar = 0;
go_portcullis_active = 0;
go_portcullis_tobossrooms = 0;
go_urok_pile = 0;
go_urok_pile = 0;
memset(go_roomrunes, 0, sizeof(go_roomrunes));
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
}
@@ -238,9 +238,9 @@ public:
if (GetBossState(DATA_GYTH) == DONE)
HandleGameObject(0, true, go);
break;
case GO_UROK_PILE:
go_urok_pile = go->GetGUID();
break;
case GO_UROK_PILE:
go_urok_pile = go->GetGUID();
break;
default:
break;
}
@@ -290,8 +290,8 @@ public:
case EVENT_UROK_DOOMHOWL:
if (GetBossState(DATA_UROK_DOOMHOWL) == NOT_STARTED)
{
if (GameObject* pile = instance->GetGameObject(go_urok_pile))
pile->SetLootState(GO_JUST_DEACTIVATED);
if (GameObject* pile = instance->GetGameObject(go_urok_pile))
pile->SetLootState(GO_JUST_DEACTIVATED);
}
break;
default:
@@ -577,7 +577,7 @@ public:
uint64 runecreaturelist[7][5];
uint64 go_portcullis_active;
uint64 go_portcullis_tobossrooms;
uint64 go_urok_pile;
uint64 go_urok_pile;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const

View File

@@ -174,19 +174,19 @@ public:
if (me->GetMapId() == 469)
{
// pussywizard:
bool reset = true;
if (instance)
if (Creature* nefarian = instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
reset = false;
if (reset)
// pussywizard:
bool reset = true;
if (instance)
if (Creature* nefarian = instance->instance->GetCreature(instance->GetData64(DATA_NEFARIAN)))
reset = false;
if (reset)
_Reset();
// pussywizard:
if (!instance || instance->GetBossState(BOSS_NEFARIAN) == DONE || instance->GetBossState(BOSS_NEFARIAN) == IN_PROGRESS)
me->SetVisible(false);
else
me->SetVisible(true);
// pussywizard:
if (!instance || instance->GetBossState(BOSS_NEFARIAN) == DONE || instance->GetBossState(BOSS_NEFARIAN) == IN_PROGRESS)
me->SetVisible(false);
else
me->SetVisible(true);
me->SetPhaseMask(1, true);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
@@ -196,7 +196,7 @@ public:
}
}
bool CanAIAttack(const Unit* target) const { return me->IsVisible(); }
bool CanAIAttack(const Unit* target) const { return me->IsVisible(); }
void JustReachedHome()
{
@@ -351,12 +351,12 @@ public:
{
if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0]))
{
nefarian->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
nefarian->SetCanFly(true);
nefarian->SetHover(false);
nefarian->setActive(true);
nefarian->SetHomePosition(NefarianLoc[1]);
nefarian->GetMotionMaster()->MoveCharge(NefarianLoc[1].GetPositionX(), NefarianLoc[1].GetPositionY(), NefarianLoc[1].GetPositionZ(), 15.0f);
nefarian->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
nefarian->SetCanFly(true);
nefarian->SetHover(false);
nefarian->setActive(true);
nefarian->SetHomePosition(NefarianLoc[1]);
nefarian->GetMotionMaster()->MoveCharge(NefarianLoc[1].GetPositionX(), NefarianLoc[1].GetPositionY(), NefarianLoc[1].GetPositionZ(), 15.0f);
nefarian->AI()->DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
}
@@ -364,7 +364,7 @@ public:
events.CancelEvent(EVENT_FEAR);
events.CancelEvent(EVENT_SHADOW_BOLT);
me->SetVisible(false);
EnterEvadeMode();
EnterEvadeMode();
return;
}
}
@@ -379,10 +379,10 @@ public:
{
if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID)
{
// pussywizard:
InstanceScript* instance = player->GetInstanceScript();
if (!instance || instance->GetBossState(BOSS_NEFARIAN) == DONE)
return;
// pussywizard:
InstanceScript* instance = player->GetInstanceScript();
if (!instance || instance->GetBossState(BOSS_NEFARIAN) == DONE)
return;
player->CLOSE_GOSSIP_MENU();
Talk(SAY_GAMESBEGIN_1);
@@ -451,9 +451,9 @@ public:
if (type != POINT_MOTION_TYPE)
return;
me->SetCanFly(false);
me->SetDisableGravity(false);
me->SetWalk(false);
me->SetCanFly(false);
me->SetDisableGravity(false);
me->SetWalk(false);
me->SetInCombatWithZone();
if (me->GetVictim())
AttackStart(me->GetVictim());

View File

@@ -168,9 +168,9 @@ public:
bool SetBossState(uint32 type, EncounterState state)
{
// pussywizard:
if (GetBossState(type) == DONE && state != DONE) // prevent undoneing a boss xd
return false;
// pussywizard:
if (GetBossState(type) == DONE && state != DONE) // prevent undoneing a boss xd
return false;
if (!InstanceScript::SetBossState(type, state))
return false;

View File

@@ -105,7 +105,7 @@ class boss_majordomo : public CreatureScript
if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f))
{
me->GetMap()->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
me->GetMap()->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
me->setFaction(35);
EnterEvadeMode();
Talk(SAY_DEFEAT);

View File

@@ -115,11 +115,11 @@ class boss_ragnaros : public CreatureScript
Talk(SAY_KILL);
}
void AttackStart(Unit* target)
{
if (target && me->Attack(target, true))
DoStartNoMovement(target);
}
void AttackStart(Unit* target)
{
if (target && me->Attack(target, true))
DoStartNoMovement(target);
}
void UpdateAI(uint32 diff)
{
@@ -154,7 +154,7 @@ class boss_ragnaros : public CreatureScript
case EVENT_INTRO_4:
Talk(SAY_ARRIVAL5_RAG);
if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
Unit::Kill(me, executus);
Unit::Kill(me, executus);
break;
case EVENT_INTRO_5:
me->SetReactState(REACT_AGGRESSIVE);