mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
This commit is contained in:
parent
349719e520
commit
10d3d3ce24
33 changed files with 363 additions and 306 deletions
|
|
@ -3826,11 +3826,11 @@ void ObjectMgr::LoadQuests()
|
|||
}
|
||||
|
||||
//check for proper RequiredSkill value (skill case)
|
||||
if (int32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
|
||||
if (uint32 skill_id = SkillByQuestSort(-int32(qinfo->ZoneOrSort)))
|
||||
{
|
||||
if (qinfo->RequiredSkill != skill_id)
|
||||
{
|
||||
sLog.outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkill` does not have a corresponding value (%i).",
|
||||
sLog.outErrorDb("Quest %u has `ZoneOrSort` = %i but `RequiredSkill` does not have a corresponding value (%u).",
|
||||
qinfo->GetQuestId(),qinfo->ZoneOrSort,skill_id);
|
||||
//override, and force proper value here?
|
||||
}
|
||||
|
|
@ -5939,7 +5939,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->ghost_entrance_map < 0 ||
|
||||
mapEntry->ghost_entrance_map != entry->map_id ||
|
||||
uint32(mapEntry->ghost_entrance_map) != entry->map_id ||
|
||||
(mapEntry->ghost_entrance_x == 0 && mapEntry->ghost_entrance_y == 0))
|
||||
{
|
||||
// not have any coordinates for check distance anyway
|
||||
|
|
@ -6174,10 +6174,12 @@ void ObjectMgr::LoadAreaTriggerTeleports()
|
|||
AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 map_id) const
|
||||
{
|
||||
const MapEntry *mapEntry = sMapStore.LookupEntry(map_id);
|
||||
if(!mapEntry) return NULL;
|
||||
if (!mapEntry || mapEntry->ghost_entrance_map < 0)
|
||||
return NULL;
|
||||
|
||||
for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
|
||||
{
|
||||
if(itr->second.target_mapId == mapEntry->ghost_entrance_map)
|
||||
if (itr->second.target_mapId == uint32(mapEntry->ghost_entrance_map))
|
||||
{
|
||||
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(itr->first);
|
||||
if(atEntry && atEntry->mapid == map_id)
|
||||
|
|
@ -8867,8 +8869,6 @@ void ObjectMgr::LoadTrainerSpell()
|
|||
void ObjectMgr::LoadVendors(char const* tableName, bool isTemplates)
|
||||
{
|
||||
CacheVendorItemMap& vendorList = isTemplates ? m_mCacheVendorTemplateItemMap : m_mCacheVendorItemMap;
|
||||
CacheVendorItemMap const* parentList = isTemplates ? NULL : &m_mCacheVendorTemplateItemMap;
|
||||
|
||||
|
||||
// For reload case
|
||||
for (CacheVendorItemMap::iterator itr = vendorList.begin(); itr != vendorList.end(); ++itr)
|
||||
|
|
@ -8878,7 +8878,7 @@ void ObjectMgr::LoadVendors(char const* tableName, bool isTemplates)
|
|||
std::set<uint32> skip_vendors;
|
||||
|
||||
QueryResult *result = WorldDatabase.PQuery("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM %s", tableName);
|
||||
if( !result )
|
||||
if (!result)
|
||||
{
|
||||
barGoLink bar( 1 );
|
||||
|
||||
|
|
@ -8915,7 +8915,7 @@ void ObjectMgr::LoadVendors(char const* tableName, bool isTemplates)
|
|||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %d vendor items", count);
|
||||
sLog.outString( ">> Loaded %u vendor items", count);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue