aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Tools/PlayerDump.cpp
diff options
context:
space:
mode:
authorChaplain <aionthefirst@gmail.com>2011-08-23 18:05:01 +0300
committerChaplain <aionthefirst@gmail.com>2011-08-23 18:09:08 +0300
commitfb2784851099de42c81b10be9820cdb126fc2a56 (patch)
tree1d5cba64a4b7d21ad5d3fc7fdc72af1b5019f083 /src/server/game/Tools/PlayerDump.cpp
parent7e1f3ceb4435e89a8757e4824700def4b8ecbc12 (diff)
Core: Clean up here and there.
*replase postfix iterator increment\decrement with prefix in cycles *replase strlen(*char) != 0 with *char[0] != '\0' *replase strlen(rStr.c_str()) with rStr.length()
Diffstat (limited to 'src/server/game/Tools/PlayerDump.cpp')
-rw-r--r--src/server/game/Tools/PlayerDump.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp
index 4c464f92606..7961c705d5b 100644
--- a/src/server/game/Tools/PlayerDump.cpp
+++ b/src/server/game/Tools/PlayerDump.cpp
@@ -176,7 +176,7 @@ bool changeGuid(std::string &str, int n, std::map<uint32, uint32> &guidMap, uint
return true; // not an error
uint32 newGuid = registerNewGuid(oldGuid, guidMap, hiGuid);
- snprintf(chritem, 20, "%d", newGuid);
+ snprintf(chritem, 20, "%u", newGuid);
return changenth(str, n, chritem, false, nonzero);
}
@@ -189,7 +189,7 @@ bool changetokGuid(std::string &str, int n, std::map<uint32, uint32> &guidMap, u
return true; // not an error
uint32 newGuid = registerNewGuid(oldGuid, guidMap, hiGuid);
- snprintf(chritem, 20, "%d", newGuid);
+ snprintf(chritem, 20, "%u", newGuid);
return changetoknth(str, n, chritem, false, nonzero);
}
@@ -421,9 +421,9 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s
// name encoded or empty
- snprintf(newguid, 20, "%d", guid);
- snprintf(chraccount, 20, "%d", account);
- snprintf(newpetid, 20, "%d", sObjectMgr->GeneratePetNumber());
+ snprintf(newguid, 20, "%u", guid);
+ snprintf(chraccount, 20, "%u", account);
+ snprintf(newpetid, 20, "%u", sObjectMgr->GeneratePetNumber());
snprintf(lastpetid, 20, "%s", "");
std::map<uint32, uint32> items;