aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2012-05-20 17:58:35 +0100
committerNay <dnpd.dd@gmail.com>2012-05-20 17:58:35 +0100
commite56b2cdd59c5c7673da1aaac5fe8a99d4891e260 (patch)
treeb3ceef17150b808472e5613594bc277ed6f8f7d1 /src
parenta2d2732c03df73bcd8c8a6c935c099afaae7212c (diff)
Core: Fix a few compile warnings
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp6
-rwxr-xr-xsrc/server/game/Maps/Map.cpp2
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp2
-rw-r--r--src/tools/map_extractor/System.cpp18
-rw-r--r--src/tools/map_extractor/adt.cpp12
-rw-r--r--src/tools/map_extractor/loadlib.cpp2
-rw-r--r--src/tools/map_extractor/mpq_libmpq04.h4
-rw-r--r--src/tools/map_extractor/wdt.cpp6
9 files changed, 27 insertions, 27 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index 96f454fd3e2..4176d9f605b 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -190,7 +190,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
}
case CONDITION_OBJECT_ENTRY:
{
- if (object->GetTypeId() == ConditionValue1)
+ if (uint32(object->GetTypeId()) == ConditionValue1)
condMeets = (!ConditionValue2) || (object->GetEntry() == ConditionValue2);
break;
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index d38489ef5a9..f5f336a2402 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -12019,7 +12019,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
Map const* map = lootedObject->GetMap();
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
- if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
lootedObjectInDungeon = true;
if (!lootedObjectInDungeon)
@@ -17658,7 +17658,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
}
else
if (IsBagPos(item->GetPos()))
- if (Bag* pBag = item->ToBag())
+ if (item->IsBag())
invalidBagMap[item->GetGUIDLow()] = item;
}
else
@@ -17811,7 +17811,7 @@ Item* Player::_LoadItem(SQLTransaction& trans, uint32 zoneId, uint32 timeDiff, F
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr->GetActiveEventList();
for (GameEventMgr::ActiveEvents::const_iterator itr = activeEventsList.begin(); itr != activeEventsList.end(); ++itr)
{
- if (events[*itr].holiday_id == proto->HolidayId)
+ if (uint32(events[*itr].holiday_id) == proto->HolidayId)
{
remove = false;
break;
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index a1b3d913c99..162dd12d121 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2470,7 +2470,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
if (LFGDungeonEntry const* randomDungeon = sLFGDungeonStore.LookupEntry(*(sLFGMgr->GetSelectedDungeons(player->GetGUID()).begin())))
- if (uint32(dungeon->map) == GetId() && dungeon->difficulty == GetDifficulty() && randomDungeon->type == LFG_TYPE_RANDOM)
+ if (uint32(dungeon->map) == GetId() && dungeon->difficulty == uint32(GetDifficulty()) && randomDungeon->type == uint32(LFG_TYPE_RANDOM))
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
}
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 501c7c47676..0c879cfb029 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -1513,7 +1513,7 @@ class spell_gen_luck_of_the_draw : public SpellScriptLoader
if (group->isLFGGroup())
if (uint32 dungeonId = sLFGMgr->GetDungeon(group->GetGUID(), true))
if (LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(dungeonId))
- if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
+ if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == uint32(map->GetDifficulty()))
if (randomDungeon && randomDungeon->type == LFG_TYPE_RANDOM)
return; // in correct dungeon
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index cf2f2188a70..3deb9f44dd7 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -221,7 +221,7 @@ uint32 ReadMapDBC()
map_ids[x].id = dbc.getRecord(x).getUInt(0);
strcpy(map_ids[x].name, dbc.getRecord(x).getString(1));
}
- printf("Done! (%u maps loaded)\n", map_count);
+ printf("Done! (%d maps loaded)\n", map_count);
return map_count;
}
@@ -246,7 +246,7 @@ void ReadAreaTableDBC()
maxAreaId = dbc.getMaxId();
- printf("Done! (%u areas loaded)\n", area_count);
+ printf("Done! (%d areas loaded)\n", area_count);
}
void ReadLiquidTypeTableDBC()
@@ -259,15 +259,15 @@ void ReadLiquidTypeTableDBC()
exit(1);
}
- size_t LiqType_count = dbc.getRecordCount();
- size_t LiqType_maxid = dbc.getMaxId();
- LiqType = new uint16[LiqType_maxid + 1];
- memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16));
+ size_t liqTypeCount = dbc.getRecordCount();
+ size_t liqTypeMaxId = dbc.getMaxId();
+ LiqType = new uint16[liqTypeMaxId + 1];
+ memset(LiqType, 0xff, (liqTypeMaxId + 1) * sizeof(uint16));
- for(uint32 x = 0; x < LiqType_count; ++x)
+ for(uint32 x = 0; x < liqTypeCount; ++x)
LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
- printf("Done! (%u LiqTypes loaded)\n", LiqType_count);
+ printf("Done! (%d LiqTypes loaded)\n", liqTypeCount);
}
//
@@ -364,7 +364,7 @@ uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE];
float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
-bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 build)
+bool ConvertADT(char *filename, char *filename2, int /*cell_y*/, /*int cell_x*/, uint32 build)
{
ADT_file adt;
diff --git a/src/tools/map_extractor/adt.cpp b/src/tools/map_extractor/adt.cpp
index fde70681113..66134180cb0 100644
--- a/src/tools/map_extractor/adt.cpp
+++ b/src/tools/map_extractor/adt.cpp
@@ -53,7 +53,7 @@ bool ADT_file::prepareLoadedData()
bool adt_MHDR::prepareLoadedData()
{
- if (fcc != 'MHDR')
+ if (fcc != "MHDR")
return false;
if (size!=sizeof(adt_MHDR)-8)
@@ -72,7 +72,7 @@ bool adt_MHDR::prepareLoadedData()
bool adt_MCIN::prepareLoadedData()
{
- if (fcc != 'MCIN')
+ if (fcc != "MCIN")
return false;
// Check cells data
@@ -86,7 +86,7 @@ bool adt_MCIN::prepareLoadedData()
bool adt_MH2O::prepareLoadedData()
{
- if (fcc != 'MH2O')
+ if (fcc != "MH2O")
return false;
// Check liquid data
@@ -98,7 +98,7 @@ bool adt_MH2O::prepareLoadedData()
bool adt_MCNK::prepareLoadedData()
{
- if (fcc != 'MCNK')
+ if (fcc != "MCNK")
return false;
// Check height map
@@ -113,7 +113,7 @@ bool adt_MCNK::prepareLoadedData()
bool adt_MCVT::prepareLoadedData()
{
- if (fcc != 'MCVT')
+ if (fcc != "MCVT")
return false;
if (size != sizeof(adt_MCVT)-8)
@@ -124,7 +124,7 @@ bool adt_MCVT::prepareLoadedData()
bool adt_MCLQ::prepareLoadedData()
{
- if (fcc != 'MCLQ')
+ if (fcc != "MCLQ")
return false;
return true;
diff --git a/src/tools/map_extractor/loadlib.cpp b/src/tools/map_extractor/loadlib.cpp
index 465eb04083f..77dca04d4c8 100644
--- a/src/tools/map_extractor/loadlib.cpp
+++ b/src/tools/map_extractor/loadlib.cpp
@@ -49,7 +49,7 @@ bool FileLoader::prepareLoadedData()
{
// Check version
version = (file_MVER *) data;
- if (version->fcc != 'MVER')
+ if (version->fcc != "MVER")
return false;
if (version->ver != FILE_FORMAT_VERSION)
return false;
diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h
index 1f3b259bbfc..89f715e9e87 100644
--- a/src/tools/map_extractor/mpq_libmpq04.h
+++ b/src/tools/map_extractor/mpq_libmpq04.h
@@ -60,8 +60,8 @@ class MPQFile
libmpq__off_t pointer,size;
// disable copying
- MPQFile(const MPQFile &f) {}
- void operator=(const MPQFile &f) {}
+ MPQFile(const MPQFile& /*f*/) {}
+ void operator=(const MPQFile& /*f*/) {}
public:
MPQFile(const char* filename); // filenames are not case sensitive
diff --git a/src/tools/map_extractor/wdt.cpp b/src/tools/map_extractor/wdt.cpp
index dedefbb64e5..d9ad0f4c7d3 100644
--- a/src/tools/map_extractor/wdt.cpp
+++ b/src/tools/map_extractor/wdt.cpp
@@ -4,21 +4,21 @@
bool wdt_MWMO::prepareLoadedData()
{
- if (fcc != 'MWMO')
+ if (fcc != "MWMO")
return false;
return true;
}
bool wdt_MPHD::prepareLoadedData()
{
- if (fcc != 'MPHD')
+ if (fcc != "MPHD")
return false;
return true;
}
bool wdt_MAIN::prepareLoadedData()
{
- if (fcc != 'MAIN')
+ if (fcc != "MAIN")
return false;
return true;
}