Coding standards (#23514)

* Coding standards

* revert part

(cherry picked from commit fe744977c9)
This commit is contained in:
Aokromes
2019-06-26 08:56:20 +02:00
committed by Shauren
parent c9d52c9547
commit 30cec73c61
11 changed files with 78 additions and 78 deletions

View File

@@ -100,7 +100,7 @@ public:
if (!*args)
return false;
Player* target = handler->getSelectedPlayer();
Player* target = handler->getSelectedPlayer();
if (!target)
target = handler->GetSession()->GetPlayer();

View File

@@ -2320,7 +2320,7 @@ class spell_maiev_down : public AuraScript
}
};
// 40693 - Cage Trap
// 40693 - Cage Trap
class spell_illidan_cage_teleport : public SpellScript
{
PrepareSpellScript(spell_illidan_cage_teleport);

View File

@@ -222,23 +222,23 @@ public:
enum CorkiData
{
// first quest
QUEST_HELP = 9923,
NPC_CORKI = 18445,
NPC_CORKI_CREDIT_1 = 18369,
GO_CORKIS_PRISON = 182349,
CORKI_SAY_THANKS = 0,
// 2nd quest
QUEST_CORKIS_GONE_MISSING_AGAIN = 9924,
NPC_CORKI_2 = 20812,
GO_CORKIS_PRISON_2 = 182350,
CORKI_SAY_PROMISE = 0,
// 3rd quest
QUEST_CHOWAR_THE_PILLAGER = 9955,
NPC_CORKI_3 = 18369,
NPC_CORKI_CREDIT_3 = 18444,
GO_CORKIS_PRISON_3 = 182521,
CORKI_SAY_LAST = 0
// first quest
QUEST_HELP = 9923,
NPC_CORKI = 18445,
NPC_CORKI_CREDIT_1 = 18369,
GO_CORKIS_PRISON = 182349,
CORKI_SAY_THANKS = 0,
// 2nd quest
QUEST_CORKIS_GONE_MISSING_AGAIN = 9924,
NPC_CORKI_2 = 20812,
GO_CORKIS_PRISON_2 = 182350,
CORKI_SAY_PROMISE = 0,
// 3rd quest
QUEST_CHOWAR_THE_PILLAGER = 9955,
NPC_CORKI_3 = 18369,
NPC_CORKI_CREDIT_3 = 18444,
GO_CORKIS_PRISON_3 = 182521,
CORKI_SAY_LAST = 0
};
class go_corkis_prison : public GameObjectScript
@@ -295,63 +295,63 @@ public:
class npc_corki : public CreatureScript
{
public:
npc_corki() : CreatureScript("npc_corki") { }
npc_corki() : CreatureScript("npc_corki") { }
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_corkiAI(creature);
}
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_corkiAI(creature);
}
struct npc_corkiAI : public ScriptedAI
{
npc_corkiAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
}
struct npc_corkiAI : public ScriptedAI
{
npc_corkiAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
}
void Initialize()
{
Say_Timer = 5000;
ReleasedFromCage = false;
}
void Initialize()
{
Say_Timer = 5000;
ReleasedFromCage = false;
}
uint32 Say_Timer;
bool ReleasedFromCage;
uint32 Say_Timer;
bool ReleasedFromCage;
void Reset() override
{
Initialize();
}
void Reset() override
{
Initialize();
}
void UpdateAI(uint32 diff) override
{
if (ReleasedFromCage)
{
if (Say_Timer <= diff)
{
me->DespawnOrUnsummon();
ReleasedFromCage = false;
}
else
Say_Timer -= diff;
}
}
void UpdateAI(uint32 diff) override
{
if (ReleasedFromCage)
{
if (Say_Timer <= diff)
{
me->DespawnOrUnsummon();
ReleasedFromCage = false;
}
else
Say_Timer -= diff;
}
}
void MovementInform(uint32 type, uint32 id) override
{
if (type == POINT_MOTION_TYPE && id == 1)
{
Say_Timer = 5000;
ReleasedFromCage = true;
if (me->GetEntry() == NPC_CORKI)
Talk(CORKI_SAY_THANKS);
if (me->GetEntry() == NPC_CORKI_2)
Talk(CORKI_SAY_PROMISE);
if (me->GetEntry() == NPC_CORKI_3)
Talk(CORKI_SAY_LAST);
}
};
};
void MovementInform(uint32 type, uint32 id) override
{
if (type == POINT_MOTION_TYPE && id == 1)
{
Say_Timer = 5000;
ReleasedFromCage = true;
if (me->GetEntry() == NPC_CORKI)
Talk(CORKI_SAY_THANKS);
if (me->GetEntry() == NPC_CORKI_2)
Talk(CORKI_SAY_PROMISE);
if (me->GetEntry() == NPC_CORKI_3)
Talk(CORKI_SAY_LAST);
}
};
};
};
/*#####