Core/Players: Cleaned some old updatefield definitions and updated values for completed quests size

Port From (https://github.com/TrinityCore/TrinityCore/commit/26d757946f4e26397930e2d8733c0b1c7f76d0a6)
This commit is contained in:
hondacrx
2022-07-18 22:07:17 -04:00
parent 31d207c2ab
commit 9961b71f17
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -2218,11 +2218,11 @@ namespace Game.Entities
if (questBit == 0)
return;
uint fieldOffset = (questBit - 1) >> 6;
uint fieldOffset = (questBit - 1) >> ActivePlayerData.QuestCompletedBitsPerBlock;
if (fieldOffset >= PlayerConst.QuestsCompletedBitsSize)
return;
ulong flag = 1ul << (((int)questBit - 1) & 63);
ulong flag = 1ul << (((int)questBit - 1) % ActivePlayerData.QuestCompletedBitsPerBlock);
if (completed)
SetUpdateFieldFlagValue(ref m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.QuestCompleted, (int)fieldOffset), flag);
else