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

@ -33,50 +33,50 @@ Script Data End */
// Ours
class npc_steam_powered_auctioneer : public CreatureScript
{
public:
npc_steam_powered_auctioneer() : CreatureScript("npc_steam_powered_auctioneer") { }
public:
npc_steam_powered_auctioneer() : CreatureScript("npc_steam_powered_auctioneer") { }
struct npc_steam_powered_auctioneerAI : public ScriptedAI
{
npc_steam_powered_auctioneerAI(Creature* creature) : ScriptedAI(creature) {}
struct npc_steam_powered_auctioneerAI : public ScriptedAI
{
npc_steam_powered_auctioneerAI(Creature* creature) : ScriptedAI(creature) {}
bool CanBeSeen(Player const* player)
{
if (player->GetTeamId() == TEAM_ALLIANCE)
return me->GetEntry() == 35594;
else
return me->GetEntry() == 35607;
}
};
bool CanBeSeen(Player const* player)
{
if (player->GetTeamId() == TEAM_ALLIANCE)
return me->GetEntry() == 35594;
else
return me->GetEntry() == 35607;
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_steam_powered_auctioneerAI(creature);
}
CreatureAI* GetAI(Creature* creature) const
{
return new npc_steam_powered_auctioneerAI(creature);
}
};
class npc_mei_francis_mount : public CreatureScript
{
public:
npc_mei_francis_mount() : CreatureScript("npc_mei_francis_mount") { }
public:
npc_mei_francis_mount() : CreatureScript("npc_mei_francis_mount") { }
struct npc_mei_francis_mountAI : public ScriptedAI
{
npc_mei_francis_mountAI(Creature* creature) : ScriptedAI(creature) {}
struct npc_mei_francis_mountAI : public ScriptedAI
{
npc_mei_francis_mountAI(Creature* creature) : ScriptedAI(creature) {}
bool CanBeSeen(Player const* player)
{
if (player->GetTeamId() == TEAM_ALLIANCE)
return me->GetEntry() == 32206 || me->GetEntry() == 32335 || me->GetEntry() == 31851;
else
return me->GetEntry() == 32207 || me->GetEntry() == 32336 || me->GetEntry() == 31852;
}
};
bool CanBeSeen(Player const* player)
{
if (player->GetTeamId() == TEAM_ALLIANCE)
return me->GetEntry() == 32206 || me->GetEntry() == 32335 || me->GetEntry() == 31851;
else
return me->GetEntry() == 32207 || me->GetEntry() == 32336 || me->GetEntry() == 31852;
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new npc_mei_francis_mountAI(creature);
}
CreatureAI* GetAI(Creature* creature) const
{
return new npc_mei_francis_mountAI(creature);
}
};
/******************************************
@ -85,37 +85,37 @@ class npc_mei_francis_mount : public CreatureScript
enum DisguiseEvent
{
ACTION_SHANDY_INTRO = 0,
ACTION_WATER = 1,
ACTION_SHIRTS = 2,
ACTION_PANTS = 3,
ACTION_UNMENTIONABLES = 4,
ACTION_SHANDY_INTRO = 0,
ACTION_WATER = 1,
ACTION_SHIRTS = 2,
ACTION_PANTS = 3,
ACTION_UNMENTIONABLES = 4,
EVENT_INTRO_DH1 = 1,
EVENT_INTRO_DH2 = 2,
EVENT_INTRO_DH3 = 3,
EVENT_INTRO_DH4 = 4,
EVENT_INTRO_DH5 = 5,
EVENT_INTRO_DH6 = 6,
EVENT_OUTRO_DH = 7,
EVENT_INTRO_DH1 = 1,
EVENT_INTRO_DH2 = 2,
EVENT_INTRO_DH3 = 3,
EVENT_INTRO_DH4 = 4,
EVENT_INTRO_DH5 = 5,
EVENT_INTRO_DH6 = 6,
EVENT_OUTRO_DH = 7,
SAY_SHANDY1 = 0,
SAY_SHANDY2 = 1,
SAY_SHANDY3 = 2,
SAY_SHANDY_WATER = 3, // shirts = 4, pants = 5, unmentionables = 6
SAY_SHANDY4 = 7,
SAY_SHANDY5 = 8,
SAY_SHANDY6 = 9,
SAY_SHANDY1 = 0,
SAY_SHANDY2 = 1,
SAY_SHANDY3 = 2,
SAY_SHANDY_WATER = 3, // shirts = 4, pants = 5, unmentionables = 6
SAY_SHANDY4 = 7,
SAY_SHANDY5 = 8,
SAY_SHANDY6 = 9,
};
enum DisguiseMisc
{
QUEST_SUITABLE_DISGUISE_A = 20438,
QUEST_SUITABLE_DISGUISE_H = 24556,
QUEST_SUITABLE_DISGUISE_A = 20438,
QUEST_SUITABLE_DISGUISE_H = 24556,
SPELL_EVOCATION_VISUAL = 69659,
SPELL_EVOCATION_VISUAL = 69659,
NPC_AQUANOS_ENTRY = 36851,
NPC_AQUANOS_ENTRY = 36851,
};
class npc_shandy_dalaran : public CreatureScript
@ -129,8 +129,8 @@ public:
void Reset()
{
_events.Reset();
_aquanosGUID = 0;
_events.Reset();
_aquanosGUID = 0;
}
void SetData(uint32 type, uint32 data)
@ -138,39 +138,39 @@ public:
switch(type)
{
case ACTION_SHANDY_INTRO:
if (Creature* aquanos = me->FindNearestCreature(NPC_AQUANOS_ENTRY, 30, true))
_aquanosGUID = aquanos->GetGUID();
if (Creature* aquanos = me->FindNearestCreature(NPC_AQUANOS_ENTRY, 30, true))
_aquanosGUID = aquanos->GetGUID();
_events.Reset();
_lCount = 0;
_lSource = 0;
_canWash = false;
_events.Reset();
_lCount = 0;
_lSource = 0;
_canWash = false;
Talk(SAY_SHANDY1);
_events.ScheduleEvent(EVENT_INTRO_DH1, 5000);
_events.ScheduleEvent(EVENT_OUTRO_DH, 10*MINUTE*IN_MILLISECONDS);
_events.ScheduleEvent(EVENT_OUTRO_DH, 10*MINUTE*IN_MILLISECONDS);
break;
default:
default:
if(_lSource == type && _canWash)
{
_canWash = false;
_events.ScheduleEvent(EVENT_INTRO_DH2, type == ACTION_UNMENTIONABLES ? 4000 : 10000);
_events.ScheduleEvent(EVENT_INTRO_DH2, type == ACTION_UNMENTIONABLES ? 4000 : 10000);
Talk(SAY_SHANDY2);
if (Creature* aquanos = ObjectAccessor::GetCreature(*me, _aquanosGUID))
if (Creature* aquanos = ObjectAccessor::GetCreature(*me, _aquanosGUID))
aquanos->CastSpell(aquanos, SPELL_EVOCATION_VISUAL, false);
}
break;
}
}
void RollTask()
{
_lSource = urand(ACTION_SHIRTS, ACTION_UNMENTIONABLES);
if (_lCount == 1 || _lCount == 4)
_lSource = ACTION_WATER;
void RollTask()
{
_lSource = urand(ACTION_SHIRTS, ACTION_UNMENTIONABLES);
if (_lCount == 1 || _lCount == 4)
_lSource = ACTION_WATER;
Talk(SAY_SHANDY_WATER + _lSource - 1);
_canWash = true;
}
Talk(SAY_SHANDY_WATER + _lSource - 1);
_canWash = true;
}
void UpdateAI(uint32 diff)
{
@ -180,53 +180,53 @@ public:
case EVENT_INTRO_DH1:
Talk(SAY_SHANDY3);
_events.ScheduleEvent(EVENT_INTRO_DH2, 15000);
_events.PopEvent();
_events.PopEvent();
break;
case EVENT_INTRO_DH2:
if (_lCount++ > 6)
_events.ScheduleEvent(EVENT_INTRO_DH3, 6000);
else
RollTask();
if (_lCount++ > 6)
_events.ScheduleEvent(EVENT_INTRO_DH3, 6000);
else
RollTask();
_events.PopEvent();
break;
case EVENT_INTRO_DH3:
Talk(SAY_SHANDY4);
_events.ScheduleEvent(EVENT_INTRO_DH4, 20000);
_events.PopEvent();
_events.PopEvent();
break;
case EVENT_INTRO_DH4:
Talk(SAY_SHANDY5);
_events.ScheduleEvent(EVENT_INTRO_DH5, 3000);
_events.PopEvent();
_events.PopEvent();
break;
case EVENT_INTRO_DH5:
me->SummonGameObject(201384, 5798.74f, 693.19f, 657.94f, 0.91f, 0, 0, 0, 0,90000000);
_events.ScheduleEvent(EVENT_INTRO_DH6, 1000);
_events.PopEvent();
_events.PopEvent();
break;
case EVENT_INTRO_DH6:
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(0, 5797.55f, 691.97f, 657.94f);
_events.RescheduleEvent(EVENT_OUTRO_DH, 30000);
_events.PopEvent();
_events.PopEvent();
break;
case EVENT_OUTRO_DH:
me->GetMotionMaster()->MoveTargetedHome();
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
_events.Reset();
_events.Reset();
break;
}
}
private:
EventMap _events;
uint64 _aquanosGUID;
uint8 _lCount;
uint32 _lSource;
uint32 _resetTime;
bool _canWash;
private:
EventMap _events;
uint64 _aquanosGUID;
uint8 _lCount;
uint32 _lSource;
uint32 _resetTime;
bool _canWash;
};
bool OnGossipHello(Player* player, Creature* creature)
@ -235,7 +235,7 @@ public:
player->PrepareQuestMenu(creature->GetGUID());
if (player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_A) == QUEST_STATUS_INCOMPLETE ||
player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_H) == QUEST_STATUS_INCOMPLETE)
player->GetQuestStatus(QUEST_SUITABLE_DISGUISE_H) == QUEST_STATUS_INCOMPLETE)
{
if(player->GetTeamId() == TEAM_ALLIANCE)
player->ADD_GOSSIP_ITEM(0, "Arcanist Tybalin said you might be able to lend me a certain tabard.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
@ -299,97 +299,97 @@ enum ArchmageLandalockImages
class npc_archmage_landalock : public CreatureScript
{
public:
npc_archmage_landalock() : CreatureScript("npc_archmage_landalock")
{
}
public:
npc_archmage_landalock() : CreatureScript("npc_archmage_landalock")
{
}
CreatureAI* GetAI(Creature* creature) const
{
return new npc_archmage_landalockAI(creature);
}
CreatureAI* GetAI(Creature* creature) const
{
return new npc_archmage_landalockAI(creature);
}
struct npc_archmage_landalockAI : public ScriptedAI
{
npc_archmage_landalockAI(Creature* creature) : ScriptedAI(creature)
{
_switchImageTimer = MINUTE*IN_MILLISECONDS;
_summonGUID = 0;
}
struct npc_archmage_landalockAI : public ScriptedAI
{
npc_archmage_landalockAI(Creature* creature) : ScriptedAI(creature)
{
_switchImageTimer = MINUTE*IN_MILLISECONDS;
_summonGUID = 0;
}
uint32 GetImageEntry(uint32 QuestId)
{
switch (QuestId)
{
case QUEST_SARTHARION_MUST_DIE:
return NPC_SARTHARION_IMAGE;
case QUEST_ANUBREKHAN_MUST_DIE:
return NPC_ANUBREKHAN_IMAGE;
case QUEST_NOTH_THE_PLAGUEBINGER_MUST_DIE:
return NPC_NOTH_THE_PLAGUEBINGER_IMAGE;
case QUEST_INSTRUCTOR_RAZUVIOUS_MUST_DIE:
return NPC_INSTRUCTOR_RAZUVIOUS_IMAGE;
case QUEST_PATCHWERK_MUST_DIE:
return NPC_PATCHWERK_IMAGE;
case QUEST_MALYGOS_MUST_DIE:
return NPC_MALYGOS_IMAGE;
case QUEST_FLAME_LEVIATHAN_MUST_DIE:
return NPC_FLAME_LEVIATHAN_IMAGE;
case QUEST_RAZORSCALE_MUST_DIE:
return NPC_RAZORSCALE_IMAGE;
case QUEST_IGNIS_THE_FURNACE_MASTER_MUST_DIE:
return NPC_IGNIS_THE_FURNACE_MASTER_IMAGE;
case QUEST_XT_002_DECONSTRUCTOR_MUST_DIE:
return NPC_XT_002_DECONSTRUCTOR_IMAGE;
case QUEST_LORD_JARAXXUS_MUST_DIE:
return NPC_LORD_JARAXXUS_IMAGE;
default: //case QUEST_LORD_MARROWGAR_MUST_DIE:
return NPC_LORD_MARROWGAR_IMAGE;
}
}
uint32 GetImageEntry(uint32 QuestId)
{
switch (QuestId)
{
case QUEST_SARTHARION_MUST_DIE:
return NPC_SARTHARION_IMAGE;
case QUEST_ANUBREKHAN_MUST_DIE:
return NPC_ANUBREKHAN_IMAGE;
case QUEST_NOTH_THE_PLAGUEBINGER_MUST_DIE:
return NPC_NOTH_THE_PLAGUEBINGER_IMAGE;
case QUEST_INSTRUCTOR_RAZUVIOUS_MUST_DIE:
return NPC_INSTRUCTOR_RAZUVIOUS_IMAGE;
case QUEST_PATCHWERK_MUST_DIE:
return NPC_PATCHWERK_IMAGE;
case QUEST_MALYGOS_MUST_DIE:
return NPC_MALYGOS_IMAGE;
case QUEST_FLAME_LEVIATHAN_MUST_DIE:
return NPC_FLAME_LEVIATHAN_IMAGE;
case QUEST_RAZORSCALE_MUST_DIE:
return NPC_RAZORSCALE_IMAGE;
case QUEST_IGNIS_THE_FURNACE_MASTER_MUST_DIE:
return NPC_IGNIS_THE_FURNACE_MASTER_IMAGE;
case QUEST_XT_002_DECONSTRUCTOR_MUST_DIE:
return NPC_XT_002_DECONSTRUCTOR_IMAGE;
case QUEST_LORD_JARAXXUS_MUST_DIE:
return NPC_LORD_JARAXXUS_IMAGE;
default: //case QUEST_LORD_MARROWGAR_MUST_DIE:
return NPC_LORD_MARROWGAR_IMAGE;
}
}
void JustSummoned(Creature* image)
{
// xinef: screams like a baby
if (image->GetEntry() != NPC_ANUBREKHAN_IMAGE)
image->SetUnitMovementFlags(MOVEMENTFLAG_RIGHT);
_summonGUID = image->GetGUID();
}
void JustSummoned(Creature* image)
{
// xinef: screams like a baby
if (image->GetEntry() != NPC_ANUBREKHAN_IMAGE)
image->SetUnitMovementFlags(MOVEMENTFLAG_RIGHT);
_summonGUID = image->GetGUID();
}
void UpdateAI(uint32 diff)
{
ScriptedAI::UpdateAI(diff);
void UpdateAI(uint32 diff)
{
ScriptedAI::UpdateAI(diff);
_switchImageTimer += diff;
if (_switchImageTimer > MINUTE*IN_MILLISECONDS)
{
_switchImageTimer = 0;
QuestRelationBounds objectQR = sObjectMgr->GetCreatureQuestRelationBounds(me->GetEntry());
for (QuestRelations::const_iterator i = objectQR.first; i != objectQR.second; ++i)
{
uint32 questId = i->second;
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest || !quest->IsWeekly())
continue;
_switchImageTimer += diff;
if (_switchImageTimer > MINUTE*IN_MILLISECONDS)
{
_switchImageTimer = 0;
QuestRelationBounds objectQR = sObjectMgr->GetCreatureQuestRelationBounds(me->GetEntry());
for (QuestRelations::const_iterator i = objectQR.first; i != objectQR.second; ++i)
{
uint32 questId = i->second;
Quest const* quest = sObjectMgr->GetQuestTemplate(questId);
if (!quest || !quest->IsWeekly())
continue;
uint32 newEntry = GetImageEntry(questId);
if (GUID_ENPART(_summonGUID) != newEntry)
{
if (Creature* image = ObjectAccessor::GetCreature(*me, _summonGUID))
image->DespawnOrUnsummon();
uint32 newEntry = GetImageEntry(questId);
if (GUID_ENPART(_summonGUID) != newEntry)
{
if (Creature* image = ObjectAccessor::GetCreature(*me, _summonGUID))
image->DespawnOrUnsummon();
float z = 653.622f;
if (newEntry == NPC_MALYGOS_IMAGE || newEntry == NPC_RAZORSCALE_IMAGE || newEntry == NPC_SARTHARION_IMAGE)
z += 3.0f;
me->SummonCreature(newEntry, 5703.077f, 583.9757f, z, 3.926991f);
}
}
}
}
private:
uint32 _switchImageTimer;
uint64 _summonGUID;
};
float z = 653.622f;
if (newEntry == NPC_MALYGOS_IMAGE || newEntry == NPC_RAZORSCALE_IMAGE || newEntry == NPC_SARTHARION_IMAGE)
z += 3.0f;
me->SummonCreature(newEntry, 5703.077f, 583.9757f, z, 3.926991f);
}
}
}
}
private:
uint32 _switchImageTimer;
uint64 _summonGUID;
};
};
// Theirs
@ -446,7 +446,7 @@ public:
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
if (!player || player->IsGameMaster() || player->IsBeingTeleported() || (player->GetPositionZ() > 670 && player->GetVehicle()) ||
if (!player || player->IsGameMaster() || player->IsBeingTeleported() || (player->GetPositionZ() > 670 && player->GetVehicle()) ||
// If player has Disguise aura for quest A Meeting With The Magister or An Audience With The Arcanist, do not teleport it away but let it pass
player->HasAura(SPELL_SUNREAVER_DISGUISE_FEMALE) || player->HasAura(SPELL_SUNREAVER_DISGUISE_MALE) ||
player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_FEMALE) || player->HasAura(SPELL_SILVER_COVENANT_DISGUISE_MALE))
@ -603,13 +603,13 @@ class npc_minigob_manabonk : public CreatureScript
void AddSC_dalaran()
{
// our
new npc_steam_powered_auctioneer();
new npc_mei_francis_mount();
// our
new npc_steam_powered_auctioneer();
new npc_mei_francis_mount();
new npc_shandy_dalaran();
new npc_archmage_landalock();
new npc_archmage_landalock();
// theirs
// theirs
new npc_mageguard_dalaran();
new npc_minigob_manabonk();
}