Core: Updated to 11.2.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/5cf0c6c8bb2c4e58a2d66ba5f304af34d18a4782)
This commit is contained in:
@@ -22,12 +22,16 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt32(talentGroupInfo.SpecID);
|
||||
_worldPacket.WriteInt32(talentGroupInfo.TalentIDs.Count);
|
||||
_worldPacket.WriteInt32(talentGroupInfo.PvPTalents.Count);
|
||||
_worldPacket.WriteInt32(talentGroupInfo.GlyphIDs.Count);
|
||||
|
||||
foreach (var talentID in talentGroupInfo.TalentIDs)
|
||||
_worldPacket.WriteUInt16(talentID);
|
||||
|
||||
foreach (PvPTalent talent in talentGroupInfo.PvPTalents)
|
||||
talent.Write(_worldPacket);
|
||||
|
||||
foreach (uint talent in talentGroupInfo.GlyphIDs)
|
||||
_worldPacket.WriteUInt16((ushort)talent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +42,7 @@ namespace Game.Networking.Packets
|
||||
public uint SpecID;
|
||||
public List<ushort> TalentIDs = new();
|
||||
public List<PvPTalent> PvPTalents = new();
|
||||
public List<uint> GlyphIDs = new();
|
||||
}
|
||||
|
||||
public class TalentInfoUpdate
|
||||
@@ -183,6 +188,9 @@ namespace Game.Networking.Packets
|
||||
|
||||
struct GlyphBinding
|
||||
{
|
||||
uint SpellID;
|
||||
ushort GlyphID;
|
||||
|
||||
public GlyphBinding(uint spellId, ushort glyphId)
|
||||
{
|
||||
SpellID = spellId;
|
||||
@@ -194,8 +202,66 @@ namespace Game.Networking.Packets
|
||||
data.WriteUInt32(SpellID);
|
||||
data.WriteUInt16(GlyphID);
|
||||
}
|
||||
}
|
||||
|
||||
uint SpellID;
|
||||
ushort GlyphID;
|
||||
public struct ClassicTalentEntry
|
||||
{
|
||||
public int TalentID;
|
||||
public int Rank;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(TalentID);
|
||||
data.WriteInt32(Rank);
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassicTalentGroupInfo
|
||||
{
|
||||
public byte NumTalents;
|
||||
public List<ClassicTalentEntry> Talents = new();
|
||||
public byte NumGlyphs;
|
||||
public List<ushort> GlyphIDs = new();
|
||||
public sbyte Role;
|
||||
public int PrimarySpecialization;
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteUInt8(NumTalents);
|
||||
data.WriteInt32(Talents.Count);
|
||||
|
||||
data.WriteUInt8(NumGlyphs);
|
||||
data.WriteInt32(GlyphIDs.Count);
|
||||
|
||||
data.WriteInt8(Role);
|
||||
data.WriteInt32(PrimarySpecialization);
|
||||
|
||||
foreach (ClassicTalentEntry talentEntry in Talents)
|
||||
talentEntry.Write(data);
|
||||
|
||||
foreach (ushort id in GlyphIDs)
|
||||
data.WriteUInt16(id);
|
||||
}
|
||||
}
|
||||
|
||||
public class ClassicTalentInfoUpdate
|
||||
{
|
||||
public int UnspentTalentPoints;
|
||||
public byte ActiveGroup;
|
||||
public bool IsPetTalents;
|
||||
public List<ClassicTalentGroupInfo> Talents = new();
|
||||
|
||||
public void Write(WorldPacket data)
|
||||
{
|
||||
data.WriteInt32(UnspentTalentPoints);
|
||||
data.WriteUInt8(ActiveGroup);
|
||||
data.WriteInt32(Talents.Count);
|
||||
|
||||
foreach (ClassicTalentGroupInfo talents in Talents)
|
||||
talents.Write(data);
|
||||
|
||||
data.WriteBit(IsPetTalents);
|
||||
data.FlushBits();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user