diff options
author | megamage <none@none> | 2009-02-24 11:14:28 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-24 11:14:28 -0600 |
commit | 699bc588b86a5176fce0900804fb7d00425383fe (patch) | |
tree | 18dde44b0118d86bfeaf294f7917c7ff0310fbbd /src/game/Debugcmds.cpp | |
parent | 9d160c855fe950d96386165fe7f6e484b427b89d (diff) |
[7330] Code warnings and style cleanups. Some bugs fixes. Author: VladimirMangos
1) comparison singed and unsigned values
2) redundent includes
3) wrong constructor :-part field initilization
4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
5) explicitly list not implemented achievement types.
Also bugs fixed:
1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Debugcmds.cpp')
-rw-r--r-- | src/game/Debugcmds.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 68e934abc7c..4d8e8f8fd77 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -90,9 +90,6 @@ bool ChatHandler::HandleSetPoiCommand(const char* args) return false; uint32 icon = atol(icon_text); - if ( icon < 0 ) - icon = 0; - uint32 flags = atol(flags_text); sLog.outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon,flags); @@ -278,8 +275,7 @@ bool ChatHandler::HandleSendChatMsgCommand(const char* args) bool ChatHandler::HandleSendQuestPartyMsgCommand(const char* args) { uint32 msg = atol((char*)args); - if (msg >= 0) - m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg); + m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg); return true; } @@ -296,8 +292,7 @@ bool ChatHandler::HandleGetLootRecipient(const char* /*args*/) bool ChatHandler::HandleSendQuestInvalidMsgCommand(const char* args) { uint32 msg = atol((char*)args); - if (msg >= 0) - m_session->GetPlayer()->SendCanTakeQuestResponse(msg); + m_session->GetPlayer()->SendCanTakeQuestResponse(msg); return true; } @@ -640,11 +635,11 @@ bool ChatHandler::HandleSpawnVehicle(const char* args) return true; } -bool ChatHandler::HandleSendLargePacketCommand(const char* args) +bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/) { const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. "; std::ostringstream ss; - while(strlen(ss.str().c_str()) < 128000) + while(ss.str().size() < 128000) ss << stuffingString; SendSysMessage(ss.str().c_str()); return true; |