Core/DataStores: Updated db2 structures to 8.2.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/3ac790287aba5f7d7c3bccf79e608de9119e461a)
This commit is contained in:
@@ -1315,7 +1315,7 @@ namespace Game.Guilds
|
||||
|
||||
public bool LoadBankItemFromDB(SQLFields field)
|
||||
{
|
||||
byte tabId = field.Read<byte>(45);
|
||||
byte tabId = field.Read<byte>(44);
|
||||
if (tabId >= _GetPurchasedTabsSize())
|
||||
{
|
||||
Log.outError(LogFilter.Guild, "Invalid tab for item (GUID: {0}, id: {1}) in guild bank, skipped.",
|
||||
@@ -3218,7 +3218,7 @@ namespace Game.Guilds
|
||||
|
||||
public bool LoadItemFromDB(SQLFields field)
|
||||
{
|
||||
byte slotId = field.Read<byte>(46);
|
||||
byte slotId = field.Read<byte>(45);
|
||||
uint itemGuid = field.Read<uint>(0);
|
||||
uint itemEntry = field.Read<uint>(1);
|
||||
if (slotId >= GuildConst.MaxBankSlots)
|
||||
|
||||
@@ -339,10 +339,9 @@ namespace Game
|
||||
|
||||
// Delete orphaned guild bank tab entries before loading the valid ones
|
||||
DB.Characters.DirectExecute("DELETE gbt FROM guild_bank_tab gbt LEFT JOIN guild g ON gbt.guildId = g.guildId WHERE g.guildId IS NULL");
|
||||
|
||||
// 0 1 2 3 4
|
||||
|
||||
// 0 1 2 3 4
|
||||
SQLResult result = DB.Characters.Query("SELECT guildid, TabId, TabName, TabIcon, TabText FROM guild_bank_tab ORDER BY guildid ASC, TabId ASC");
|
||||
|
||||
if (result.IsEmpty())
|
||||
{
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded 0 guild bank tabs. DB table `guild_bank_tab` is empty.");
|
||||
@@ -383,7 +382,7 @@ namespace Game
|
||||
uint count = 0;
|
||||
do
|
||||
{
|
||||
ulong guildId = result.Read<ulong>(44);
|
||||
ulong guildId = result.Read<ulong>(43);
|
||||
Guild guild = GetGuildById(guildId);
|
||||
if (guild)
|
||||
guild.LoadBankItemFromDB(result.GetFields());
|
||||
|
||||
Reference in New Issue
Block a user