Fix more warnings.

--HG--
branch : trunk
This commit is contained in:
Spp
2010-05-01 22:25:14 +02:00
parent dd9485993b
commit e107730ffb
22 changed files with 61 additions and 64 deletions
+5 -5
View File
@@ -161,8 +161,8 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam()); isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam());
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId]; BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
GroupQueueInfo * ginfo; GroupQueueInfo * ginfo = NULL;
uint32 avgTime; uint32 avgTime = 0;
if (err > 0) if (err > 0)
{ {
@@ -590,7 +590,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
uint8 arenaslot; // 2v2, 3v3 or 5v5 uint8 arenaslot; // 2v2, 3v3 or 5v5
uint8 asGroup; // asGroup uint8 asGroup; // asGroup
uint8 isRated; // isRated uint8 isRated; // isRated
Group * grp; Group * grp = NULL;
recv_data >> guid >> arenaslot >> asGroup >> isRated; recv_data >> guid >> arenaslot >> asGroup >> isRated;
@@ -642,7 +642,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (!bracketEntry) if (!bracketEntry)
return; return;
GroupJoinBattlegroundResult err; GroupJoinBattlegroundResult err = ERR_GROUP_JOIN_BATTLEGROUND_FAIL;
if (!asGroup) if (!asGroup)
{ {
@@ -704,7 +704,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId]; BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
if (asGroup) if (asGroup)
{ {
uint32 avgTime; uint32 avgTime = 0;
if (err > 0) if (err > 0)
{ {
+1 -1
View File
@@ -1682,7 +1682,7 @@ void GameEventMgr::SendWorldStateUpdate(Player * plr, uint16 event_id)
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList(); GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
for (GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr) 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 true;
return false; return false;
+2 -2
View File
@@ -529,7 +529,7 @@ void InstanceSaveManager::LoadResetTimes()
if (t - tim[type-1] > now) if (t - tim[type-1] > now)
break; 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); for (ResetTimeMapDiffInstances::const_iterator in_itr = mapDiffResetInstances.lower_bound(map_diff_pair);
in_itr != mapDiffResetInstances.upper_bound(map_diff_pair); ++in_itr) 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; uint64 next_reset = ((now + timeLeft + MINUTE) / DAY * DAY) + period + diff;
SetResetTimeFor(mapid, difficulty, next_reset); 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 // update it in the DB
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty); CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", next_reset, mapid, difficulty);
+8 -9
View File
@@ -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 find graveyard at different map from where entrance placed (or no entrance data), use any first
if (!mapEntry || if (!mapEntry ||
mapEntry->entrance_map < 0 || 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)) (mapEntry->entrance_x == 0 && mapEntry->entrance_y == 0))
{ {
// not have any corrdinates for check distance anyway // not have any corrdinates for check distance anyway
@@ -5904,16 +5904,15 @@ void ObjectMgr::LoadAccessRequirements()
AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
{ {
const MapEntry *mapEntry = sMapStore.LookupEntry(Map); 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) for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
{ if (itr->second.target_mapId == entrance_map)
if (itr->second.target_mapId == mapEntry->entrance_map)
{ {
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first); AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
if (atEntry && atEntry->mapid == Map) if (atEntry && atEntry->mapid == Map)
return &itr->second; return &itr->second;
} }
}
return NULL; return NULL;
} }
@@ -8093,7 +8092,7 @@ void ObjectMgr::LoadMailLevelRewards()
sLog.outString(">> Loaded %u level dependent mail rewards,", count); sLog.outString(">> Loaded %u level dependent mail rewards,", count);
} }
bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds) bool ObjectMgr::AddSpellToTrainer(uint32 entry, uint32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
{ {
if (entry >= TRINITY_TRAINER_START_REF) if (entry >= TRINITY_TRAINER_START_REF)
return false; return false;
@@ -8181,7 +8180,7 @@ bool ObjectMgr::AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::
} }
return true; return true;
} }
int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds) int ObjectMgr::LoadReferenceTrainer(uint32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds)
{ {
QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell); QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer WHERE entry='%d'", spell);
if (!result) if (!result)
@@ -8196,7 +8195,7 @@ int ObjectMgr::LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32>
int32 spell = fields[1].GetInt32(); int32 spell = fields[1].GetInt32();
if (spell < 0) if (spell < 0)
count += this->LoadReferenceTrainer(trainer, -spell, skip_trainers, talentIds); 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; ++count;
} while (result->NextRow()); } while (result->NextRow());
@@ -8240,7 +8239,7 @@ void ObjectMgr::LoadTrainerSpell()
int32 spell = fields[1].GetInt32(); int32 spell = fields[1].GetInt32();
if (spell < 0) if (spell < 0)
count += this->LoadReferenceTrainer(entry, -spell, &skip_trainers, &talentIds); 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; ++count;
} while (result->NextRow()); } while (result->NextRow());
+2 -2
View File
@@ -693,8 +693,8 @@ class ObjectMgr
void LoadVendors(); void LoadVendors();
void LoadTrainerSpell(); void LoadTrainerSpell();
bool AddSpellToTrainer(int32 entry, int32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds); bool AddSpellToTrainer(uint32 entry, uint32 spell, Field *fields, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds);
int LoadReferenceTrainer(int32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds); int LoadReferenceTrainer(uint32 trainer, int32 spell, std::set<uint32> *skip_trainers, std::set<uint32> *talentIds);
void LoadGMTickets(); void LoadGMTickets();
std::string GeneratePetName(uint32 entry); std::string GeneratePetName(uint32 entry);
+1 -1
View File
@@ -19726,7 +19726,7 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
{ {
for (uint8 idx = 0; idx < 5; ++idx) 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; cat = proto->Spells[idx].SpellCategory;
rec = proto->Spells[idx].SpellCooldown; rec = proto->Spells[idx].SpellCooldown;
+2 -2
View File
@@ -287,11 +287,11 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
return; return;
} }
int32 mapid = corpse->GetMapId(); uint32 mapid = corpse->GetMapId();
float x = corpse->GetPositionX(); float x = corpse->GetPositionX();
float y = corpse->GetPositionY(); float y = corpse->GetPositionY();
float z = corpse->GetPositionZ(); float z = corpse->GetPositionZ();
int32 corpsemapid = mapid; uint32 corpsemapid = mapid;
// if corpse at different map // if corpse at different map
if (mapid != _player->GetMapId()) if (mapid != _player->GetMapId())
+1 -1
View File
@@ -2341,7 +2341,7 @@ void AuraEffect::CleanupTriggeredSpells(Unit * target)
// needed for spell 43680, maybe others // needed for spell 43680, maybe others
// TODO: is there a spell flag, which can solve this in a more sophisticated way? // 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 && 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; return;
target->RemoveAurasDueToSpell(tSpellId, GetCasterGUID()); target->RemoveAurasDueToSpell(tSpellId, GetCasterGUID());
+3 -3
View File
@@ -1135,7 +1135,7 @@ void SpellMgr::LoadSpellTargetPositions()
if (spellInfo->Effect[i]==SPELL_EFFECT_BIND && spellInfo->EffectMiscValue[i]) 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); 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); 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; break;
@@ -2604,7 +2604,7 @@ void SpellMgr::LoadSpellAreas()
continue; 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)); sLog.outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell,abs(spellArea.auraSpell));
continue; continue;
@@ -3949,7 +3949,7 @@ bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const
SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId); SkillLineAbilityMapBounds bounds = GetSkillLineAbilityMapBounds(spellId);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx) 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 true;
return false; return false;
+13 -13
View File
@@ -4250,7 +4250,7 @@ void Unit::RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, ui
if (!casterGUID || aura->GetCasterGUID() == casterGUID) if (!casterGUID || aura->GetCasterGUID() == casterGUID)
{ {
SpellEntry const *spell = aura->GetSpellProto(); 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); RemoveAura(iter);
continue; continue;
@@ -4441,7 +4441,7 @@ AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 ico
if (effIndex != (*itr)->GetEffIndex()) if (effIndex != (*itr)->GetEffIndex())
continue; continue;
SpellEntry const * spell = (*itr)->GetSpellProto(); 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 *itr;
} }
return NULL; 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) for (AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
{ {
SpellEntry const *spell = (*i)->GetSpellProto(); 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) if (casterGUID && (*i)->GetCasterGUID() != casterGUID)
continue; continue;
@@ -4522,7 +4522,7 @@ bool Unit::HasAuraType(AuraType auraType) const
return (!m_modAuras[auraType].empty()); 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); AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) 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; return false;
} }
bool Unit::HasAuraTypeWithValue(AuraType auratype, uint32 value) const bool Unit::HasAuraTypeWithValue(AuraType auratype, int32 value) const
{ {
AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype); AuraEffectList const& mTotalAuraList = GetAuraEffectsByType(auratype);
for (AuraEffectList::const_iterator i = mTotalAuraList.begin(); i != mTotalAuraList.end(); ++i) 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; if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled) continue;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
if (!spellInfo || !IsPassiveSpell(itr->first)) continue; if (!spellInfo || !IsPassiveSpell(itr->first)) continue;
if (spellInfo->CasterAuraState == flag) if (spellInfo->CasterAuraState == uint32(flag))
CastSpell(this, itr->first, true, NULL); CastSpell(this, itr->first, true, NULL);
} }
} }
@@ -9088,7 +9088,7 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
if (itr->second.state == PETSPELL_REMOVED) continue; if (itr->second.state == PETSPELL_REMOVED) continue;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
if (!spellInfo || !IsPassiveSpell(itr->first)) continue; if (!spellInfo || !IsPassiveSpell(itr->first)) continue;
if (spellInfo->CasterAuraState == flag) if (spellInfo->CasterAuraState == uint32(flag))
CastSpell(this, itr->first, true, NULL); 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();) for (Unit::AuraApplicationMap::iterator itr = tAuras.begin(); itr != tAuras.end();)
{ {
SpellEntry const* spellProto = (*itr).second->GetBase()->GetSpellProto(); SpellEntry const* spellProto = (*itr).second->GetBase()->GetSpellProto();
if (spellProto->CasterAuraState == flag) if (spellProto->CasterAuraState == uint32(flag))
RemoveAura(itr); RemoveAura(itr);
else else
++itr; ++itr;
@@ -11660,7 +11660,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const
if (uint32 mask = (m_detectInvisibilityMask & u->m_invisibilityMask)) 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) if (((1 << i) & mask) == 0)
continue; continue;
@@ -11669,7 +11669,7 @@ bool Unit::canDetectInvisibilityOf(Unit const* u) const
uint32 invLevel = 0; uint32 invLevel = 0;
Unit::AuraEffectList const& iAuras = u->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY); Unit::AuraEffectList const& iAuras = u->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY);
for (Unit::AuraEffectList::const_iterator itr = iAuras.begin(); itr != iAuras.end(); ++itr) 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(); invLevel = (*itr)->GetAmount();
// find invisibility detect level // 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); Unit::AuraEffectList const& dAuras = GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY_DETECTION);
for (Unit::AuraEffectList::const_iterator itr = dAuras.begin(); itr != dAuras.end(); ++itr) 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(); detectLevel = (*itr)->GetAmount();
} }
@@ -13782,12 +13782,12 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
break; break;
case SPELL_AURA_MECHANIC_IMMUNITY: case SPELL_AURA_MECHANIC_IMMUNITY:
// Compare mechanic // Compare mechanic
if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue()) if (procSpell && procSpell->Mechanic == uint32(triggeredByAura->GetMiscValue()))
takeCharges = true; takeCharges = true;
break; break;
case SPELL_AURA_MOD_MECHANIC_RESISTANCE: case SPELL_AURA_MOD_MECHANIC_RESISTANCE:
// Compare mechanic // Compare mechanic
if (procSpell && procSpell->Mechanic == triggeredByAura->GetMiscValue()) if (procSpell && procSpell->Mechanic == uint32(triggeredByAura->GetMiscValue()))
takeCharges = true; takeCharges = true;
break; break;
case SPELL_AURA_MOD_DAMAGE_FROM_CASTER: case SPELL_AURA_MOD_DAMAGE_FROM_CASTER:
+3 -3
View File
@@ -470,7 +470,7 @@ enum UnitState
UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_EVADE), UNIT_STAT_SIGHTLESS = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_EVADE),
UNIT_STAT_CANNOT_AUTOATTACK = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CASTING), UNIT_STAT_CANNOT_AUTOATTACK = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_CASTING),
UNIT_STAT_CANNOT_TURN = (UNIT_STAT_LOST_CONTROL | UNIT_STAT_ROTATING), 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 enum UnitMoveType
@@ -1607,8 +1607,8 @@ class Unit : public WorldObject
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const; bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const;
bool HasAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0) const; bool HasAura(uint32 spellId, uint64 caster = 0, uint8 reqEffMask = 0) const;
bool HasAuraType(AuraType auraType) const; bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const; bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const;
bool HasAuraTypeWithValue(AuraType auratype, uint32 value) const; bool HasAuraTypeWithValue(AuraType auratype, int32 value) const;
bool HasNegativeAuraWithInterruptFlag(uint32 flag); bool HasNegativeAuraWithInterruptFlag(uint32 flag);
AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const; AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const;
+3 -3
View File
@@ -59,11 +59,11 @@ class UnitAI
virtual void OnCharmed(bool apply) = 0; virtual void OnCharmed(bool apply) = 0;
// Pass parameters between AI // 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 uint32 GetData(uint32 /*id = 0*/) { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {} virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void SetGUID(const uint64 &/*guid*/, int32 id = 0) {} virtual void SetGUID(const uint64 &/*guid*/, int32 /*id*/ = 0) {}
virtual uint64 GetGUID(int32 id = 0) { return 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); Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
void SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0); void SelectTargetList(std::list<Unit*> &targetList, uint32 num, SelectAggroTarget targetType, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
+3 -3
View File
@@ -1711,7 +1711,7 @@ void World::SetInitialWorldSettings()
void World::DetectDBCLang() 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) if (m_lang_confid != 255 && m_lang_confid >= MAX_LOCALE)
{ {
@@ -1723,8 +1723,8 @@ void World::DetectDBCLang()
std::string availableLocalsStr; std::string availableLocalsStr;
int default_locale = MAX_LOCALE; uint8 default_locale = MAX_LOCALE;
for (int i = MAX_LOCALE-1; i >= 0; --i) for (uint8 i = default_locale-1; i >= 0; --i)
{ {
if (strlen(race->name[i]) > 0) // check by race names if (strlen(race->name[i]) > 0) // check by race names
{ {
@@ -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(); Player* pPlayer = GetPlayerForEscort();
if (pPlayer) if (pPlayer)
+2 -2
View File
@@ -195,11 +195,11 @@ struct npc_dalindaAI : public npc_escortAI
} }
} }
void EnterCombat(Unit* pWho) { } void EnterCombat(Unit* /*pWho*/) { }
void Reset() {} void Reset() {}
void JustDied(Unit* pKiller) void JustDied(Unit* /*pKiller*/)
{ {
Player* pPlayer = GetPlayerForEscort(); Player* pPlayer = GetPlayerForEscort();
if (pPlayer) if (pPlayer)
+1 -1
View File
@@ -564,7 +564,7 @@ struct npc_wounded_skirmisherAI : public ScriptedAI
} }
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 /*diff*/)
{ {
if (!UpdateVictim()) if (!UpdateVictim())
return; return;
@@ -50,7 +50,7 @@ struct boss_grobbulusAI : public BossAI
void SpellHitTarget(Unit *pTarget, const SpellEntry *spell) 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)) if (TempSummon *slime = me->SummonCreature(MOB_FALLOUT_SLIME, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
DoZoneInCombat(slime); DoZoneInCombat(slime);
+1 -3
View File
@@ -366,11 +366,9 @@ struct npc_engineer_heliceAI : public npc_escortAI
{ {
m_uiChatTimer = 4000; m_uiChatTimer = 4000;
} }
void JustDied(Unit* /*pKiller*/)
void JustDied(Unit* pKiller)
{ {
Player* pPlayer = GetPlayerForEscort(); Player* pPlayer = GetPlayerForEscort();
if (HasEscortState(STATE_ESCORT_ESCORTING)) if (HasEscortState(STATE_ESCORT_ESCORTING))
{ {
if (pPlayer) if (pPlayer)
+4 -4
View File
@@ -379,11 +379,11 @@ struct npc_injured_goblinAI : public npc_escortAI
} }
} }
void EnterCombat(Unit* pWho) {} void EnterCombat(Unit* /*pWho*/) {}
void Reset() {} void Reset() {}
void JustDied(Unit* pKiller) void JustDied(Unit* /*pKiller*/)
{ {
Player* pPlayer = GetPlayerForEscort(); Player* pPlayer = GetPlayerForEscort();
if (HasEscortState(STATE_ESCORT_ESCORTING) && pPlayer) if (HasEscortState(STATE_ESCORT_ESCORTING) && pPlayer)
@@ -419,7 +419,7 @@ bool GossipHello_npc_injured_goblin(Player* pPlayer, Creature* pCreature)
return true; 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) if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE)
DoScriptText(SAY_QUEST_ACCEPT, pCreature); DoScriptText(SAY_QUEST_ACCEPT, pCreature);
@@ -427,7 +427,7 @@ bool QuestAccept_npc_injured_goblin(Player* pPlayer, Creature* pCreature, Quest
return false; 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()); npc_escortAI* pEscortAI = CAST_AI(npc_injured_goblinAI, pCreature->AI());
@@ -409,7 +409,7 @@ struct npc_bloodmaul_brutebaneAI : public ScriptedAI
OgreGUID = 0; OgreGUID = 0;
} }
void UpdateAI(const uint32 uiDiff) {} void UpdateAI(const uint32 /*uiDiff*/) {}
}; };
CreatureAI* GetAI_npc_bloodmaul_brutebane(Creature* pCreature) CreatureAI* GetAI_npc_bloodmaul_brutebane(Creature* pCreature)
+1 -1
View File
@@ -393,7 +393,7 @@ enum TheEmissary
NPC_LEVIROTH = 26452 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) if (pPlayer->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
{ {
+1 -1
View File
@@ -2337,7 +2337,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature)
return true; 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) switch(uiAction)
{ {