mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core: More codestyle cleanups
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ())
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
++SoulChargeCount;
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
hyjal_trashAI::JustDied(victim);
|
||||
if (pInstance && IsEvent)
|
||||
|
||||
@@ -1315,7 +1315,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit *victim)
|
||||
void JustDied(Unit* victim)
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
uiDeathTimer = 30*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void JustDied(Unit *killer)
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) ||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user