diff options
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_character.cpp | 26 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_lookup.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_reset.cpp | 4 |
5 files changed, 22 insertions, 22 deletions
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index f51227151a5..b31c0b11d39 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -105,7 +105,7 @@ public: if (isNumeric(searchString.c_str())) { stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_DEL_INFO_BY_GUID); - stmt->setUInt32(0, uint32(atoi(searchString.c_str()))); + stmt->setUInt64(0, uint32(atoi(searchString.c_str()))); result = CharacterDatabase.Query(stmt); } // search by name @@ -133,7 +133,7 @@ public: DeletedInfo info; - info.guid = ObjectGuid(HIGHGUID_PLAYER, fields[0].GetUInt32()); + info.guid = ObjectGuid(HIGHGUID_PLAYER, fields[0].GetUInt64()); info.name = fields[1].GetString(); info.accountId = fields[2].GetUInt32(); @@ -220,11 +220,11 @@ public: PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_RESTORE_DELETE_INFO); stmt->setString(0, delInfo.name); stmt->setUInt32(1, delInfo.accountId); - stmt->setUInt32(2, delInfo.guid.GetCounter()); + stmt->setUInt64(2, delInfo.guid.GetCounter()); CharacterDatabase.Execute(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_DATA); - stmt->setUInt32(0, delInfo.guid.GetCounter()); + stmt->setUInt64(0, delInfo.guid.GetCounter()); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) sWorld->AddCharacterNameData(delInfo.guid, delInfo.name, (*result)[2].GetUInt8(), (*result)[0].GetUInt8(), (*result)[1].GetUInt8(), (*result)[3].GetUInt8()); } @@ -252,7 +252,7 @@ public: // Update level and reset XP, everything else will be updated at login PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_LEVEL); stmt->setUInt8(0, uint8(newLevel)); - stmt->setUInt32(1, playerGuid.GetCounter()); + stmt->setUInt64(1, playerGuid.GetCounter()); CharacterDatabase.Execute(stmt); } } @@ -382,7 +382,7 @@ public: { stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_NAME_BY_GUID); stmt->setString(0, newName); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); CharacterDatabase.Execute(stmt); } @@ -420,7 +420,7 @@ public: PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RENAME)); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); CharacterDatabase.Execute(stmt); } } @@ -483,12 +483,12 @@ public: { handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str()); target->SetAtLoginFlag(AT_LOGIN_CUSTOMIZE); - stmt->setUInt32(1, target->GetGUID().GetCounter()); + stmt->setUInt64(1, target->GetGUID().GetCounter()); } else { std::string oldNameLink = handler->playerLink(targetName); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.ToString().c_str()); } CharacterDatabase.Execute(stmt); @@ -511,13 +511,13 @@ public: { handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str()); target->SetAtLoginFlag(AT_LOGIN_CHANGE_FACTION); - stmt->setUInt32(1, target->GetGUID().GetCounter()); + stmt->setUInt64(1, target->GetGUID().GetCounter()); } else { std::string oldNameLink = handler->playerLink(targetName); handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.ToString().c_str()); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); } CharacterDatabase.Execute(stmt); @@ -539,14 +539,14 @@ public: /// @todo add text into database handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER, handler->GetNameLink(target).c_str()); target->SetAtLoginFlag(AT_LOGIN_CHANGE_RACE); - stmt->setUInt32(1, target->GetGUID().GetCounter()); + stmt->setUInt64(1, target->GetGUID().GetCounter()); } else { std::string oldNameLink = handler->playerLink(targetName); /// @todo add text into database handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.ToString().c_str()); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); } CharacterDatabase.Execute(stmt); diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 20ebb24b6ad..2194d0a7605 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -282,14 +282,14 @@ public: do { Field* fields = result->Fetch(); - uint64 itemGuid = fields[0].GetUInt64(); - uint64 owner = fields[1].GetUInt64(); + ObjectGuid itemGuid(HIGHGUID_ITEM, fields[0].GetUInt64()); + ObjectGuid owner(HIGHGUID_PLAYER, fields[1].GetUInt64()); uint32 ownerAccountId = fields[2].GetUInt32(); std::string ownerName = fields[3].GetString(); char const* itemPos = "[in auction]"; - handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid, ownerName.c_str(), owner, ownerAccountId, itemPos); + handler->PSendSysMessage(LANG_ITEMLIST_AUCTION, itemGuid.ToString().c_str(), ownerName.c_str(), owner.ToString().c_str(), ownerAccountId, itemPos); } while (result->NextRow()); } diff --git a/src/server/scripts/Commands/cs_lookup.cpp b/src/server/scripts/Commands/cs_lookup.cpp index 4c4bd5fb297..169d66d1222 100644 --- a/src/server/scripts/Commands/cs_lookup.cpp +++ b/src/server/scripts/Commands/cs_lookup.cpp @@ -1280,10 +1280,10 @@ public: do { Field* characterFields = result2->Fetch(); - uint32 guid = characterFields[0].GetUInt32(); + ObjectGuid guid(HIGHGUID_PLAYER, characterFields[0].GetUInt64()); std::string name = characterFields[1].GetString(); - handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid); + handler->PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER, name.c_str(), guid.ToString().c_str()); ++counter; } while (result2->NextRow() && (limit == -1 || counter < limit)); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 089f5e7a77b..caba2723ab4 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1517,7 +1517,7 @@ public: // Query informations from the DB stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_PINFO); - stmt->setUInt32(0, lowguid); + stmt->setUInt64(0, lowguid); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) @@ -1617,7 +1617,7 @@ public: // Can be used to query data from Characters database stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PINFO_XP); - stmt2->setUInt32(0, lowguid); + stmt2->setUInt64(0, lowguid); PreparedQueryResult result4 = CharacterDatabase.Query(stmt2); if (result4) diff --git a/src/server/scripts/Commands/cs_reset.cpp b/src/server/scripts/Commands/cs_reset.cpp index 1b2fc2c0509..46fe0c64330 100644 --- a/src/server/scripts/Commands/cs_reset.cpp +++ b/src/server/scripts/Commands/cs_reset.cpp @@ -172,7 +172,7 @@ public: { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_RESET_SPELLS)); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); CharacterDatabase.Execute(stmt); handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, targetName.c_str()); @@ -246,7 +246,7 @@ public: { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG); stmt->setUInt16(0, uint16(AT_LOGIN_NONE | AT_LOGIN_RESET_PET_TALENTS)); - stmt->setUInt32(1, targetGuid.GetCounter()); + stmt->setUInt64(1, targetGuid.GetCounter()); CharacterDatabase.Execute(stmt); std::string nameLink = handler->playerLink(targetName); |
