Fixes a crash when loading.

This commit is contained in:
hondacrx
2022-07-19 20:26:39 -04:00
parent 8a29b531ed
commit ce16bc0611
4 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -456,7 +456,7 @@ namespace Game.Misc
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);
}
@@ -529,7 +529,7 @@ namespace Game.Misc
offer.SuggestedPartyMembers = quest.SuggestedPlayers;
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[1] = (uint)quest.FlagsEx;
+2 -2
View File
@@ -2218,8 +2218,8 @@ namespace Game.Entities
if (questBit == 0)
return;
uint fieldOffset = (questBit - 1) >> ActivePlayerData.QuestCompletedBitsPerBlock;
if (fieldOffset >= PlayerConst.QuestsCompletedBitsSize)
uint fieldOffset = (uint)((questBit - 1) / ActivePlayerData.QuestCompletedBitsPerBlock);
if (fieldOffset >= ActivePlayerData.QuestCompletedBitsSize)
return;
ulong flag = 1ul << (((int)questBit - 1) % ActivePlayerData.QuestCompletedBitsPerBlock);