Core/Misc: fix warning and misc codestyle fixes

(cherry picked from commit 3b90b0368a)
This commit is contained in:
MitchesD
2015-11-26 19:28:53 +01:00
parent bac8c4376f
commit 43d5d118b2
5 changed files with 8 additions and 8 deletions

View File

@@ -248,7 +248,7 @@ class SmartScript
void DecPhase(int32 p = 1)
{
if(mEventPhase > (uint32)p)
if (mEventPhase > (uint32)p)
mEventPhase -= (uint32)p;
else
mEventPhase = 0;

View File

@@ -13985,7 +13985,7 @@ void Unit::SetFeared(bool apply)
}
if (Player* player = ToPlayer())
if(!player->HasUnitState(UNIT_STATE_POSSESSED))
if (!player->HasUnitState(UNIT_STATE_POSSESSED))
player->SetClientControl(this, !apply);
}

View File

@@ -155,7 +155,7 @@ public:
void KilledUnit(Unit* victim) override
{
if(victim->GetTypeId() == TYPEID_PLAYER)
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_SLAY);
}

View File

@@ -186,7 +186,7 @@ public:
void Reset() override
{
if(events.IsInPhase(PHASE_TRANSITION) || (events.IsInPhase(PHASE_THADDIUS) && me->IsAlive()))
if (events.IsInPhase(PHASE_TRANSITION) || (events.IsInPhase(PHASE_THADDIUS) && me->IsAlive()))
BeginResetEncounter();
}
@@ -640,7 +640,7 @@ public:
void UpdateAI(uint32 uiDiff) override
{
if(!isFeignDeath)
if (!isFeignDeath)
if (!UpdateVictim())
return;
@@ -657,7 +657,7 @@ public:
else
powerSurgeTimer -= uiDiff;
if(!isFeignDeath)
if (!isFeignDeath)
DoMeleeAttackIfReady();
}
@@ -825,7 +825,7 @@ public:
void KilledUnit(Unit* victim) override
{
if(victim->GetTypeId() == TYPEID_PLAYER)
if (victim->GetTypeId() == TYPEID_PLAYER)
Talk(SAY_FEUGEN_SLAY);
}

View File

@@ -188,7 +188,7 @@ class instance_naxxramas : public InstanceMapScript
AddMinion(creature, false);
}
void ProcessEvent(WorldObject* source, uint32 eventId) override
void ProcessEvent(WorldObject* /*source*/, uint32 eventId) override
{
switch (eventId)
{