Core: Remove a few warnings (unused variables), clean up tabs whitespaces

This commit is contained in:
click
2011-06-23 09:13:58 +02:00
parent 33f3397976
commit f7b0e58a14
8 changed files with 23 additions and 23 deletions
@@ -411,7 +411,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
/** This is a series of callbacks executed consecutively as a result from the database becomes available. /** This is a series of callbacks executed consecutively as a result from the database becomes available.
This is much more efficient than synchronous requests on packet handler, and much less DoS prone. This is much more efficient than synchronous requests on packet handler, and much less DoS prone.
It also prevents data syncrhonisation errors. It also prevents data syncrhonisation errors.
*/ */
switch (createInfo->Stage) switch (createInfo->Stage)
{ {
case 0: case 0:
@@ -427,7 +427,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
return; return;
} }
ASSERT(_charCreateCallback.GetParam() == createInfo); ASSERT(_charCreateCallback.GetParam() == createInfo);
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_SUM_REALMCHARS); PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_SUM_REALMCHARS);
stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(0, GetAccountId());
@@ -462,7 +462,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
} }
ASSERT(_charCreateCallback.GetParam() == createInfo); ASSERT(_charCreateCallback.GetParam() == createInfo);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_SUM_CHARS); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_SUM_CHARS);
stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(0, GetAccountId());
@@ -494,7 +494,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER; bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS); uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
_charCreateCallback.FreeResult(); _charCreateCallback.FreeResult();
if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT)
+1 -1
View File
@@ -944,7 +944,7 @@ void WorldSession::SetPlayer(Player *plr)
void WorldSession::InitializeQueryCallbackParameters() void WorldSession::InitializeQueryCallbackParameters()
{ {
// Callback parameters that have pointers in them should be properly // Callback parameters that have pointers in them should be properly
// initialized to NULL here. // initialized to NULL here.
_charCreateCallback.SetParam(NULL); _charCreateCallback.SetParam(NULL);
} }
+3 -3
View File
@@ -181,8 +181,8 @@ class CharacterCreateInfo
friend class Player; friend class Player;
protected: protected:
CharacterCreateInfo(std::string name, uint8 race, uint8 cclass, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId, CharacterCreateInfo(std::string name, uint8 race, uint8 cclass, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId,
WorldPacket& data) : Name(name), Race(race), Class(cclass), Gender(gender), Skin(skin), Face(face), HairStyle(hairStyle), HairColor(hairColor), FacialHair(facialHair), WorldPacket& data) : Name(name), Race(race), Class(cclass), Gender(gender), Skin(skin), Face(face), HairStyle(hairStyle), HairColor(hairColor), FacialHair(facialHair),
OutfitId(outfitId), Data(data), CharCount(0), Stage(0) OutfitId(outfitId), Data(data), CharCount(0), Stage(0)
{} {}
@@ -921,7 +921,7 @@ class WorldSession
{ {
return _allowedCharsToLogin.find(lowGUID) != _allowedCharsToLogin.end(); return _allowedCharsToLogin.find(lowGUID) != _allowedCharsToLogin.end();
} }
// this stores the GUIDs of the characters who can login // this stores the GUIDs of the characters who can login
// characters who failed on Player::BuildEnumData shouldn't login // characters who failed on Player::BuildEnumData shouldn't login
std::set<uint32> _allowedCharsToLogin; std::set<uint32> _allowedCharsToLogin;
@@ -42,7 +42,7 @@ class Aura;
// //
// in aura handler there should be check for modes: // in aura handler there should be check for modes:
// AURA_EFFECT_HANDLE_REAL set // AURA_EFFECT_HANDLE_REAL set
// AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set // AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK set
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK set - aura is recalculated or is just applied/removed - need to redo all things related to m_amount // AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK set - aura is recalculated or is just applied/removed - need to redo all things related to m_amount
// AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK - logical or of above conditions // AURA_EFFECT_HANDLE_CHANGE_AMOUNT_SEND_FOR_CLIENT_MASK - logical or of above conditions
// AURA_EFFECT_HANDLE_STAT - set when stats are reapplied // AURA_EFFECT_HANDLE_STAT - set when stats are reapplied
@@ -850,7 +850,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool create, bool load)
// reset periodic timer on aura create or on reapply when aura isn't dot // reset periodic timer on aura create or on reapply when aura isn't dot
// possibly we should not reset periodic timers only when aura is triggered by proc // possibly we should not reset periodic timers only when aura is triggered by proc
// or maybe there's a spell attribute somewhere // or maybe there's a spell attribute somewhere
bool resetPeriodicTimer = create bool resetPeriodicTimer = create
|| ((GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE) && (GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE_PERCENT)); || ((GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE) && (GetAuraType() != SPELL_AURA_PERIODIC_DAMAGE_PERCENT));
if (resetPeriodicTimer) if (resetPeriodicTimer)
@@ -5409,7 +5409,7 @@ void AuraEffect::HandleAuraLinked(AuraApplication const* aurApp, uint8 mode, boo
else if (mode & AURA_EFFECT_HANDLE_REAPPLY && apply) else if (mode & AURA_EFFECT_HANDLE_REAPPLY && apply)
{ {
uint64 casterGUID = IsSpellRequiringFocusedTarget(GetSpellProto()) ? GetCasterGUID() : target->GetGUID(); uint64 casterGUID = IsSpellRequiringFocusedTarget(GetSpellProto()) ? GetCasterGUID() : target->GetGUID();
// change the stack amount to be equal to stack amount of our aura // change the stack amount to be equal to stack amount of our aura
if (Aura* triggeredAura = target->GetAura(triggeredSpellId, casterGUID)) if (Aura* triggeredAura = target->GetAura(triggeredSpellId, casterGUID))
triggeredAura->ModStackAmount(GetBase()->GetStackAmount() - triggeredAura->GetStackAmount()); triggeredAura->ModStackAmount(GetBase()->GetStackAmount() - triggeredAura->GetStackAmount());
@@ -75,13 +75,13 @@ class boss_rajaxx : public CreatureScript
events.ScheduleEvent(EVENT_THUNDERCRASH, 12000); events.ScheduleEvent(EVENT_THUNDERCRASH, 12000);
} }
void JustDied(Unit* killer) void JustDied(Unit* /*killer*/)
{ {
//SAY_DEATH //SAY_DEATH
_JustDied(); _JustDied();
} }
void EnterCombat(Unit* victim) void EnterCombat(Unit* /*victim*/)
{ {
_EnterCombat(); _EnterCombat();
} }
@@ -872,7 +872,7 @@ class spell_pool_of_tar : public CreatureScript
me->CastSpell(me, SPELL_BLAZE, true); me->CastSpell(me, SPELL_BLAZE, true);
} }
void UpdateAI(uint32 const diff) {} void UpdateAI(uint32 const /*diff*/) {}
}; };
CreatureAI* GetAI(Creature* creature) const CreatureAI* GetAI(Creature* creature) const
@@ -449,7 +449,7 @@ class spell_ignis_slag_pot : public SpellScriptLoader
aurEffCaster->CastSpell(target, SPELL_SLAG_POT_DAMAGE, true); aurEffCaster->CastSpell(target, SPELL_SLAG_POT_DAMAGE, true);
} }
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
if (GetTarget()->isAlive()) if (GetTarget()->isAlive())
GetTarget()->CastSpell(GetTarget(), SPELL_SLAG_IMBUED, true); GetTarget()->CastSpell(GetTarget(), SPELL_SLAG_IMBUED, true);
@@ -314,7 +314,7 @@ class boss_xt002 : public CreatureScript
// Need this so we can properly determine when to expose heart again in damagetaken hook // Need this so we can properly determine when to expose heart again in damagetaken hook
if (me->GetHealthPct() > (25 * (4 - _heartExposed))) if (me->GetHealthPct() > (25 * (4 - _heartExposed)))
++_heartExposed; ++_heartExposed;
_healthRecovered = true; _healthRecovered = true;
} }
} }
@@ -453,7 +453,7 @@ class mob_xt002_heart : public CreatureScript
{ {
xt002->AI()->SetData(DATA_TRANSFERED_HEALTH, me->GetMaxHealth()); xt002->AI()->SetData(DATA_TRANSFERED_HEALTH, me->GetMaxHealth());
xt002->AI()->DoAction(ACTION_ENTER_HARD_MODE); xt002->AI()->DoAction(ACTION_ENTER_HARD_MODE);
damage = 0; damage = 0;
} }
} }
@@ -576,14 +576,14 @@ class mob_pummeller : public CreatureScript
DoCast(me->getVictim(), SPELL_TRAMPLE); DoCast(me->getVictim(), SPELL_TRAMPLE);
_trampleTimer = TIMER_TRAMPLE; _trampleTimer = TIMER_TRAMPLE;
} }
else else
_trampleTimer -= diff; _trampleTimer -= diff;
if (_uppercutTimer <= diff) if (_uppercutTimer <= diff)
{ {
DoCast(me->getVictim(), SPELL_UPPERCUT); DoCast(me->getVictim(), SPELL_UPPERCUT);
_uppercutTimer = TIMER_UPPERCUT; _uppercutTimer = TIMER_UPPERCUT;
} }
else else
_uppercutTimer -= diff; _uppercutTimer -= diff;
} }
@@ -686,7 +686,7 @@ class mob_boombot : public CreatureScript
} }
} }
void UpdateAI(uint32 const diff) void UpdateAI(uint32 const /*diff*/)
{ {
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
@@ -719,7 +719,7 @@ class mob_life_spark : public CreatureScript
struct mob_life_sparkAI : public ScriptedAI struct mob_life_sparkAI : public ScriptedAI
{ {
mob_life_sparkAI(Creature* pCreature) : ScriptedAI(pCreature) mob_life_sparkAI(Creature* pCreature) : ScriptedAI(pCreature)
{ {
} }
void Reset() void Reset()
@@ -1033,7 +1033,7 @@ class achievement_nerf_engineering : public AchievementCriteriaScript
{ {
if (!target || !target->GetAI()) if (!target || !target->GetAI())
return false; return false;
return !(target->GetAI()->GetData(DATA_HEALTH_RECOVERED)); return !(target->GetAI()->GetData(DATA_HEALTH_RECOVERED));
} }
}; };
@@ -1057,7 +1057,7 @@ class achievement_nerf_gravity_bombs : public AchievementCriteriaScript
public: public:
achievement_nerf_gravity_bombs() : AchievementCriteriaScript("achievement_nerf_gravity_bombs") { } achievement_nerf_gravity_bombs() : AchievementCriteriaScript("achievement_nerf_gravity_bombs") { }
bool OnCheck(Player* source, Unit* target) bool OnCheck(Player* /*source*/, Unit* target)
{ {
if (!target || !target->GetAI()) if (!target || !target->GetAI())
return false; return false;