Core/PacketIO: Updated packet structures to 9.2.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/d3c4216de8e1dcb9f62d2fcc1b9b72852e5409c9)
This commit is contained in:
hondacrx
2022-06-03 20:01:55 -04:00
parent 598cdb6947
commit 4efe624af1
24 changed files with 957 additions and 776 deletions
@@ -3569,7 +3569,7 @@ namespace Game.Entities
public UpdateFieldArray<float> WeaponDmgMultipliers = new(3, 585, 586);
public UpdateFieldArray<float> WeaponAtkSpeedMultipliers = new(3, 585, 589);
public UpdateFieldArray<uint> BuybackPrice = new(12, 592, 593);
public UpdateFieldArray<uint> BuybackTimestamp = new(12, 592, 605);
public UpdateFieldArray<long> BuybackTimestamp = new(12, 592, 605);
public UpdateFieldArray<uint> CombatRatings = new(32, 617, 618);
public UpdateFieldArray<PVPInfo> PvpInfo = new(6, 650, 651);
public UpdateFieldArray<uint> NoReagentCostMask = new(4, 657, 658);
@@ -3658,7 +3658,7 @@ namespace Game.Entities
for (int i = 0; i < 12; ++i)
{
data.WriteUInt32(BuybackPrice[i]);
data.WriteUInt32(BuybackTimestamp[i]);
data.WriteInt64(BuybackTimestamp[i]);
}
data.WriteUInt16(TodayHonorableKills);
data.WriteUInt16(YesterdayHonorableKills);
@@ -4697,7 +4697,7 @@ namespace Game.Entities
}
if (changesMask[605 + i])
{
data.WriteUInt32(BuybackTimestamp[i]);
data.WriteInt64(BuybackTimestamp[i]);
}
}
}
+1 -3
View File
@@ -3806,10 +3806,8 @@ namespace Game.Entities
Direction = data.ReadVector3();
TransportID = data.ReadUInt32();
Magnitude = data.ReadFloat();
Unused910 = data.ReadInt32();
Type = (MovementForceType)data.ReadBits<byte>(2);
bool has910 = data.HasBit();
if (has910)
Unused910 = data.ReadInt32();
}
public void Write(WorldPacket data)
+3 -4
View File
@@ -3025,7 +3025,7 @@ namespace Game.Entities
// if current back slot non-empty search oldest or free
if (m_items[slot] != null)
{
uint oldest_time = m_activePlayerData.BuybackTimestamp[0];
long oldest_time = m_activePlayerData.BuybackTimestamp[0];
uint oldest_slot = InventorySlots.BuyBackStart;
for (byte i = InventorySlots.BuyBackStart + 1; i < InventorySlots.BuyBackEnd; ++i)
@@ -3037,8 +3037,7 @@ namespace Game.Entities
break;
}
uint i_time = m_activePlayerData.BuybackTimestamp[i - InventorySlots.BuyBackStart];
long i_time = m_activePlayerData.BuybackTimestamp[i - InventorySlots.BuyBackStart];
if (oldest_time > i_time)
{
oldest_time = i_time;
@@ -3489,7 +3488,7 @@ namespace Game.Entities
DB.Characters.CommitTransaction(trans);
}
public void SetBuybackPrice(uint slot, uint price) { SetUpdateFieldValue(ref m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.BuybackPrice, (int)slot), price); }
public void SetBuybackTimestamp(uint slot, uint timestamp) { SetUpdateFieldValue(ref m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.BuybackTimestamp, (int)slot), timestamp); }
public void SetBuybackTimestamp(uint slot, long timestamp) { SetUpdateFieldValue(ref m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.BuybackTimestamp, (int)slot), timestamp); }
public Item GetItemFromBuyBackSlot(uint slot)
{