Fixes a crash when loading.
This commit is contained in:
@@ -39,7 +39,6 @@ namespace Framework.Constants
|
|||||||
public const int MaxActionButtonActionValue = 0x00FFFFFF + 1;
|
public const int MaxActionButtonActionValue = 0x00FFFFFF + 1;
|
||||||
|
|
||||||
public const int MaxDailyQuests = 25;
|
public const int MaxDailyQuests = 25;
|
||||||
public const int QuestsCompletedBitsSize = 1750;
|
|
||||||
|
|
||||||
public static TimeSpan InfinityCooldownDelay = TimeSpan.FromSeconds(Time.Month); // used for set "infinity cooldowns" for spells and check
|
public static TimeSpan InfinityCooldownDelay = TimeSpan.FromSeconds(Time.Month); // used for set "infinity cooldowns" for spells and check
|
||||||
public const uint infinityCooldownDelayCheck = Time.Month / 2;
|
public const uint infinityCooldownDelayCheck = Time.Month / 2;
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ namespace Game.Misc
|
|||||||
|
|
||||||
for (int i = 0; i < SharedConst.QuestEmoteCount; ++i)
|
for (int i = 0; i < SharedConst.QuestEmoteCount; ++i)
|
||||||
{
|
{
|
||||||
var emote = new QuestDescEmote(quest.DetailsEmote[i], quest.DetailsEmoteDelay[i]);
|
var emote = new QuestDescEmote((int)quest.DetailsEmote[i], quest.DetailsEmoteDelay[i]);
|
||||||
packet.DescEmotes.Add(emote);
|
packet.DescEmotes.Add(emote);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,7 +529,7 @@ namespace Game.Misc
|
|||||||
offer.SuggestedPartyMembers = quest.SuggestedPlayers;
|
offer.SuggestedPartyMembers = quest.SuggestedPlayers;
|
||||||
|
|
||||||
for (uint i = 0; i < SharedConst.QuestEmoteCount && quest.OfferRewardEmote[i] != 0; ++i)
|
for (uint i = 0; i < SharedConst.QuestEmoteCount && quest.OfferRewardEmote[i] != 0; ++i)
|
||||||
offer.Emotes.Add(new QuestDescEmote((uint)quest.OfferRewardEmote[i], quest.OfferRewardEmoteDelay[i]));
|
offer.Emotes.Add(new QuestDescEmote(quest.OfferRewardEmote[i], quest.OfferRewardEmoteDelay[i]));
|
||||||
|
|
||||||
offer.QuestFlags[0] = (uint)quest.Flags;
|
offer.QuestFlags[0] = (uint)quest.Flags;
|
||||||
offer.QuestFlags[1] = (uint)quest.FlagsEx;
|
offer.QuestFlags[1] = (uint)quest.FlagsEx;
|
||||||
|
|||||||
@@ -2218,8 +2218,8 @@ namespace Game.Entities
|
|||||||
if (questBit == 0)
|
if (questBit == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint fieldOffset = (questBit - 1) >> ActivePlayerData.QuestCompletedBitsPerBlock;
|
uint fieldOffset = (uint)((questBit - 1) / ActivePlayerData.QuestCompletedBitsPerBlock);
|
||||||
if (fieldOffset >= PlayerConst.QuestsCompletedBitsSize)
|
if (fieldOffset >= ActivePlayerData.QuestCompletedBitsSize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ulong flag = 1ul << (((int)questBit - 1) % ActivePlayerData.QuestCompletedBitsPerBlock);
|
ulong flag = 1ul << (((int)questBit - 1) % ActivePlayerData.QuestCompletedBitsPerBlock);
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
foreach (QuestDescEmote emote in DescEmotes)
|
foreach (QuestDescEmote emote in DescEmotes)
|
||||||
{
|
{
|
||||||
_worldPacket.WriteUInt32(emote.Type);
|
_worldPacket.WriteInt32(emote.Type);
|
||||||
_worldPacket.WriteUInt32(emote.Delay);
|
_worldPacket.WriteUInt32(emote.Delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1125,13 +1125,13 @@ namespace Game.Networking.Packets
|
|||||||
|
|
||||||
public struct QuestDescEmote
|
public struct QuestDescEmote
|
||||||
{
|
{
|
||||||
public QuestDescEmote(uint type = 0, uint delay = 0)
|
public QuestDescEmote(int type = 0, uint delay = 0)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
Delay = delay;
|
Delay = delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public uint Type;
|
public int Type;
|
||||||
public uint Delay;
|
public uint Delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1149,7 +1149,7 @@ namespace Game.Networking.Packets
|
|||||||
data.WriteInt32(Emotes.Count);
|
data.WriteInt32(Emotes.Count);
|
||||||
foreach (QuestDescEmote emote in Emotes)
|
foreach (QuestDescEmote emote in Emotes)
|
||||||
{
|
{
|
||||||
data.WriteUInt32(emote.Type);
|
data.WriteInt32(emote.Type);
|
||||||
data.WriteUInt32(emote.Delay);
|
data.WriteUInt32(emote.Delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user