aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Guilds/Guild.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-25 15:04:38 +0200
committerShauren <shauren.trinity@gmail.com>2014-10-25 15:04:38 +0200
commita363c88f03f2d8ca26d8b2143027a49e0fe75111 (patch)
treed289f3ff7b21d7a8c6b2a6649a8b6ccc779115fa /src/server/game/Guilds/Guild.cpp
parentddd57d33325ba710b52135146587497d7fa4145f (diff)
Core/Guilds: Fifth part of converting int to bigint guids in database
Diffstat (limited to 'src/server/game/Guilds/Guild.cpp')
-rw-r--r--src/server/game/Guilds/Guild.cpp139
1 files changed, 69 insertions, 70 deletions
diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp
index 04d0404d435..77fbf14046b 100644
--- a/src/server/game/Guilds/Guild.cpp
+++ b/src/server/game/Guilds/Guild.cpp
@@ -181,17 +181,17 @@ inline uint32 Guild::LogHolder::GetNextGUID()
void Guild::EventLogEntry::SaveToDB(SQLTransaction& trans) const
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_EVENTLOG);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt32(1, m_guid);
CharacterDatabase.ExecuteOrAppend(trans, stmt);
uint8 index = 0;
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_EVENTLOG);
- stmt->setUInt32( index, m_guildId);
+ stmt->setUInt64( index, m_guildId);
stmt->setUInt32(++index, m_guid);
stmt->setUInt8 (++index, uint8(m_eventType));
- stmt->setUInt32(++index, m_playerGuid1);
- stmt->setUInt32(++index, m_playerGuid2);
+ stmt->setUInt64(++index, m_playerGuid1);
+ stmt->setUInt64(++index, m_playerGuid2);
stmt->setUInt8 (++index, m_newRank);
stmt->setUInt64(++index, m_timestamp);
CharacterDatabase.ExecuteOrAppend(trans, stmt);
@@ -255,18 +255,18 @@ void Guild::BankEventLogEntry::SaveToDB(SQLTransaction& trans) const
uint8 index = 0;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_EVENTLOG);
- stmt->setUInt32( index, m_guildId);
+ stmt->setUInt64( index, m_guildId);
stmt->setUInt32(++index, m_guid);
stmt->setUInt8 (++index, m_bankTabId);
CharacterDatabase.ExecuteOrAppend(trans, stmt);
index = 0;
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_EVENTLOG);
- stmt->setUInt32( index, m_guildId);
+ stmt->setUInt64( index, m_guildId);
stmt->setUInt32(++index, m_guid);
stmt->setUInt8 (++index, m_bankTabId);
stmt->setUInt8 (++index, uint8(m_eventType));
- stmt->setUInt32(++index, m_playerGuid);
+ stmt->setUInt64(++index, m_playerGuid);
stmt->setUInt32(++index, m_itemOrMoney);
stmt->setUInt16(++index, m_itemStackCount);
stmt->setUInt8 (++index, m_destTabId);
@@ -326,10 +326,10 @@ void Guild::NewsLogEntry::SaveToDB(SQLTransaction& trans) const
{
uint8 index = 0;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_NEWS);
- stmt->setUInt32( index, m_guildId);
+ stmt->setUInt64( index, m_guildId);
stmt->setUInt32(++index, GetGUID());
stmt->setUInt8 (++index, GetType());
- stmt->setUInt32(++index, GetPlayerGuid().GetCounter());
+ stmt->setUInt64(++index, GetPlayerGuid().GetCounter());
stmt->setUInt32(++index, GetFlags());
stmt->setUInt32(++index, GetValue());
stmt->setUInt64(++index, GetTimestamp());
@@ -385,7 +385,7 @@ void Guild::RankInfo::LoadFromDB(Field* fields)
void Guild::RankInfo::SaveToDB(SQLTransaction& trans) const
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_RANK);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8 (1, m_rankId);
stmt->setString(2, m_name);
stmt->setUInt32(3, m_rights);
@@ -409,7 +409,7 @@ void Guild::RankInfo::CreateMissingTabsIfNeeded(uint8 tabs, SQLTransaction& tran
TC_LOG_ERROR("guild", "Guild %u has broken Tab %u for rank %u. Created default tab.", m_guildId, i, m_rankId);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8(1, i);
stmt->setUInt8(2, m_rankId);
stmt->setUInt8(3, rightsAndSlots.GetRights());
@@ -428,7 +428,7 @@ void Guild::RankInfo::SetName(std::string const& name)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_NAME);
stmt->setString(0, m_name);
stmt->setUInt8 (1, m_rankId);
- stmt->setUInt32(2, m_guildId);
+ stmt->setUInt64(2, m_guildId);
CharacterDatabase.Execute(stmt);
}
@@ -445,7 +445,7 @@ void Guild::RankInfo::SetRights(uint32 rights)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_RIGHTS);
stmt->setUInt32(0, m_rights);
stmt->setUInt8 (1, m_rankId);
- stmt->setUInt32(2, m_guildId);
+ stmt->setUInt64(2, m_guildId);
CharacterDatabase.Execute(stmt);
}
@@ -462,7 +462,7 @@ void Guild::RankInfo::SetBankMoneyPerDay(uint32 money)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_RANK_BANK_MONEY);
stmt->setUInt32(0, money);
stmt->setUInt8 (1, m_rankId);
- stmt->setUInt32(2, m_guildId);
+ stmt->setUInt64(2, m_guildId);
CharacterDatabase.Execute(stmt);
}
@@ -477,7 +477,7 @@ void Guild::RankInfo::SetBankTabSlotsAndRights(GuildBankRightsAndSlots rightsAnd
if (saveToDB)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_RIGHT);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8 (1, guildBR.GetTabId());
stmt->setUInt8 (2, m_rankId);
stmt->setUInt8 (3, guildBR.GetRights());
@@ -497,28 +497,28 @@ void Guild::BankTab::LoadFromDB(Field* fields)
bool Guild::BankTab::LoadItemFromDB(Field* fields)
{
uint8 slotId = fields[13].GetUInt8();
- uint32 itemGuid = fields[14].GetUInt32();
+ ObjectGuid::LowType itemGuid = fields[14].GetUInt64();
uint32 itemEntry = fields[15].GetUInt32();
if (slotId >= GUILD_BANK_MAX_SLOTS)
{
- TC_LOG_ERROR("guild", "Invalid slot for item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Invalid slot for item (GUID: " UI64FMTD ", id: %u) in guild bank, skipped.", itemGuid, itemEntry);
return false;
}
ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemEntry);
if (!proto)
{
- TC_LOG_ERROR("guild", "Unknown item (GUID: %u, id: %u) in guild bank, skipped.", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Unknown item (GUID: " UI64FMTD ", id: %u) in guild bank, skipped.", itemGuid, itemEntry);
return false;
}
Item* pItem = NewItemOrBag(proto);
if (!pItem->LoadFromDB(itemGuid, ObjectGuid::Empty, fields, itemEntry))
{
- TC_LOG_ERROR("guild", "Item (GUID %u, id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
+ TC_LOG_ERROR("guild", "Item (GUID " UI64FMTD ", id: %u) not found in item_instance, deleting from guild bank!", itemGuid, itemEntry);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_NONEXISTENT_GUILD_BANK_ITEM);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8 (1, m_tabId);
stmt->setUInt8 (2, slotId);
CharacterDatabase.Execute(stmt);
@@ -557,7 +557,7 @@ void Guild::BankTab::SetInfo(std::string const& name, std::string const& icon)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_TAB_INFO);
stmt->setString(0, m_name);
stmt->setString(1, m_icon);
- stmt->setUInt32(2, m_guildId);
+ stmt->setUInt64(2, m_guildId);
stmt->setUInt8 (3, m_tabId);
CharacterDatabase.Execute(stmt);
}
@@ -572,7 +572,7 @@ void Guild::BankTab::SetText(std::string const& text)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_TAB_TEXT);
stmt->setString(0, m_text);
- stmt->setUInt32(1, m_guildId);
+ stmt->setUInt64(1, m_guildId);
stmt->setUInt8 (2, m_tabId);
CharacterDatabase.Execute(stmt);
}
@@ -587,7 +587,7 @@ bool Guild::BankTab::SetItem(SQLTransaction& trans, uint8 slotId, Item* item)
m_items[slotId] = item;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_ITEM);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8 (1, m_tabId);
stmt->setUInt8 (2, slotId);
CharacterDatabase.ExecuteOrAppend(trans, stmt);
@@ -595,10 +595,10 @@ bool Guild::BankTab::SetItem(SQLTransaction& trans, uint8 slotId, Item* item)
if (item)
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_ITEM);
- stmt->setUInt32(0, m_guildId);
+ stmt->setUInt64(0, m_guildId);
stmt->setUInt8 (1, m_tabId);
stmt->setUInt8 (2, slotId);
- stmt->setUInt32(3, item->GetGUID().GetCounter());
+ stmt->setUInt64(3, item->GetGUID().GetCounter());
CharacterDatabase.ExecuteOrAppend(trans, stmt);
item->SetGuidValue(ITEM_FIELD_CONTAINED, ObjectGuid::Empty);
@@ -659,7 +659,7 @@ void Guild::Member::SetPublicNote(std::string const& publicNote)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_PNOTE);
stmt->setString(0, publicNote);
- stmt->setUInt32(1, m_guid.GetCounter());
+ stmt->setUInt64(1, m_guid.GetCounter());
CharacterDatabase.Execute(stmt);
}
@@ -672,7 +672,7 @@ void Guild::Member::SetOfficerNote(std::string const& officerNote)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_OFFNOTE);
stmt->setString(0, officerNote);
- stmt->setUInt32(1, m_guid.GetCounter());
+ stmt->setUInt64(1, m_guid.GetCounter());
CharacterDatabase.Execute(stmt);
}
@@ -686,15 +686,15 @@ void Guild::Member::ChangeRank(uint8 newRank)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MEMBER_RANK);
stmt->setUInt8 (0, newRank);
- stmt->setUInt32(1, m_guid.GetCounter());
+ stmt->setUInt64(1, m_guid.GetCounter());
CharacterDatabase.Execute(stmt);
}
void Guild::Member::SaveToDB(SQLTransaction& trans) const
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_MEMBER);
- stmt->setUInt32(0, m_guildId);
- stmt->setUInt32(1, m_guid.GetCounter());
+ stmt->setUInt64(0, m_guildId);
+ stmt->setUInt64(1, m_guid.GetCounter());
stmt->setUInt8 (2, m_rankId);
stmt->setString(3, m_publicNote);
stmt->setString(4, m_officerNote);
@@ -761,7 +761,7 @@ void Guild::Member::UpdateBankWithdrawValue(SQLTransaction& trans, uint8 tabId,
m_bankWithdraw[tabId] += amount;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_MEMBER_WITHDRAW);
- stmt->setUInt32(0, m_guid.GetCounter());
+ stmt->setUInt64(0, m_guid.GetCounter());
for (uint8 i = 0; i <= GUILD_BANK_MAX_TABS;)
{
uint32 withdraw = m_bankWithdraw[i++];
@@ -819,7 +819,7 @@ void EmblemInfo::WritePacket(WorldPacket& data) const
data << uint32(m_backgroundColor);
}
-void EmblemInfo::SaveToDB(uint32 guildId) const
+void EmblemInfo::SaveToDB(ObjectGuid::LowType guildId) const
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_EMBLEM_INFO);
stmt->setUInt32(0, m_style);
@@ -827,7 +827,7 @@ void EmblemInfo::SaveToDB(uint32 guildId) const
stmt->setUInt32(2, m_borderStyle);
stmt->setUInt32(3, m_borderColor);
stmt->setUInt32(4, m_backgroundColor);
- stmt->setUInt32(5, guildId);
+ stmt->setUInt64(5, guildId);
CharacterDatabase.Execute(stmt);
}
@@ -1158,7 +1158,7 @@ InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
// Guild
Guild::Guild():
- m_id(0),
+ m_id(UI64LIT(0)),
m_leaderGuid(),
m_createdDate(0),
m_accountsNumber(0),
@@ -1226,14 +1226,14 @@ bool Guild::Create(Player* pLeader, std::string const& name)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_MEMBERS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
uint8 index = 0;
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD);
- stmt->setUInt32( index, m_id);
+ stmt->setUInt64( index, m_id);
stmt->setString(++index, name);
- stmt->setUInt32(++index, m_leaderGuid.GetCounter());
+ stmt->setUInt64(++index, m_leaderGuid.GetCounter());
stmt->setString(++index, m_info);
stmt->setString(++index, m_motd);
stmt->setUInt64(++index, uint32(m_createdDate));
@@ -1275,34 +1275,34 @@ void Guild::Disband()
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_RANKS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_TABS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
// Free bank tab used memory and delete items stored in them
_DeleteBankItems(trans, true);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_ITEMS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_RIGHTS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_EVENTLOGS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_EVENTLOGS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
@@ -1320,7 +1320,7 @@ void Guild::SaveToDB()
stmt->setUInt32(0, GetLevel());
stmt->setUInt64(1, GetExperience());
stmt->setUInt64(2, GetTodayExperience());
- stmt->setUInt32(3, GetId());
+ stmt->setUInt64(3, GetId());
trans->Append(stmt);
m_achievementMgr.SaveToDB(trans);
@@ -1369,7 +1369,7 @@ bool Guild::SetName(std::string const& name)
m_name = name;
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_NAME);
stmt->setString(0, m_name);
- stmt->setUInt32(1, GetId());
+ stmt->setUInt64(1, GetId());
CharacterDatabase.Execute(stmt);
ObjectGuid guid = GetGUID();
@@ -1603,7 +1603,7 @@ void Guild::HandleSetMOTD(WorldSession* session, std::string const& motd)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_MOTD);
stmt->setString(0, motd);
- stmt->setUInt32(1, m_id);
+ stmt->setUInt64(1, m_id);
CharacterDatabase.Execute(stmt);
_BroadcastEvent(GE_MOTD, ObjectGuid::Empty, motd.c_str());
@@ -1624,7 +1624,7 @@ void Guild::HandleSetInfo(WorldSession* session, std::string const& info)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_INFO);
stmt->setString(0, info);
- stmt->setUInt32(1, m_id);
+ stmt->setUInt64(1, m_id);
CharacterDatabase.Execute(stmt);
}
}
@@ -1814,7 +1814,7 @@ void Guild::HandleInviteMember(WorldSession* session, std::string const& name)
data << uint32(m_emblemInfo.GetColor());
ObjectGuid oldGuildGuid;
- if (uint32 oldId = pInvitee->GetGuildId())
+ if (ObjectGuid::LowType oldId = pInvitee->GetGuildId())
oldGuildGuid = ObjectGuid(HIGHGUID_GUILD, oldId);
ObjectGuid newGuildGuid = GetGUID();
@@ -2052,12 +2052,12 @@ void Guild::HandleRemoveRank(WorldSession* session, uint8 rankId)
// Delete bank rights for rank
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_RIGHTS_FOR_RANK);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
stmt->setUInt8(1, rankId);
CharacterDatabase.Execute(stmt);
// Delete rank
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_RANK);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
stmt->setUInt8(1, rankId);
CharacterDatabase.Execute(stmt);
@@ -2388,9 +2388,9 @@ void Guild::SendLoginInfo(WorldSession* session)
// Loading methods
bool Guild::LoadFromDB(Field* fields)
{
- m_id = fields[0].GetUInt32();
+ m_id = fields[0].GetUInt64();
m_name = fields[1].GetString();
- m_leaderGuid = ObjectGuid(HIGHGUID_PLAYER, fields[2].GetUInt32());
+ m_leaderGuid = ObjectGuid(HIGHGUID_PLAYER, fields[2].GetUInt64());
m_emblemInfo.LoadFromDB(fields);
m_info = fields[8].GetString();
m_motd = fields[9].GetString();
@@ -2423,7 +2423,7 @@ void Guild::LoadRankFromDB(Field* fields)
bool Guild::LoadMemberFromDB(Field* fields)
{
- uint32 lowguid = fields[1].GetUInt32();
+ ObjectGuid::LowType lowguid = fields[1].GetUInt64();
Member *member = new Member(m_id, ObjectGuid(HIGHGUID_PLAYER, lowguid), fields[2].GetUInt8());
if (!member->LoadFromDB(fields))
{
@@ -2453,8 +2453,8 @@ bool Guild::LoadEventLogFromDB(Field* fields)
fields[1].GetUInt32(), // guid
time_t(fields[6].GetUInt32()), // timestamp
GuildEventLogTypes(fields[2].GetUInt8()), // event type
- fields[3].GetUInt32(), // player guid 1
- fields[4].GetUInt32(), // player guid 2
+ fields[3].GetUInt64(), // player guid 1
+ fields[4].GetUInt64(), // player guid 2
fields[5].GetUInt8())); // rank
return true;
}
@@ -2492,8 +2492,8 @@ bool Guild::LoadBankEventLogFromDB(Field* fields)
time_t(fields[8].GetUInt32()), // timestamp
dbTabId, // tab id
eventType, // event type
- fields[4].GetUInt32(), // player guid
- fields[5].GetUInt32(), // item or money
+ fields[4].GetUInt64(), // player guid
+ fields[5].GetUInt64(), // item or money
fields[6].GetUInt16(), // itam stack count
fields[7].GetUInt8())); // dest tab id
}
@@ -2511,7 +2511,7 @@ void Guild::LoadGuildNewsLogFromDB(Field* fields)
fields[1].GetUInt32(), // guid
fields[6].GetUInt32(), // timestamp //64 bits?
GuildNews(fields[2].GetUInt8()), // type
- ObjectGuid(HIGHGUID_PLAYER, fields[3].GetUInt32()), // player guid
+ ObjectGuid(HIGHGUID_PLAYER, fields[3].GetUInt64()), // player guid
fields[4].GetUInt32(), // Flags
fields[5].GetUInt32())); // value
}
@@ -2777,7 +2777,6 @@ bool Guild::AddMember(ObjectGuid guid, uint8 rankId)
void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool canDeleteGuild)
{
- uint32 lowguid = guid.GetCounter();
Player* player = ObjectAccessor::FindConnectedPlayer(guid);
// Guild master can be deleted when loading guild and guid doesn't exist in characters table
@@ -2835,7 +2834,7 @@ void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool
player->RemoveSpell(entry->SpellId, false, false);
}
- _DeleteMemberFromDB(lowguid);
+ _DeleteMemberFromDB(guid.GetCounter());
if (!isDisbanding)
_UpdateAccountsNumber();
}
@@ -2912,12 +2911,12 @@ void Guild::_CreateNewBankTab()
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_TAB);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
stmt->setUInt8 (1, tabId);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_BANK_TAB);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
stmt->setUInt8 (1, tabId);
trans->Append(stmt);
@@ -2931,11 +2930,11 @@ void Guild::_CreateNewBankTab()
void Guild::_CreateDefaultGuildRanks(LocaleConstant loc)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_RANKS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
CharacterDatabase.Execute(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_BANK_RIGHTS);
- stmt->setUInt32(0, m_id);
+ stmt->setUInt64(0, m_id);
CharacterDatabase.Execute(stmt);
_CreateRank(sObjectMgr->GetTrinityString(LANG_GUILD_MASTER, loc), GR_RIGHT_ALL);
@@ -3012,7 +3011,7 @@ bool Guild::_ModifyBankMoney(SQLTransaction& trans, uint64 amount, bool add)
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_BANK_MONEY);
stmt->setUInt64(0, m_bankMoney);
- stmt->setUInt32(1, m_id);
+ stmt->setUInt64(1, m_id);
trans->Append(stmt);
return true;
}
@@ -3026,8 +3025,8 @@ void Guild::_SetLeaderGUID(Member* pLeader)
pLeader->ChangeRank(GR_GUILDMASTER);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_LEADER);
- stmt->setUInt32(0, m_leaderGuid.GetCounter());
- stmt->setUInt32(1, m_id);
+ stmt->setUInt64(0, m_leaderGuid.GetCounter());
+ stmt->setUInt64(1, m_id);
CharacterDatabase.Execute(stmt);
}
@@ -3141,7 +3140,7 @@ inline bool Guild::_MemberHasTabRights(ObjectGuid guid, uint8 tabId, uint32 righ
}
// Add new event log record
-inline void Guild::_LogEvent(GuildEventLogTypes eventType, uint32 playerGuid1, uint32 playerGuid2, uint8 newRank)
+inline void Guild::_LogEvent(GuildEventLogTypes eventType, ObjectGuid::LowType playerGuid1, ObjectGuid::LowType playerGuid2, uint8 newRank)
{
SQLTransaction trans = CharacterDatabase.BeginTransaction();
m_eventLog->AddEvent(trans, new EventLogEntry(m_id, m_eventLog->GetNextGUID(), eventType, playerGuid1, playerGuid2, newRank));
@@ -3151,7 +3150,7 @@ inline void Guild::_LogEvent(GuildEventLogTypes eventType, uint32 playerGuid1, u
}
// Add new bank event log record
-void Guild::_LogBankEvent(SQLTransaction& trans, GuildBankEventLogTypes eventType, uint8 tabId, uint32 lowguid, uint32 itemOrMoney, uint16 itemStackCount, uint8 destTabId)
+void Guild::_LogBankEvent(SQLTransaction& trans, GuildBankEventLogTypes eventType, uint8 tabId, ObjectGuid::LowType lowguid, uint64 itemOrMoney, uint16 itemStackCount, uint8 destTabId)
{
if (tabId > GUILD_BANK_MAX_TABS)
return;