diff options
| author | Spp- <u84280@epreinf21.(none)> | 2011-07-29 14:18:28 +0200 |
|---|---|---|
| committer | Spp- <u84280@epreinf21.(none)> | 2011-07-29 14:18:28 +0200 |
| commit | e47b96af3e3a41eae71e3e3da7eeee8bd3de86bc (patch) | |
| tree | 07d5ff1e6e39d792dbe1a89cc373c06702817787 /src/server/game/Server | |
| parent | 06b46ba203d30cc5e2abc9741b2fc737ebdd7c38 (diff) | |
Core: Append single character to stream as character, not as a string
Diffstat (limited to 'src/server/game/Server')
4 files changed, 13 insertions, 14 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index ff6757a5237..c022d81404c 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -1738,12 +1738,12 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) if (playerClass != CLASS_DEATH_KNIGHT) { for (uint8 i = 0; i < numFullTaximasks; ++i) - taximaskstream << uint32(sAllianceTaxiNodesMask[i]) << " "; + taximaskstream << uint32(sAllianceTaxiNodesMask[i]) << ' '; } else { for (uint8 i = 0; i < numFullTaximasks; ++i) - taximaskstream << uint32(sAllianceTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << " "; + taximaskstream << uint32(sAllianceTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' '; } } else @@ -1751,19 +1751,19 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) if (playerClass != CLASS_DEATH_KNIGHT) { for (uint8 i = 0; i < numFullTaximasks; ++i) - taximaskstream << uint32(sHordeTaxiNodesMask[i]) << " "; + taximaskstream << uint32(sHordeTaxiNodesMask[i]) << ' '; } else { for (uint8 i = 0; i < numFullTaximasks; ++i) - taximaskstream << uint32(sHordeTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << " "; + taximaskstream << uint32(sHordeTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' '; } } uint32 numEmptyTaximasks = 11 - numFullTaximasks; for (uint8 i = 0; i < numEmptyTaximasks; ++i) taximaskstream << "0 "; - taximaskstream << "0"; + taximaskstream << '0'; std::string taximask = taximaskstream.str(); trans->PAppend("UPDATE `characters` SET `taximask`= '%s' WHERE `guid` = '%u'", taximask.c_str(), lowGuid); } @@ -1784,7 +1784,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) if (requiredRaces & RACEMASK_ALLIANCE) { quests << uint32(qinfo->GetQuestId()); - quests << ","; + quests << ','; } } else // if (team == BG_TEAM_HORDE) @@ -1792,7 +1792,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) if (requiredRaces & RACEMASK_HORDE) { quests << uint32(qinfo->GetQuestId()); - quests << ","; + quests << ','; } } } diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index ce73bc02e7b..74c51a4f726 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -516,10 +516,9 @@ void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data) void WorldSession::HandleContactListOpcode(WorldPacket & recv_data) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST"); uint32 unk; recv_data >> unk; - sLog->outDebug(LOG_FILTER_NETWORKIO, "unk value is %u", unk); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST - Unk: %d", unk); _player->GetSocial()->SendSocialList(_player); } @@ -537,7 +536,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) if (!normalizePlayerName(friendName)) return; - CharacterDatabase.EscapeString(friendName); // prevent SQL injection - normal name don't must changed by this call + CharacterDatabase.EscapeString(friendName); // prevent SQL injection - normal name must not be changed by this call sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'", GetPlayer()->GetName(), friendName.c_str()); @@ -626,7 +625,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) if (!normalizePlayerName(IgnoreName)) return; - CharacterDatabase.EscapeString(IgnoreName); // prevent SQL injection - normal name don't must changed by this call + CharacterDatabase.EscapeString(IgnoreName); // prevent SQL injection - normal name must not be changed by this call sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'", GetPlayer()->GetName(), IgnoreName.c_str()); diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp index 757fa4082f8..b0ab7ec6e9f 100755 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp @@ -225,12 +225,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) do { Field *fields = result->Fetch(); - ssInvalidPetitionGUIDs << "'" << fields[0].GetUInt32() << "' , "; + ssInvalidPetitionGUIDs << '\'' << fields[0].GetUInt32() << "' , "; } while (result->NextRow()); } // delete petitions with the same guid as this one - ssInvalidPetitionGUIDs << "'" << charter->GetGUIDLow() << "'"; + ssInvalidPetitionGUIDs << '\'' << charter->GetGUIDLow() << '\''; sLog->outDebug(LOG_FILTER_NETWORKIO, "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str()); CharacterDatabase.EscapeString(name); diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp index 1a11a1efb88..5c7026797ed 100755 --- a/src/server/game/Server/Protocol/WorldLog.cpp +++ b/src/server/game/Server/Protocol/WorldLog.cpp @@ -45,7 +45,7 @@ void WorldLog::Initialize() if (!logsDir.empty()) { if ((logsDir.at(logsDir.length()-1) != '/') && (logsDir.at(logsDir.length()-1) != '\\')) - logsDir.append("/"); + logsDir.push_back('/'); } std::string logname = sConfig->GetStringDefault("WorldLogFile", ""); |
