Skip to content

Commit

Permalink
Fixed QuestSession updatefields structure for 11.0.x builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Dec 18, 2024
1 parent bd9a422 commit 7a03593
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2955,7 +2955,7 @@ public static IQuestSession ReadCreateQuestSession(Packet packet, params object[
var data = new QuestSession();
packet.ResetBitReader();
data.Owner = packet.ReadPackedGuid128("Owner", indexes);
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 960; ++i)
{
data.QuestCompleted[i] = packet.ReadUInt64("QuestCompleted", indexes, i);
}
Expand All @@ -2966,11 +2966,11 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
{
var data = new QuestSession();
packet.ResetBitReader();
var rawChangesMask = new int[30];
var rawChangesMask = new int[31];
var rawMaskMask = new int[1];
rawMaskMask[0] = (int)packet.ReadBits(30);
rawMaskMask[0] = (int)packet.ReadBits(31);
var maskMask = new BitArray(rawMaskMask);
for (var i = 0; i < 30; ++i)
for (var i = 0; i < 31; ++i)
if (maskMask[i])
rawChangesMask[i] = (int)packet.ReadBits(32);
var changesMask = new BitArray(rawChangesMask);
Expand All @@ -2985,7 +2985,7 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
}
if (changesMask[2])
{
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 960; ++i)
{
if (changesMask[3 + i])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3001,7 +3001,7 @@ public static IQuestSession ReadCreateQuestSession(Packet packet, params object[
var data = new QuestSession();
packet.ResetBitReader();
data.Owner = packet.ReadPackedGuid128("Owner", indexes);
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 960; ++i)
{
data.QuestCompleted[i] = packet.ReadUInt64("QuestCompleted", indexes, i);
}
Expand All @@ -3012,11 +3012,11 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
{
var data = new QuestSession();
packet.ResetBitReader();
var rawChangesMask = new int[30];
var rawChangesMask = new int[31];
var rawMaskMask = new int[1];
rawMaskMask[0] = (int)packet.ReadBits(30);
rawMaskMask[0] = (int)packet.ReadBits(31);
var maskMask = new BitArray(rawMaskMask);
for (var i = 0; i < 30; ++i)
for (var i = 0; i < 31; ++i)
if (maskMask[i])
rawChangesMask[i] = (int)packet.ReadBits(32);
var changesMask = new BitArray(rawChangesMask);
Expand All @@ -3031,7 +3031,7 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
}
if (changesMask[2])
{
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 960; ++i)
{
if (changesMask[3 + i])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3035,7 +3035,7 @@ public static IQuestSession ReadCreateQuestSession(Packet packet, params object[
var data = new QuestSession();
packet.ResetBitReader();
data.Owner = packet.ReadPackedGuid128("Owner", indexes);
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 1000; ++i)
{
data.QuestCompleted[i] = packet.ReadUInt64("QuestCompleted", indexes, i);
}
Expand All @@ -3046,11 +3046,11 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
{
var data = new QuestSession();
packet.ResetBitReader();
var rawChangesMask = new int[30];
var rawChangesMask = new int[32];
var rawMaskMask = new int[1];
rawMaskMask[0] = (int)packet.ReadBits(30);
rawMaskMask[0] = (int)packet.ReadBits(32);
var maskMask = new BitArray(rawMaskMask);
for (var i = 0; i < 30; ++i)
for (var i = 0; i < 32; ++i)
if (maskMask[i])
rawChangesMask[i] = (int)packet.ReadBits(32);
var changesMask = new BitArray(rawChangesMask);
Expand All @@ -3065,7 +3065,7 @@ public static IQuestSession ReadUpdateQuestSession(Packet packet, params object[
}
if (changesMask[2])
{
for (var i = 0; i < 950; ++i)
for (var i = 0; i < 1000; ++i)
{
if (changesMask[3 + i])
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace WowPacketParserModule.V11_0_0_55666.UpdateFields.V11_0_0_55666
public class QuestSession : IQuestSession
{
public WowGuid Owner { get; set; }
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[950];
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[960];
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace WowPacketParserModule.V11_0_0_55666.UpdateFields.V11_0_2_55959
public class QuestSession : IQuestSession
{
public WowGuid Owner { get; set; }
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[950];
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[960];
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace WowPacketParserModule.V11_0_0_55666.UpdateFields.V11_0_5_57171
public class QuestSession : IQuestSession
{
public WowGuid Owner { get; set; }
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[950];
public System.Nullable<ulong>[] QuestCompleted { get; } = new System.Nullable<ulong>[1000];
}
}

0 comments on commit 7a03593

Please sign in to comment.