diff options
| author | Shauren <shauren.trinity@gmail.com> | 2014-10-25 15:04:38 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2014-10-25 15:04:38 +0200 |
| commit | a363c88f03f2d8ca26d8b2143027a49e0fe75111 (patch) | |
| tree | d289f3ff7b21d7a8c6b2a6649a8b6ccc779115fa /src/server/scripts | |
| parent | ddd57d33325ba710b52135146587497d7fa4145f (diff) | |
Core/Guilds: Fifth part of converting int to bigint guids in database
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_group.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_list.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index 44e108c5c9b..3d524b79e79 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -292,7 +292,7 @@ public: if (!groupTarget) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER); - stmt->setUInt32(0, guidTarget.GetCounter()); + stmt->setUInt64(0, guidTarget.GetCounter()); PreparedQueryResult resultGroup = CharacterDatabase.Query(stmt); if (resultGroup) groupTarget = sGroupMgr->GetGroupByDbStoreId((*resultGroup)[0].GetUInt32()); diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 2194d0a7605..2afac2ab0c2 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -314,13 +314,13 @@ public: do { Field* fields = result->Fetch(); - uint32 itemGuid = fields[0].GetUInt32(); - uint32 guildGuid = fields[1].GetUInt32(); + ObjectGuid itemGuid(HIGHGUID_ITEM, fields[0].GetUInt64()); + ObjectGuid guildGuid(HIGHGUID_GUILD, fields[1].GetUInt64()); std::string guildName = fields[2].GetString(); char const* itemPos = "[in guild bank]"; - handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid, guildName.c_str(), guildGuid, itemPos); + handler->PSendSysMessage(LANG_ITEMLIST_GUILD, itemGuid.ToString().c_str(), guildName.c_str(), guildGuid.ToString().c_str(), itemPos); } while (result->NextRow()); diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index caba2723ab4..c1aee9620b8 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1479,7 +1479,7 @@ public: std::string zoneName = handler->GetTrinityString(LANG_UNKNOWN); // Guild data print variables defined so that they exist, but are not necessarily used - uint32 guildId = 0; + ObjectGuid::LowType guildId = 0; uint8 guildRankId = 0; std::string guildName; std::string guildRank; @@ -1624,19 +1624,19 @@ public: { Field* fields = result4->Fetch(); xp = fields[0].GetUInt32(); // Used for "current xp" output and "%u XP Left" calculation - uint32 gguid = fields[1].GetUInt32(); // We check if have a guild for the person, so we might not require to query it at all + ObjectGuid::LowType gguid = fields[1].GetUInt64(); // We check if have a guild for the person, so we might not require to query it at all xptotal = sObjectMgr->GetXPForLevel(level); - if (gguid != 0) + if (gguid) { // Guild Data - an own query, because it may not happen. PreparedStatement* stmt3 = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER_EXTENDED); - stmt3->setUInt32(0, lowguid); + stmt3->setUInt64(0, lowguid); PreparedQueryResult result5 = CharacterDatabase.Query(stmt3); if (result5) { Field* fields5 = result5->Fetch(); - guildId = fields5[0].GetUInt32(); + guildId = fields5[0].GetUInt64(); guildName = fields5[1].GetString(); guildRank = fields5[2].GetString(); guildRankId = fields5[3].GetUInt8(); |
