Core: More codestyle cleanups

This commit is contained in:
click
2011-06-12 01:47:45 +02:00
parent 158966dc79
commit f16df538ee
87 changed files with 309 additions and 309 deletions

View File

@@ -250,7 +250,7 @@ public:
static bool HandleDebugSendOpcodeCommand(ChatHandler* handler, const char* /*args*/)
{
Unit *unit = handler->getSelectedUnit();
Player *player = NULL;
Player* player = NULL;
if (!unit || (unit->GetTypeId() != TYPEID_PLAYER))
player = handler->GetSession()->GetPlayer();
else

View File

@@ -75,7 +75,7 @@ public:
}
static bool HandleHonorAddKillCommand(ChatHandler* handler, const char* /*args*/)
{
Unit *target = handler->getSelectedUnit();
Unit* target = handler->getSelectedUnit();
if (!target)
{
handler->SendSysMessage(LANG_PLAYER_NOT_FOUND);

View File

@@ -495,7 +495,7 @@ public:
//npc follow handling
static bool HandleNpcFollowCommand(ChatHandler* handler, const char* /*args*/)
{
Player *player = handler->GetSession()->GetPlayer();
Player* player = handler->GetSession()->GetPlayer();
Creature *creature = handler->getSelectedCreature();
if (!creature)
@@ -986,7 +986,7 @@ public:
//npc unfollow handling
static bool HandleNpcUnFollowCommand(ChatHandler* handler, const char* /*args*/)
{
Player *player = handler->GetSession()->GetPlayer();
Player* player = handler->GetSession()->GetPlayer();
Creature *creature = handler->getSelectedCreature();
if (!creature)
@@ -1101,7 +1101,7 @@ public:
return false;
}
Player *player = handler->GetSession()->GetPlayer ();
Player* player = handler->GetSession()->GetPlayer ();
if (player->GetPetGUID ())
{

View File

@@ -57,7 +57,7 @@ public:
if (!*args)
return false;
Player *player = handler->GetSession()->GetPlayer();
Player* player = handler->GetSession()->GetPlayer();
if (!player)
return false;
@@ -187,7 +187,7 @@ public:
if (!*args)
return false;
Player *player = handler->getSelectedPlayer();
Player* player = handler->getSelectedPlayer();
if (!player)
{
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);

View File

@@ -710,7 +710,7 @@ public:
me->EnterVehicle(deathcharger);
}
void JustDied(Unit *killer)
void JustDied(Unit* killer)
{
Creature* deathcharger = me->FindNearestCreature(28782, 30);
if (!deathcharger) return;

View File

@@ -97,7 +97,7 @@ public:
{
if (me->getVictim()->GetTypeId() == TYPEID_PLAYER)
{
Unit *victim = me->getVictim();
Unit* victim = me->getVictim();
if (CAST_PLR(victim)->GetTeam() == HORDE)
{
me->CombatStop();

View File

@@ -134,7 +134,7 @@ public:
}
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
hyjal_trashAI::JustDied(victim);
if (pInstance && IsEvent)

View File

@@ -334,7 +334,7 @@ public:
++SoulChargeCount;
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
hyjal_trashAI::JustDied(victim);
DoScriptText(SAY_DEATH, me);

View File

@@ -127,7 +127,7 @@ public:
}
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
hyjal_trashAI::JustDied(victim);
if (pInstance && IsEvent)

View File

@@ -122,7 +122,7 @@ public:
}
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
hyjal_trashAI::JustDied(victim);
if (pInstance && IsEvent)

View File

@@ -118,7 +118,7 @@ public:
}
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
hyjal_trashAI::JustDied(victim);
if (pInstance && IsEvent)

View File

@@ -1315,7 +1315,7 @@ public:
}
}
void JustDied(Unit *victim)
void JustDied(Unit* victim)
{
float x, y, z;
me->GetPosition(x, y, z);

View File

@@ -317,7 +317,7 @@ public:
pInstance->SetData(0, NOT_STARTED);*/
}
void AttackStart(Unit *victim)
void AttackStart(Unit* victim)
{
AttackStartCaster(victim, 10);//keep back & toss bombs/shoot
}

View File

@@ -182,7 +182,7 @@ public:
switch(uiImpalePhase)
{
case IMPALE_PHASE_TARGET:
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SHAKEGROUND, true);
@@ -312,7 +312,7 @@ public:
if (uiPoundTimer <= diff)
{
if (Unit *target = me->getVictim())
if (Unit* target = me->getVictim())
{
if (Creature *pImpaleTarget = DoSummonImpaleTarget(target))
me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false);

View File

@@ -183,7 +183,7 @@ public:
uiDeathTimer = 30*IN_MILLISECONDS;
}
void JustDied(Unit *killer)
void JustDied(Unit* killer)
{
if (!killer)
return;

View File

@@ -381,7 +381,7 @@ struct boss_faction_championsAI : public ScriptedAI
{
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator iter;
Unit *target;
Unit* target;
for (iter = tList.begin(); iter!=tList.end(); ++iter)
{
target = Unit::GetUnit((*me), (*iter)->getUnitGuid());
@@ -396,7 +396,7 @@ struct boss_faction_championsAI : public ScriptedAI
std::list<HostileReference*> const& tList = me->getThreatManager().getThreatList();
std::list<HostileReference*>::const_iterator iter;
uint32 count = 0;
Unit *target;
Unit* target;
for (iter = tList.begin(); iter!=tList.end(); ++iter)
{
target = Unit::GetUnit((*me), (*iter)->getUnitGuid());

View File

@@ -166,7 +166,7 @@ class boss_devourer_of_souls : public CreatureScript
{
if (mirroredSoulTarget && me->HasAura(SPELL_MIRRORED_SOUL))
{
if (Player *player = Unit::GetPlayer(*me, mirroredSoulTarget))
if (Player* player = Unit::GetPlayer(*me, mirroredSoulTarget))
{
if (player->GetAura(SPELL_MIRRORED_SOUL))
{

View File

@@ -240,7 +240,7 @@ class boss_tyrannus : public CreatureScript
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(25000, 27000));
break;
case EVENT_OVERLORD_BRAND:
if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
DoCast(target, SPELL_OVERLORD_BRAND);
events.ScheduleEvent(EVENT_OVERLORD_BRAND, urand(11000, 12000));
break;

View File

@@ -283,7 +283,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
me->SetFlying(false);
me->SendMovementFlagUpdate();
me->SetReactState(REACT_AGGRESSIVE);
if (Unit *victim = me->SelectVictim())
if (Unit* victim = me->SelectVictim())
AttackStart(victim);
events.ScheduleEvent(EVENT_BLOOD_MIRROR, 2500, EVENT_GROUP_CANCELLABLE);
break;

View File

@@ -791,7 +791,7 @@ class npc_rimefang : public CreatureScript
}
_events.ScheduleEvent(EVENT_ICY_BLAST_CAST, 3000);
}
else if (Unit *victim = me->SelectVictim())
else if (Unit* victim = me->SelectVictim())
{
me->SetReactState(REACT_DEFENSIVE);
AttackStart(victim);

View File

@@ -167,14 +167,14 @@ public:
{
victimGUID = guid;
if (me->m_spells[0] && victimGUID)
if (Unit *victim = Unit::GetUnit(*me, victimGUID))
if (Unit* victim = Unit::GetUnit(*me, victimGUID))
victim->CastSpell(victim, me->m_spells[0], true, NULL, NULL, me->GetGUID());
}
void JustDied(Unit* /*killer*/)
{
if (me->m_spells[0] && victimGUID)
if (Unit *victim = Unit::GetUnit(*me, victimGUID))
if (Unit* victim = Unit::GetUnit(*me, victimGUID))
victim->RemoveAurasDueToSpell(me->m_spells[0], me->GetGUID());
}
};

View File

@@ -89,7 +89,7 @@ public:
void AttackStart(Unit* /*who*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void JustDied(Unit *killer)
void JustDied(Unit* killer)
{
if (killer->GetGUID() != me->GetGUID())
ShatterFrostTomb = true;

View File

@@ -304,7 +304,7 @@ public:
if (pInstance && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
{
Unit *victim = NULL;
Unit* victim = NULL;
victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
if (victim)
me->getThreatManager().addThreat(victim, 1);
@@ -738,7 +738,7 @@ public:
if (!me->isInCombat() && pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
{
Unit *victim = NULL;
Unit* victim = NULL;
victim = Unit::GetUnit(*me, pInstance->GetData64(DATA_LEOTHERAS_EVENT_STARTER));
if (victim)
AttackStart(victim);

View File

@@ -262,7 +262,7 @@ class boss_vazruden : public CreatureScript
if (Revenge_Timer <= diff)
{
if (Unit *victim = me->getVictim())
if (Unit* victim = me->getVictim())
DoCast(victim, DUNGEON_MODE(SPELL_REVENGE, SPELL_REVENGE_H));
Revenge_Timer = 5000;
}
@@ -493,7 +493,7 @@ class mob_hellfire_sentry : public CreatureScript
if (KidneyShot_Timer <= diff)
{
if (Unit *victim = me->getVictim())
if (Unit* victim = me->getVictim())
DoCast(victim, SPELL_KIDNEY_SHOT);
KidneyShot_Timer = 20000;
}

View File

@@ -55,14 +55,14 @@ public:
}
}
void OnChat(Player *player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player *receiver)
void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Player* receiver)
{
if (sWorld->getBoolConfig(CONFIG_CHATLOG_WHISPER))
sLog->outChat("[WHISPER] Player %s tells %s: %s",
player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg.c_str());
}
void OnChat(Player *player, uint32 type, uint32 /*lang*/, std::string& msg, Group *group)
void OnChat(Player* player, uint32 type, uint32 /*lang*/, std::string& msg, Group* group)
{
switch (type)
{
@@ -110,7 +110,7 @@ public:
}
}
void OnChat(Player *player, uint32 type, uint32 lang, std::string& msg, Guild *guild)
void OnChat(Player* player, uint32 type, uint32 lang, std::string& msg, Guild* guild)
{
switch(type)
{
@@ -131,7 +131,7 @@ public:
}
}
void OnChat(Player *player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel *channel)
void OnChat(Player* player, uint32 /*type*/, uint32 /*lang*/, std::string& msg, Channel* channel)
{
bool isSystem = channel &&
(channel->HasFlag(CHANNEL_FLAG_TRADE) ||

View File

@@ -211,7 +211,7 @@ public:
struct trigger_deathAI : public NullCreatureAI
{
trigger_deathAI(Creature* c) : NullCreatureAI(c) {}
void JustDied(Unit *killer)
void JustDied(Unit* killer)
{
if (me->m_spells[0])
me->CastSpell(killer, me->m_spells[0], true);