[8151] Fixed some format warnings and typos. Author: Win32

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-12 17:52:27 +08:00
parent 5e22d496ae
commit b5d802b70c
8 changed files with 16 additions and 17 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ bool AchievementCriteriaData::IsValid(AchievementCriteriaEntry const* criteria)
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD: case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD:
if (player_dead.own_team_flag > 1) if (player_dead.own_team_flag > 1)
{ {
sLog.outErrorDb( "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type %s (%u) have wrong boolean value1 (%u).", sLog.outErrorDb( "Table `achievement_criteria_data` (Entry: %u Type: %u) for data type ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD (%u) have wrong boolean value1 (%u).",
criteria->ID, criteria->requiredType,dataType,player_dead.own_team_flag); criteria->ID, criteria->requiredType,dataType,player_dead.own_team_flag);
return false; return false;
} }
+1 -1
View File
@@ -191,7 +191,7 @@ inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList
if(f) if(f)
{ {
char buf[100]; char buf[100];
snprintf(buf,100," (exist, but have %d fields instead %d) Wrong client version DBC file?",storage.GetFieldCount(),strlen(storage.GetFormat())); snprintf(buf,100," (exist, but have %d fields instead " SIZEFMTD ") Wrong client version DBC file?",storage.GetFieldCount(),strlen(storage.GetFormat()));
errlist.push_back(dbc_filename + buf); errlist.push_back(dbc_filename + buf);
fclose(f); fclose(f);
} }
+4 -4
View File
@@ -613,13 +613,13 @@ bool ChatHandler::HandleDebugGetItemState(const char* args)
if (item->GetOwnerGUID() != player->GetGUID()) if (item->GetOwnerGUID() != player->GetGUID())
{ {
PSendSysMessage("queue(%d): for the an item (guid %d), the owner's guid (%d) and player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow()); PSendSysMessage("queue(" SIZEFMTD "): for the an item (guid %d), the owner's guid (%d) and player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
error = true; continue; error = true; continue;
} }
if (item->GetQueuePos() != i) if (item->GetQueuePos() != i)
{ {
PSendSysMessage("queue(%d): for the an item (guid %d), the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow()); PSendSysMessage("queue(" SIZEFMTD "): for the an item (guid %d), the queuepos doesn't match it's position in the queue!", i, item->GetGUIDLow());
error = true; continue; error = true; continue;
} }
@@ -628,13 +628,13 @@ bool ChatHandler::HandleDebugGetItemState(const char* args)
if (test == NULL) if (test == NULL)
{ {
PSendSysMessage("queue(%d): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have an item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow()); PSendSysMessage("queue(" SIZEFMTD "): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the player doesn't have an item at that position!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow());
error = true; continue; error = true; continue;
} }
if (test != item) if (test != item)
{ {
PSendSysMessage("queue(%d): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the item with guid %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow()); PSendSysMessage("queue(" SIZEFMTD "): the bag(%d) and slot(%d) values for the item with guid %d are incorrect, the item with guid %d is there instead!", i, item->GetBagSlot(), item->GetSlot(), item->GetGUIDLow(), test->GetGUIDLow());
error = true; continue; error = true; continue;
} }
} }
+6 -6
View File
@@ -1215,7 +1215,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if(internal_event_id < 0 || internal_event_id >= mGameEventCreatureGuids.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventCreatureGuids.size())
{ {
sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: %u)",internal_event_id,mGameEventCreatureGuids.size()); sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventCreatureGuids.size());
return; return;
} }
@@ -1248,7 +1248,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if(internal_event_id < 0 || internal_event_id >= mGameEventGameobjectGuids.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventGameobjectGuids.size())
{ {
sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: %u)",internal_event_id,mGameEventGameobjectGuids.size()); sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventGameobjectGuids.size());
return; return;
} }
@@ -1282,7 +1282,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if(internal_event_id < 0 || internal_event_id >= mGameEventPoolIds.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventPoolIds.size())
{ {
sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %i (size: %u)",internal_event_id,mGameEventPoolIds.size()); sLog.outError("GameEventMgr::GameEventSpawn attempt access to out of range mGameEventPoolIds element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventPoolIds.size());
return; return;
} }
@@ -1298,7 +1298,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if(internal_event_id < 0 || internal_event_id >= mGameEventCreatureGuids.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventCreatureGuids.size())
{ {
sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: %u)",internal_event_id,mGameEventCreatureGuids.size()); sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventCreatureGuids element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventCreatureGuids.size());
return; return;
} }
@@ -1319,7 +1319,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
if(internal_event_id < 0 || internal_event_id >= mGameEventGameobjectGuids.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventGameobjectGuids.size())
{ {
sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: %u)",internal_event_id,mGameEventGameobjectGuids.size()); sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventGameobjectGuids element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventGameobjectGuids.size());
return; return;
} }
@@ -1339,7 +1339,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
} }
if(internal_event_id < 0 || internal_event_id >= mGameEventPoolIds.size()) if(internal_event_id < 0 || internal_event_id >= mGameEventPoolIds.size())
{ {
sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %i (size: %u)",internal_event_id,mGameEventPoolIds.size()); sLog.outError("GameEventMgr::GameEventUnspawn attempt access to out of range mGameEventPoolIds element %i (size: " SIZEFMTD ")",internal_event_id,mGameEventPoolIds.size());
return; return;
} }
+1 -1
View File
@@ -87,7 +87,7 @@ void GameObject::CleanupsBeforeDelete()
owner->RemoveGameObject(this,false); owner->RemoveGameObject(this,false);
else else
{ {
char * ownerType = "creature"; const char * ownerType = "creature";
if(IS_PLAYER_GUID(owner_guid)) if(IS_PLAYER_GUID(owner_guid))
ownerType = "player"; ownerType = "player";
else if(IS_PET_GUID(owner_guid)) else if(IS_PET_GUID(owner_guid))
+1 -2
View File
@@ -283,7 +283,7 @@ bool Guild::LoadRanksFromDB(uint32 GuildId)
std::string name = m_ranks[i].name; std::string name = m_ranks[i].name;
uint32 rights = m_ranks[i].rights; uint32 rights = m_ranks[i].rights;
CharacterDatabase.escape_string(name); CharacterDatabase.escape_string(name);
CharacterDatabase.PExecute( "INSERT INTO guild_rank (guildid,rid,rname,rights) VALUES ('%u', '%u', '%s', '%u')", GuildId, i+1, name.c_str(), rights); CharacterDatabase.PExecute( "INSERT INTO guild_rank (guildid,rid,rname,rights) VALUES ('%u', '%u', '%s', '%u')", GuildId, uint32(i+1), name.c_str(), rights);
} }
CharacterDatabase.CommitTransaction(); CharacterDatabase.CommitTransaction();
} }
@@ -2010,4 +2010,3 @@ bool GuildItemPosCount::isContainedIn(GuildItemPosCountVec const &vec) const
return false; return false;
} }
+1 -1
View File
@@ -229,7 +229,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
if(recv_data.size() != recv_data.rpos()) if(recv_data.size() != recv_data.rpos())
{ {
sLog.outError("MovementHandler: player %s (guid %d, account %u) sent a packet (opcode %u) that is %u bytes larger than it should be. Kicked as cheater.", _player->GetName(), _player->GetGUIDLow(), _player->GetSession()->GetAccountId(), recv_data.GetOpcode(), recv_data.size() - recv_data.rpos()); sLog.outError("MovementHandler: player %s (guid %d, account %u) sent a packet (opcode %u) that is " SIZEFMTD " bytes larger than it should be. Kicked as cheater.", _player->GetName(), _player->GetGUIDLow(), _player->GetSession()->GetAccountId(), recv_data.GetOpcode(), recv_data.size() - recv_data.rpos());
KickPlayer(); KickPlayer();
return; return;
} }
+1 -1
View File
@@ -84,7 +84,7 @@ WorldSession::~WorldSession()
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
{ {
sLog.outError("Client (account %u) send packet %s (%u) with size %u but expected %u (attempt crash server?), skipped", sLog.outError("Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt crash server?), skipped",
GetAccountId(),LookupOpcodeName(packet.GetOpcode()),packet.GetOpcode(),packet.size(),size); GetAccountId(),LookupOpcodeName(packet.GetOpcode()),packet.GetOpcode(),packet.size(),size);
} }