diff options
author | Spp <none@none> | 2010-08-31 11:39:51 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-08-31 11:39:51 +0200 |
commit | b9e19572c446dc6cbb4a04740db1aae39e670f92 (patch) | |
tree | e5135430f1918ce48a755aaf487aeb056d396459 /src | |
parent | 849ae84f5b79f52ac60a904f98b10219a0ed7cf7 (diff) |
Core: Fix more warnings (very few left under linux 32)
--HG--
branch : trunk
Diffstat (limited to 'src')
5 files changed, 15 insertions, 16 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 2986c270b1a..82c6ad143e3 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -278,7 +278,7 @@ void Map::SwitchGridContainers(T* obj, bool on) CellPair p = Trinity::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY()); if (p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP) { - sLog.outError("Map::SwitchGridContainers: Object " I64FMT " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); + sLog.outError("Map::SwitchGridContainers: Object " UI64FMTD " has invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord); return; } @@ -286,7 +286,7 @@ void Map::SwitchGridContainers(T* obj, bool on) if (!loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y))) return; - sLog.outStaticDebug("Switch object " I64FMT " from grid[%u,%u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); + sLog.outStaticDebug("Switch object " UI64FMTD " from grid[%u,%u] %u", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y, on); NGridType *ngrid = getNGrid(cell.GridX(), cell.GridY()); ASSERT(ngrid != NULL); diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index 05a6685105b..e8f67ad5554 100644 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -528,7 +528,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) /*if (_player->m_mover->GetGUID() == old_mover_guid) { - sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " I64FMT, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); + sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD " instead of " UI64FMTD, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid); recv_data.rpos(recv_data.wpos()); // prevent warnings spam return; }*/ diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp index 8e46bdcf8fc..d786d322453 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp @@ -128,7 +128,7 @@ static SpiritInfoStruct SpiritInfo[] = struct TransformStruct { uint32 sound; - char* text; + std::string text; uint32 spell, unaura; }; @@ -353,7 +353,7 @@ class boss_zuljin : public CreatureScript me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0); me->RemoveAurasDueToSpell(Transform[Phase].unaura); DoCast(me, Transform[Phase].spell); - me->MonsterYell(Transform[Phase].text, LANG_UNIVERSAL, NULL); + me->MonsterYell(Transform[Phase].text.c_str(), LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, Transform[Phase].sound); if (Phase > 0) { diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index d81de782f19..d3749f147a9 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -243,7 +243,7 @@ static EventIllidan MaxTimer[]= struct Yells { uint32 sound; - char* text; + std::string text; uint32 pCreature, timer, emote; bool Talk; }; @@ -629,8 +629,8 @@ public: { if (Conversation[count].emote) pCreature->HandleEmoteCommand(Conversation[count].emote); // Make the Creature do some animation! - if (Conversation[count].text) - pCreature->MonsterYell(Conversation[count].text, LANG_UNIVERSAL, 0); // Have the Creature yell out some text + if (Conversation[count].text.size()) + pCreature->MonsterYell(Conversation[count].text.c_str(), LANG_UNIVERSAL, 0); // Have the Creature yell out some text if (Conversation[count].sound) DoPlaySoundToSet(pCreature, Conversation[count].sound); // Play some sound on the creature } @@ -1016,10 +1016,9 @@ public: case EVENT_TAUNT: { uint32 random = rand()%4; - char* yell = RandomTaunts[random].text; uint32 soundid = RandomTaunts[random].sound; - if (yell) - me->MonsterYell(yell, LANG_UNIVERSAL, 0); + if (RandomTaunts[random].text.size()) + me->MonsterYell(RandomTaunts[random].text.c_str(), LANG_UNIVERSAL, 0); if (soundid) DoPlaySoundToSet(me, soundid); } @@ -1318,9 +1317,9 @@ public: case EVENT_MAIEV_TAUNT: { uint32 random = rand()%4; - char* text = MaievTaunts[random].text; uint32 sound = MaievTaunts[random].sound; - me->MonsterYell(text, LANG_UNIVERSAL, 0); + if (MaievTaunts[random].text.size()) + me->MonsterYell(MaievTaunts[random].text.c_str(), LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, sound); Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000; } diff --git a/src/server/shared/Database/SQLOperation.cpp b/src/server/shared/Database/SQLOperation.cpp index b524e962544..b66839e26b3 100644 --- a/src/server/shared/Database/SQLOperation.cpp +++ b/src/server/shared/Database/SQLOperation.cpp @@ -58,13 +58,13 @@ bool SQLQueryHolder::SetQuery(size_t index, const char *sql) { if (m_queries.size() <= index) { - sLog.outError("Query index (%u) out of range (size: %u) for query: %s", index, (uint32)m_queries.size(), sql); + sLog.outError("Query index (%zu) out of range (size: %u) for query: %s", index, (uint32)m_queries.size(), sql); return false; } if (m_queries[index].first != NULL) { - sLog.outError("Attempt assign query to holder index (%u) where other query stored (Old: [%s] New: [%s])", + sLog.outError("Attempt assign query to holder index (%zu) where other query stored (Old: [%s] New: [%s])", index, m_queries[index].first, sql); return false; } @@ -78,7 +78,7 @@ bool SQLQueryHolder::SetPQuery(size_t index, const char *format, ...) { if (!format) { - sLog.outError("Query (index: %u) is empty.",index); + sLog.outError("Query (index: %zu) is empty.",index); return false; } |