Fix a lot of warnings

This commit is contained in:
Spp committed 2012-02-16 13:56:28 +01:00
1 parent e47ec04b4d
commit 03c34ee507
38 files changed
+88 -98

No files matched your search

+1 -1
View File
@@ -1042,7 +1042,7 @@ public:
return true;
}
static bool HandleDebugLoSCommand(ChatHandler* handler, char const* args)
static bool HandleDebugLoSCommand(ChatHandler* handler, char const* /*args*/)
{
if (Unit* unit = handler->getSelectedUnit())
handler->PSendSysMessage("Unit %s (GuidLow: %u) is %sin LoS", unit->GetName(), unit->GetGUIDLow(), handler->GetSession()->GetPlayer()->IsWithinLOSInMap(unit) ? "" : "not ");
@@ -308,7 +308,7 @@ struct boss_twin_baseAI : public ScriptedAI
void EnableDualWield(bool mode = true)
{
SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : EQUIP_UNEQUIP, EQUIP_UNEQUIP);
SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
me->SetCanDualWield(mode);
me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK);
}
@@ -739,7 +739,7 @@ class npc_simon_bunny : public CreatureScript
if (!listening)
return;
uint8 pressedColor;
uint8 pressedColor = SIMON_MAX_COLORS;
if (type == clusterIds[SIMON_RED])
pressedColor = SIMON_RED;
@@ -974,7 +974,7 @@ class npc_simon_bunny : public CreatureScript
// Handles the spell rewards. The spells also have the QuestCompleteEffect, so quests credits are working.
void GiveRewardForLevel(uint8 level)
{
uint32 rewSpell;
uint32 rewSpell = 0;
switch (level)
{
case 6:
@@ -989,8 +989,6 @@ class npc_simon_bunny : public CreatureScript
case 10:
rewSpell = SPELL_REWARD_BUFF_3;
break;
default:
rewSpell = 0;
}
if (rewSpell)
+6 -4
View File
@@ -1521,7 +1521,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
if (group && group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
if (dungeon->map == map->GetId() && dungeon->difficulty == map->GetDifficulty())
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon
@@ -1706,6 +1706,8 @@ class spell_gen_break_shield: public SpellScriptLoader
}
break;
}
default:
break;
}
}
@@ -1834,7 +1836,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
}
}
void HandleChargeEffect(SpellEffIndex effIndex)
void HandleChargeEffect(SpellEffIndex /*effIndex*/)
{
uint32 spellId;
@@ -1908,7 +1910,7 @@ class spell_gen_defend : public SpellScriptLoader
void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
if (GetCaster())
{
Unit* target = GetTarget();
@@ -1989,7 +1991,7 @@ class spell_gen_tournament_duel : public SpellScriptLoader
return true;
}
void HandleScriptEffect(SpellEffIndex effIndex)
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* rider = GetCaster()->GetCharmer())
{