Core/Items: Implemented CreateTime item field and changed refund/soulbound trade timers to also count time offline

Port From (https://github.com/TrinityCore/TrinityCore/commit/69da702b930d43738bcaf49ce57b333dfc19ecfd)
This commit is contained in:
Hondacrx
2024-08-05 19:24:12 -04:00
parent e0b26db0f9
commit 83fadf3a81
9 changed files with 68 additions and 90 deletions
+2 -2
View File
@@ -1403,7 +1403,7 @@ namespace Game.Guilds
public bool LoadBankItemFromDB(SQLFields field)
{
byte tabId = field.Read<byte>(52);
byte tabId = field.Read<byte>(53);
if (tabId >= _GetPurchasedTabsSize())
{
Log.outError(LogFilter.Guild, "Invalid tab for item (GUID: {0}, id: {1}) in guild bank, skipped.",
@@ -3371,7 +3371,7 @@ namespace Game.Guilds
public bool LoadItemFromDB(SQLFields field)
{
byte slotId = field.Read<byte>(53);
byte slotId = field.Read<byte>(54);
uint itemGuid = field.Read<uint>(0);
uint itemEntry = field.Read<uint>(1);
if (slotId >= GuildConst.MaxBankSlots)
+1 -1
View File
@@ -368,7 +368,7 @@ namespace Game
uint count = 0;
do
{
ulong guildId = result.Read<ulong>(51);
ulong guildId = result.Read<ulong>(52);
Guild guild = GetGuildById(guildId);
if (guild != null)
guild.LoadBankItemFromDB(result.GetFields());