Core/PacketIO: Fixed client crashes with SMSG_UPDATE_TALENT_DATA
Port From (https://github.com/TrinityCore/TrinityCore/commit/a50f671afd0c17b768aa1dd73d3d63476ff5523c)
This commit is contained in:
@@ -549,7 +549,6 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
UpdateTalentData packet = new UpdateTalentData();
|
UpdateTalentData packet = new UpdateTalentData();
|
||||||
packet.Info.PrimarySpecialization = GetPrimarySpecialization();
|
packet.Info.PrimarySpecialization = GetPrimarySpecialization();
|
||||||
packet.Info.ActiveGroup = GetActiveTalentGroup();
|
|
||||||
|
|
||||||
for (byte i = 0; i < PlayerConst.MaxSpecializations; ++i)
|
for (byte i = 0; i < PlayerConst.MaxSpecializations; ++i)
|
||||||
{
|
{
|
||||||
@@ -607,7 +606,11 @@ namespace Game.Entities
|
|||||||
groupInfoPkt.PvPTalentIDs.Add((ushort)pvpTalents[slot]);
|
groupInfoPkt.PvPTalentIDs.Add((ushort)pvpTalents[slot]);
|
||||||
}
|
}
|
||||||
|
|
||||||
packet.Info.TalentGroups.Add(groupInfoPkt);
|
if (i == GetActiveTalentGroup())
|
||||||
|
packet.Info.ActiveGroup = (byte)packet.Info.TalentGroups.Count;
|
||||||
|
|
||||||
|
if (!groupInfoPkt.TalentIDs.Empty() || !groupInfoPkt.PvPTalentIDs.Empty() || i == GetActiveTalentGroup())
|
||||||
|
packet.Info.TalentGroups.Add(groupInfoPkt);
|
||||||
}
|
}
|
||||||
|
|
||||||
SendPacket(packet);
|
SendPacket(packet);
|
||||||
|
|||||||
Reference in New Issue
Block a user