From e107730ffbbe92f2dc98c990478e527030888ff4 Mon Sep 17 00:00:00 2001 From: Spp Date: Sat, 1 May 2010 22:25:14 +0200 Subject: Fix more warnings. --HG-- branch : trunk --- src/game/BattleGroundHandler.cpp | 10 ++++----- src/game/GameEventMgr.cpp | 2 +- src/game/InstanceSaveMgr.cpp | 4 ++-- src/game/ObjectMgr.cpp | 17 +++++++------- src/game/ObjectMgr.h | 4 ++-- src/game/Player.cpp | 2 +- src/game/QueryHandler.cpp | 4 ++-- src/game/SpellAuraEffects.cpp | 2 +- src/game/SpellMgr.cpp | 6 ++--- src/game/Unit.cpp | 26 +++++++++++----------- src/game/Unit.h | 6 ++--- src/game/UnitAI.h | 6 ++--- src/game/World.cpp | 6 ++--- .../eastern_kingdoms/western_plaguelands.cpp | 4 ++-- src/scripts/kalimdor/desolace.cpp | 4 ++-- src/scripts/northrend/grizzly_hills.cpp | 2 +- src/scripts/northrend/naxxramas/boss_grobbulus.cpp | 2 +- src/scripts/northrend/sholazar_basin.cpp | 4 +--- src/scripts/northrend/storm_peaks.cpp | 8 +++---- src/scripts/outland/blades_edge_mountains.cpp | 2 +- src/scripts/world/item_scripts.cpp | 2 +- src/scripts/world/npcs_special.cpp | 2 +- 22 files changed, 61 insertions(+), 64 deletions(-) (limited to 'src') diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 1bd653c2d1c..3e414399e5e 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -161,8 +161,8 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam()); BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId]; - GroupQueueInfo * ginfo; - uint32 avgTime; + GroupQueueInfo * ginfo = NULL; + uint32 avgTime = 0; if (err > 0) { @@ -590,7 +590,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) uint8 arenaslot; // 2v2, 3v3 or 5v5 uint8 asGroup; // asGroup uint8 isRated; // isRated - Group * grp; + Group * grp = NULL; recv_data >> guid >> arenaslot >> asGroup >> isRated; @@ -642,7 +642,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) if (!bracketEntry) return; - GroupJoinBattlegroundResult err; + GroupJoinBattlegroundResult err = ERR_GROUP_JOIN_BATTLEGROUND_FAIL; if (!asGroup) { @@ -704,7 +704,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId]; if (asGroup) { - uint32 avgTime; + uint32 avgTime = 0; if (err > 0) { diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index c285376ffd3..fca5dc83582 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -1682,7 +1682,7 @@ void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id) GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList(); for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr) - if (events[*itr].holiday_id == id) + if (events[*itr].holiday_id == uint32(id)) return true; return false; diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 198152fd62e..cab7850e3f4 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -529,7 +529,7 @@ void InstanceSaveManager::LoadResetTimes() if (t - tim[type-1] > now) break; - ScheduleReset(true, t - tim[type-1], InstResetEvent(type, mapid, difficulty, -1)); + ScheduleReset(true, t - tim[type-1], InstResetEvent(type, mapid, difficulty, 0)); for (ResetTimeMapDiffInstances::const_iterator in_itr = mapDiffResetInstances.lower_bound(map_diff_pair); in_itr != mapDiffResetInstances.upper_bound(map_diff_pair); ++in_itr) @@ -672,7 +672,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b uint64 next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff; SetResetTimeFor(mapid, difficulty, next_reset); - ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, -1)); + ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, 0)); // update it in the DB CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 54ed69417dc..836e3b42790 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -5575,7 +5575,7 @@ WorldSafeLocsEntry const *ObjectMgr::GetClosestGraveYard(float x, float y, float // if find graveyard at different map from where entrance placed (or no entrance data), use any first if (!mapEntry || mapEntry->entrance_map < 0 || - mapEntry->entrance_map != entry->map_id || + uint32(mapEntry->entrance_map) != entry->map_id || (mapEntry->entrance_x == 0 && mapEntry->entrance_y == 0)) { // not have any corrdinates for check distance anyway @@ -5904,16 +5904,15 @@ void ObjectMgr::LoadAccessRequirements() AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const { const MapEntry *mapEntry = sMapStore.LookupEntry(Map); - if (!mapEntry) return NULL; + if (!mapEntry || mapEntry->entrance_map < 0) return NULL; + uint32 entrance_map = uint32(mapEntry->entrance_map); for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr) - { - if (itr->second.target_mapId == mapEntry->entrance_map) + if (itr->second.target_mapId == entrance_map) { AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first); if (atEntry && atEntry->mapid == Map) return &itr->second; } - } return NULL; } @@ -8093,7 +8092,7 @@ void ObjectMgr::LoadMailLevelRewards() sLog.outString(">> Loaded %u level dependent mail rewards,", count); } -bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set *skip_trainers, std::set *talentIds) +bool ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, Field *fields, std::set *skip_trainers, std::set *talentIds) { if (entry >= TRINITY_TRAINER_START_REF) return false; @@ -8181,7 +8180,7 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std:: } return true; } -int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set *skip_trainers, std::set *talentIds) +int ObjectMgr::LoadReferenceTrainer(uint32 trainer, int32 spell, std::set *skip_trainers, std::set *talentIds) { QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell); if (!result) @@ -8196,7 +8195,7 @@ int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set int32 spell = fields[1].GetInt32(); if (spell < 0) count += this->LoadReferenceTrainer(trainer, -spell, skip_trainers, talentIds); - else if (this->AddSpellToTrainer(trainer, spell, fields, skip_trainers, talentIds)) + else if (this->AddSpellToTrainer(trainer, uint32(spell), fields, skip_trainers, talentIds)) ++count; } while (result->NextRow()); @@ -8240,7 +8239,7 @@ void ObjectMgr::LoadTrainerSpell() int32 spell = fields[1].GetInt32(); if (spell < 0) count += this->LoadReferenceTrainer(entry, -spell, &skip_trainers, &talentIds); - else if (this->AddSpellToTrainer(entry, spell, fields, &skip_trainers, &talentIds)) + else if (this->AddSpellToTrainer(entry, uint32(spell), fields, &skip_trainers, &talentIds)) ++count; } while (result->NextRow()); diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index 5101a8ba9f5..ae0ca3101cc 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -693,8 +693,8 @@ class ObjectMgr void LoadVendors(); void LoadTrainerSpell(); - bool AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set *skip_trainers, std::set *talentIds); - int LoadReferenceTrainer(int32 trainer, int32 spell, std::set *skip_trainers, std::set *talentIds); + bool AddSpellToTrainer(uint32 entry, uint32 spell, Field *fields, std::set *skip_trainers, std::set *talentIds); + int LoadReferenceTrainer(uint32 trainer, int32 spell, std::set *skip_trainers, std::set *talentIds); void LoadGMTickets(); std::string GeneratePetName(uint32 entry); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 2863068686d..a4825e0a070 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19726,7 +19726,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it { for (uint8 idx = 0; idx < 5; ++idx) { - if (proto->Spells[idx].SpellId == spellInfo->Id) + if (uint32(proto->Spells[idx].SpellId) == spellInfo->Id) { cat = proto->Spells[idx].SpellCategory; rec = proto->Spells[idx].SpellCooldown; diff --git a/src/game/QueryHandler.cpp b/src/game/QueryHandler.cpp index 91037488927..1067ad49bc4 100644 --- a/src/game/QueryHandler.cpp +++ b/src/game/QueryHandler.cpp @@ -287,11 +287,11 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/) return; } - int32 mapid = corpse->GetMapId(); + uint32 mapid = corpse->GetMapId(); float x = corpse->GetPositionX(); float y = corpse->GetPositionY(); float z = corpse->GetPositionZ(); - int32 corpsemapid = mapid; + uint32 corpsemapid = mapid; // if corpse at different map if (mapid != _player->GetMapId()) diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp index 63b339444af..937a91f554e 100644 --- a/src/game/SpellAuraEffects.cpp +++ b/src/game/SpellAuraEffects.cpp @@ -2341,7 +2341,7 @@ void AuraEffect::CleanupTriggeredSpells(Unit * target) // needed for spell 43680, maybe others // TODO: is there a spell flag, which can solve this in a more sophisticated way? if (m_spellProto->EffectApplyAuraName[GetEffIndex()] == SPELL_AURA_PERIODIC_TRIGGER_SPELL && - GetSpellDuration(m_spellProto) == m_spellProto->EffectAmplitude[GetEffIndex()]) + uint32(GetSpellDuration(m_spellProto)) == m_spellProto->EffectAmplitude[GetEffIndex()]) return; target->RemoveAurasDueToSpell(tSpellId, GetCasterGUID()); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 127fe2152f8..23910ba1d30 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1135,7 +1135,7 @@ void SpellMgr::LoadSpellTargetPositions() if (spellInfo->Effect[i]==SPELL_EFFECT_BIND && spellInfo->EffectMiscValue[i]) { uint32 area_id = MapManager::Instance().GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z); - if (area_id != spellInfo->EffectMiscValue[i]) + if (area_id != uint32(spellInfo->EffectMiscValue[i])) { sLog.outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellInfo->EffectMiscValue[i], area_id); break; @@ -2604,7 +2604,7 @@ void SpellMgr::LoadSpellAreas() continue; } - if (abs(spellArea.auraSpell) == spellArea.spellId) + if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId) { sLog.outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell,abs(spellArea.auraSpell)); continue; @@ -3949,7 +3949,7 @@ bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId); for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) - if (_spell_idx->second->skillId == type) + if (_spell_idx->second->skillId == uint32(type)) return true; return false; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3adc65e77f8..54d0b47dbe5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4250,7 +4250,7 @@ void Unit::RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, ui if (!casterGUID || aura->GetCasterGUID() == casterGUID) { SpellEntry const *spell = aura->GetSpellProto(); - if (spell->SpellFamilyName == family && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3)) + if (spell->SpellFamilyName == uint32(family) && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3)) { RemoveAura(iter); continue; @@ -4441,7 +4441,7 @@ AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 ico if (effIndex != (*itr)->GetEffIndex()) continue; SpellEntry const * spell = (*itr)->GetSpellProto(); - if (spell->SpellIconID == iconId && spell->SpellFamilyName == name && !spell->SpellFamilyFlags) + if (spell->SpellIconID == iconId && spell->SpellFamilyName == uint32(name) && !spell->SpellFamilyFlags) return *itr; } return NULL; @@ -4453,7 +4453,7 @@ AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 f for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i) { SpellEntry const *spell = (*i)->GetSpellProto(); - if (spell->SpellFamilyName == family && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3)) + if (spell->SpellFamilyName == uint32(family) && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3)) { if (casterGUID && (*i)->GetCasterGUID() != casterGUID) continue; @@ -4522,7 +4522,7 @@ bool Unit::HasAuraType(AuraType auraType) const return (!m_modAuras[auraType].empty()); } -bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const +bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const { AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) @@ -4531,7 +4531,7 @@ bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const return false; } -bool Unit::HasAuraTypeWithValue(AuraType auratype, uint32 value) const +bool Unit::HasAuraTypeWithValue(AuraType auratype, int32 value) const { AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) @@ -9076,7 +9076,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply) if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) continue; SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); if (!spellInfo || !IsPassiveSpell(itr->first)) continue; - if (spellInfo->CasterAuraState == flag) + if (spellInfo->CasterAuraState == uint32(flag)) CastSpell(this, itr->first, true, NULL); } } @@ -9088,7 +9088,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply) if (itr->second.state == PETSPELL_REMOVED) continue; SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); if (!spellInfo || !IsPassiveSpell(itr->first)) continue; - if (spellInfo->CasterAuraState == flag) + if (spellInfo->CasterAuraState == uint32(flag)) CastSpell(this, itr->first, true, NULL); } } @@ -9106,7 +9106,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply) for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();) { SpellEntry const* spellProto = (*itr).second->GetBase()->GetSpellProto(); - if (spellProto->CasterAuraState == flag) + if (spellProto->CasterAuraState == uint32(flag)) RemoveAura(itr); else ++itr; @@ -11660,7 +11660,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const if (uint32 mask = (m_detectInvisibilityMask & u->m_invisibilityMask)) { - for (uint32 i = 0; i < 10; ++i) + for (uint8 i = 0; i < 10; ++i) { if (((1 << i) & mask) == 0) continue; @@ -11669,7 +11669,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const uint32 invLevel = 0; Unit::AuraEffectList const& iAuras = u->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY); for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr) - if (((*itr)->GetMiscValue()) == i && invLevel < (*itr)->GetAmount()) + if (uint8((*itr)->GetMiscValue()) == i && invLevel < (*itr)->GetAmount()) invLevel = (*itr)->GetAmount(); // find invisibility detect level @@ -11682,7 +11682,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const { Unit::AuraEffectList const& dAuras = GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION); for (Unit::AuraEffectList::const_iterator itr = dAuras.begin(); itr != dAuras.end(); ++itr) - if (((*itr)->GetMiscValue()) == i && detectLevel < (*itr)->GetAmount()) + if (uint8((*itr)->GetMiscValue()) == i && detectLevel < (*itr)->GetAmount()) detectLevel = (*itr)->GetAmount(); } @@ -13782,12 +13782,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, break; case SPELL_AURA_MECHANIC_IMMUNITY: // Compare mechanic - if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue()) + if (procSpell && procSpell->Mechanic == uint32(triggeredByAura->GetMiscValue())) takeCharges = true; break; case SPELL_AURA_MOD_MECHANIC_RESISTANCE: // Compare mechanic - if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue()) + if (procSpell && procSpell->Mechanic == uint32(triggeredByAura->GetMiscValue())) takeCharges = true; break; case SPELL_AURA_MOD_DAMAGE_FROM_CASTER: diff --git a/src/game/Unit.h b/src/game/Unit.h index 8cc742f4d3f..2c3ff085b38 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -470,7 +470,7 @@ enum UnitState UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_EVADE), UNIT_STAT_CANNOT_AUTOATTACK = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CASTING), UNIT_STAT_CANNOT_TURN = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_ROTATING), - UNIT_STAT_ALL_STATE = 0xffffffff //(UNIT_STAT_STOPPED | UNIT_STAT_MOVING | UNIT_STAT_IN_COMBAT | UNIT_STAT_IN_FLIGHT) + UNIT_STAT_ALL_STATE = uint32(0xffffffff) //(UNIT_STAT_STOPPED | UNIT_STAT_MOVING | UNIT_STAT_IN_COMBAT | UNIT_STAT_IN_FLIGHT) }; enum UnitMoveType @@ -1607,8 +1607,8 @@ class Unit : public WorldObject bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const; bool HasAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0) const; bool HasAuraType(AuraType auraType) const; - bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const; - bool HasAuraTypeWithValue(AuraType auratype, uint32 value) const; + bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const; + bool HasAuraTypeWithValue(AuraType auratype, int32 value) const; bool HasNegativeAuraWithInterruptFlag(uint32 flag); AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const; diff --git a/src/game/UnitAI.h b/src/game/UnitAI.h index 1b207711420..b45e5fad8d8 100644 --- a/src/game/UnitAI.h +++ b/src/game/UnitAI.h @@ -59,11 +59,11 @@ class UnitAI virtual void OnCharmed(bool apply) = 0; // Pass parameters between AI - virtual void DoAction(const int32 param = 0) {} + virtual void DoAction(const int32 /*param*/ = 0) {} virtual uint32 GetData(uint32 /*id = 0*/) { return 0; } virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} - virtual void SetGUID(const uint64 &/*guid*/, int32 id = 0) {} - virtual uint64 GetGUID(int32 id = 0) { return 0; } + virtual void SetGUID(const uint64 &/*guid*/, int32 /*id*/ = 0) {} + virtual uint64 GetGUID(int32 /*id*/ = 0) { return 0; } Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); void SelectTargetList(std::list &targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); diff --git a/src/game/World.cpp b/src/game/World.cpp index 9d00da68c95..6b141057b86 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1711,7 +1711,7 @@ void World::SetInitialWorldSettings() void World::DetectDBCLang() { - uint32 m_lang_confid = sConfig.GetIntDefault("DBC.Locale", 255); + uint8 m_lang_confid = sConfig.GetIntDefault("DBC.Locale", 255); if (m_lang_confid != 255 && m_lang_confid >= MAX_LOCALE) { @@ -1723,8 +1723,8 @@ void World::DetectDBCLang() std::string availableLocalsStr; - int default_locale = MAX_LOCALE; - for (int i = MAX_LOCALE-1; i >= 0; --i) + uint8 default_locale = MAX_LOCALE; + for (uint8 i = default_locale-1; i >= 0; --i) { if (strlen(race->name[i]) > 0) // check by race names { diff --git a/src/scripts/eastern_kingdoms/western_plaguelands.cpp b/src/scripts/eastern_kingdoms/western_plaguelands.cpp index e06274198c6..778bcea0b1e 100644 --- a/src/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/src/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -326,9 +326,9 @@ struct npc_anchorite_truuenAI : public npc_escortAI } } - void EnterCombat(Unit* pWho){} + void EnterCombat(Unit* /*pWho*/){} - void JustDied(Unit* pKiller) + void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); if (pPlayer) diff --git a/src/scripts/kalimdor/desolace.cpp b/src/scripts/kalimdor/desolace.cpp index 2e1d951c3fe..6b3ec8071dd 100644 --- a/src/scripts/kalimdor/desolace.cpp +++ b/src/scripts/kalimdor/desolace.cpp @@ -195,11 +195,11 @@ struct npc_dalindaAI : public npc_escortAI } } - void EnterCombat(Unit* pWho) { } + void EnterCombat(Unit* /*pWho*/) { } void Reset() {} - void JustDied(Unit* pKiller) + void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); if (pPlayer) diff --git a/src/scripts/northrend/grizzly_hills.cpp b/src/scripts/northrend/grizzly_hills.cpp index c5ccc5bb846..4b6d65a9764 100644 --- a/src/scripts/northrend/grizzly_hills.cpp +++ b/src/scripts/northrend/grizzly_hills.cpp @@ -564,7 +564,7 @@ struct npc_wounded_skirmisherAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 /*diff*/) { if (!UpdateVictim()) return; diff --git a/src/scripts/northrend/naxxramas/boss_grobbulus.cpp b/src/scripts/northrend/naxxramas/boss_grobbulus.cpp index e1a1cbb7786..7df01e18483 100644 --- a/src/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/src/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -50,7 +50,7 @@ struct boss_grobbulusAI : public BossAI void SpellHitTarget(Unit *pTarget, const SpellEntry *spell) { - if (spell->Id == SPELL_SLIME_SPRAY) + if (spell->Id == uint32(SPELL_SLIME_SPRAY)) { if (TempSummon *slime = me->SummonCreature(MOB_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0)) DoZoneInCombat(slime); diff --git a/src/scripts/northrend/sholazar_basin.cpp b/src/scripts/northrend/sholazar_basin.cpp index f81a6004fde..b5df8998b4a 100644 --- a/src/scripts/northrend/sholazar_basin.cpp +++ b/src/scripts/northrend/sholazar_basin.cpp @@ -366,11 +366,9 @@ struct npc_engineer_heliceAI : public npc_escortAI { m_uiChatTimer = 4000; } - - void JustDied(Unit* pKiller) + void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); - if (HasEscortState(STATE_ESCORT_ESCORTING)) { if (pPlayer) diff --git a/src/scripts/northrend/storm_peaks.cpp b/src/scripts/northrend/storm_peaks.cpp index 08e5ca7c2d4..9275e24bd2f 100644 --- a/src/scripts/northrend/storm_peaks.cpp +++ b/src/scripts/northrend/storm_peaks.cpp @@ -379,11 +379,11 @@ struct npc_injured_goblinAI : public npc_escortAI } } - void EnterCombat(Unit* pWho) {} + void EnterCombat(Unit* /*pWho*/) {} void Reset() {} - void JustDied(Unit* pKiller) + void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); if (HasEscortState(STATE_ESCORT_ESCORTING) && pPlayer) @@ -419,7 +419,7 @@ bool GossipHello_npc_injured_goblin(Player* pPlayer, Creature* pCreature) return true; } -bool QuestAccept_npc_injured_goblin(Player* pPlayer, Creature* pCreature, Quest const *quest) +bool QuestAccept_npc_injured_goblin(Player* /*pPlayer*/, Creature* pCreature, Quest const *quest) { if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE) DoScriptText(SAY_QUEST_ACCEPT, pCreature); @@ -427,7 +427,7 @@ bool QuestAccept_npc_injured_goblin(Player* pPlayer, Creature* pCreature, Quest return false; } -bool GossipSelect_npc_injured_goblin(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_injured_goblin(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { npc_escortAI* pEscortAI = CAST_AI(npc_injured_goblinAI, pCreature->AI()); diff --git a/src/scripts/outland/blades_edge_mountains.cpp b/src/scripts/outland/blades_edge_mountains.cpp index e675b1b1a05..231a27ccc9a 100644 --- a/src/scripts/outland/blades_edge_mountains.cpp +++ b/src/scripts/outland/blades_edge_mountains.cpp @@ -409,7 +409,7 @@ struct npc_bloodmaul_brutebaneAI : public ScriptedAI OgreGUID = 0; } - void UpdateAI(const uint32 uiDiff) {} + void UpdateAI(const uint32 /*uiDiff*/) {} }; CreatureAI* GetAI_npc_bloodmaul_brutebane(Creature* pCreature) diff --git a/src/scripts/world/item_scripts.cpp b/src/scripts/world/item_scripts.cpp index d87a21a8c95..dbf5f3c1a84 100644 --- a/src/scripts/world/item_scripts.cpp +++ b/src/scripts/world/item_scripts.cpp @@ -393,7 +393,7 @@ enum TheEmissary NPC_LEVIROTH = 26452 }; -bool ItemUse_item_Trident_of_Nazjan(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +bool ItemUse_item_Trident_of_Nazjan(Player* pPlayer, Item* pItem, const SpellCastTargets & /*pTargets*/) { if (pPlayer->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE) { diff --git a/src/scripts/world/npcs_special.cpp b/src/scripts/world/npcs_special.cpp index bc006f0efd7..d3efe0a48c3 100644 --- a/src/scripts/world/npcs_special.cpp +++ b/src/scripts/world/npcs_special.cpp @@ -2337,7 +2337,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) return true; } -bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { switch(uiAction) { -- cgit v1.2.3