Core/Script: Code style and remove unused core.

Signed-off-by: Gyx <[email protected]>
This commit is contained in:
Gyx
2012-03-16 21:41:15 +08:00
parent e5afa4a950
commit d8b4bc590a
17 changed files with 240 additions and 124 deletions
@@ -296,8 +296,11 @@ public:
if (spell->Id == SPELL_FLYING_HEAD)
{
if (Phase < 3) ++Phase;
else Phase = 3;
if (Phase < 3)
++Phase;
else
Phase = 3;
withbody = false;
if (!bodyGUID)
bodyGUID = caster->GetGUID();
@@ -486,12 +489,18 @@ public:
instance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
DoZoneInCombat();
}
void AttackStart(Unit* who) {ScriptedAI::AttackStart(who);}
void AttackStart(Unit* who)
{
ScriptedAI::AttackStart(who);
}
void MoveInLineOfSight(Unit* who)
{
if (withhead && Phase != 0)
ScriptedAI::MoveInLineOfSight(who);
}
void KilledUnit(Unit* player)
{
if (player->GetTypeId() == TYPEID_PLAYER)
@@ -596,6 +605,7 @@ public:
if (!headGUID)
headGUID = DoSpawnCreature(HEAD, float(rand()%6), float(rand()%6), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0)->GetGUID();
Unit* Head = Unit::GetUnit((*me), headGUID);
if (Head && Head->isAlive())
{
@@ -815,7 +825,11 @@ public:
}
}
void JustDied(Unit* /*killer*/) { if (!sprouted) Despawn(); }
void JustDied(Unit* /*killer*/)
{
if (!sprouted)
Despawn();
}
void MoveInLineOfSight(Unit* who)
{
@@ -175,10 +175,7 @@ public:
if (uiDarkOffering <= uiDiff)
{
if (Creature* pFriend = me->FindNearestCreature(me->GetEntry(), 25.0f, true))
{
if (pFriend)
DoCast(pFriend, SPELL_DARK_OFFERING);
}
DoCast(pFriend, SPELL_DARK_OFFERING);
else
DoCast(me, SPELL_DARK_OFFERING);
uiDarkOffering = urand(4400, 12500);
@@ -183,7 +183,7 @@ public:
DoScriptText(SAY_END2, me, player);
Unit* CaptainHelios = me->FindNearestCreature(NPC_CAPTAIN_HELIOS, 50);
if (CaptainHelios)
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player);
break;
}
}