Core: Fix some warnings
--HG-- branch : trunk
This commit is contained in:
@@ -2135,7 +2135,6 @@ LfgReward const* LFGMgr::GetRandomDungeonReward(uint32 dungeon, uint8 level)
|
|||||||
{
|
{
|
||||||
LfgReward const* rew = NULL;
|
LfgReward const* rew = NULL;
|
||||||
LfgRewardMapBounds bounds = m_RewardMap.equal_range(dungeon & 0x00FFFFFF);
|
LfgRewardMapBounds bounds = m_RewardMap.equal_range(dungeon & 0x00FFFFFF);
|
||||||
uint8 index = 0;
|
|
||||||
for (LfgRewardMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
for (LfgRewardMap::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||||
{
|
{
|
||||||
rew = itr->second;
|
rew = itr->second;
|
||||||
@@ -2199,4 +2198,4 @@ std::string LFGMgr::ConcatenateGuids(LfgGuidList check)
|
|||||||
o << "|" << *it;
|
o << "|" << *it;
|
||||||
guidSet.clear();
|
guidSet.clear();
|
||||||
return o.str();
|
return o.str();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ class LFGMgr
|
|||||||
void LoadDungeonEncounters();
|
void LoadDungeonEncounters();
|
||||||
void LoadRewards();
|
void LoadRewards();
|
||||||
void RewardDungeonDoneFor(const uint32 dungeonId, Player* player);
|
void RewardDungeonDoneFor(const uint32 dungeonId, Player* player);
|
||||||
const uint32 GetDungeonIdForAchievement(uint32 achievementId)
|
uint32 GetDungeonIdForAchievement(uint32 achievementId)
|
||||||
{
|
{
|
||||||
std::map<uint32, uint32>::iterator itr = m_EncountersByAchievement.find(achievementId);
|
std::map<uint32, uint32>::iterator itr = m_EncountersByAchievement.find(achievementId);
|
||||||
if (itr != m_EncountersByAchievement.end())
|
if (itr != m_EncountersByAchievement.end())
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ static bool procPrepared = InitTriggerAuraData();
|
|||||||
Unit::Unit(): WorldObject(),
|
Unit::Unit(): WorldObject(),
|
||||||
m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false),
|
m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false),
|
||||||
m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
|
m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
|
||||||
m_removedAurasCount(0), m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
|
m_removedAurasCount(0), m_vehicle(NULL), i_motionMaster(this), m_vehicleKit(NULL),
|
||||||
m_ThreatManager(this), i_motionMaster(this), m_HostileRefManager(this)
|
m_ThreatManager(this), m_unitTypeMask(UNIT_MASK_NONE), m_HostileRefManager(this)
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(default:4355)
|
#pragma warning(default:4355)
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ public:
|
|||||||
virtual void OnTextEmote(Player* /*player*/, uint32 /*text_emote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { }
|
virtual void OnTextEmote(Player* /*player*/, uint32 /*text_emote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { }
|
||||||
|
|
||||||
// Called in Spell::cast
|
// Called in Spell::cast
|
||||||
virtual void OnSpellCast(Player *player, Spell *spell, bool skipCheck) { }
|
virtual void OnSpellCast(Player * /*player*/, Spell * /*spell*/, bool /*skipCheck*/) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuildScript : public ScriptObject
|
class GuildScript : public ScriptObject
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ class npc_stinky_icc : public CreatureScript
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* who)
|
void JustDied(Unit* /*who*/)
|
||||||
{
|
{
|
||||||
uint64 festergutGUID = pInstance ? pInstance->GetData64(DATA_FESTERGUT) : 0;
|
uint64 festergutGUID = pInstance ? pInstance->GetData64(DATA_FESTERGUT) : 0;
|
||||||
if (Creature *festergut = me->GetCreature(*me, festergutGUID))
|
if (Creature *festergut = me->GetCreature(*me, festergutGUID))
|
||||||
@@ -329,7 +329,7 @@ class spell_festergut_pungent_blight : public SpellScriptLoader
|
|||||||
|
|
||||||
class spell_festergut_pungent_blight_SpellScript : public SpellScript
|
class spell_festergut_pungent_blight_SpellScript : public SpellScript
|
||||||
{
|
{
|
||||||
void HandleScript(SpellEffIndex effIndex)
|
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(GetEffectValue());
|
SpellEntry const* spellInfo = sSpellStore.LookupEntry(GetEffectValue());
|
||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
@@ -362,7 +362,7 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader
|
|||||||
|
|
||||||
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
|
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
|
||||||
{
|
{
|
||||||
void HandleScript(SpellEffIndex effIndex)
|
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id);
|
Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id);
|
||||||
if (!(aura && aura->GetStackAmount() == 10))
|
if (!(aura && aura->GetStackAmount() == 10))
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class spell_stinky_precious_decimate : public SpellScriptLoader
|
|||||||
|
|
||||||
class spell_stinky_precious_decimate_SpellScript : public SpellScript
|
class spell_stinky_precious_decimate_SpellScript : public SpellScript
|
||||||
{
|
{
|
||||||
void HandleScript(SpellEffIndex effIndex)
|
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
if (GetHitUnit()->GetHealthPct() > float(GetEffectValue()))
|
if (GetHitUnit()->GetHealthPct() > float(GetEffectValue()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
uiSaurfangTeleport = 0;
|
uiSaurfangTeleport = 0;
|
||||||
memset(uiPutricidePipes, 0, 2*sizeof(uint32));
|
memset(uiPutricidePipes, 0, 2*sizeof(uint32));
|
||||||
memset(uiPutricideGates, 0, 2*sizeof(uint32));
|
memset(uiPutricideGates, 0, 2*sizeof(uint32));
|
||||||
uiPutricideCollision;
|
uiPutricideCollision = 0;
|
||||||
uiFestergut = 0;
|
uiFestergut = 0;
|
||||||
uiRotface = 0;
|
uiRotface = 0;
|
||||||
uiProfessorPutricide = 0;
|
uiProfessorPutricide = 0;
|
||||||
|
|||||||
@@ -541,19 +541,19 @@ public:
|
|||||||
|
|
||||||
uint32 spellId = 0;
|
uint32 spellId = 0;
|
||||||
uint32 rand = urand(0, 100);
|
uint32 rand = urand(0, 100);
|
||||||
if (rand >= 0 && rand < 25) // Fireball (25% chance)
|
if (rand < 25) // Fireball (25% chance)
|
||||||
spellId = SPELL_FIREBALL;
|
spellId = SPELL_FIREBALL;
|
||||||
else if (rand >= 25 && rand < 50) // Frostball (25% chance)
|
else if (rand < 50) // Frostball (25% chance)
|
||||||
spellId = SPELL_FROSTBOLT;
|
spellId = SPELL_FROSTBOLT;
|
||||||
else if (rand >= 50 && rand < 70) // Chain Lighting (20% chance)
|
else if (rand < 70) // Chain Lighting (20% chance)
|
||||||
spellId = SPELL_CHAIN_LIGHTNING;
|
spellId = SPELL_CHAIN_LIGHTNING;
|
||||||
else if (rand >= 70 && rand < 80) // Polymorph (10% chance)
|
else if (rand < 80) // Polymorph (10% chance)
|
||||||
{
|
{
|
||||||
spellId = SPELL_POLYMORPH;
|
spellId = SPELL_POLYMORPH;
|
||||||
if (urand(0, 100) <= 30) // 30% chance to self-cast
|
if (urand(0, 100) <= 30) // 30% chance to self-cast
|
||||||
pTarget = pCaster;
|
pTarget = pCaster;
|
||||||
}
|
}
|
||||||
else if (rand >=80 && rand < 95) // Enveloping Winds (15% chance)
|
else if (rand < 95) // Enveloping Winds (15% chance)
|
||||||
spellId = SPELL_ENVELOPING_WINDS;
|
spellId = SPELL_ENVELOPING_WINDS;
|
||||||
else // Summon Felhund minion (5% chance)
|
else // Summon Felhund minion (5% chance)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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))
|
if (sWorld.getBoolConfig(CONFIG_CHATLOG_WHISPER))
|
||||||
sLog.outChat("[WHISPER] Player %s tells %s: %s",
|
sLog.outChat("[WHISPER] Player %s tells %s: %s",
|
||||||
player->GetName(), receiver ? receiver->GetName() : "<unknown>", msg.c_str());
|
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)
|
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 &&
|
bool isSystem = channel &&
|
||||||
(channel->HasFlag(CHANNEL_FLAG_TRADE) ||
|
(channel->HasFlag(CHANNEL_FLAG_TRADE) ||
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
PreparedStatement::PreparedStatement(uint32 index) :
|
PreparedStatement::PreparedStatement(uint32 index) :
|
||||||
m_index(index),
|
m_stmt(NULL),
|
||||||
m_stmt(NULL)
|
m_index(index)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ m_bind(NULL)
|
|||||||
memset(m_bind, 0, sizeof(MYSQL_BIND)*m_paramCount);
|
memset(m_bind, 0, sizeof(MYSQL_BIND)*m_paramCount);
|
||||||
|
|
||||||
/// "If set to 1, causes mysql_stmt_store_result() to update the metadata MYSQL_FIELD->max_length value."
|
/// "If set to 1, causes mysql_stmt_store_result() to update the metadata MYSQL_FIELD->max_length value."
|
||||||
my_bool bool_tmp = 1;
|
my_bool bool_tmp = 1;
|
||||||
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &bool_tmp);
|
mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &bool_tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user