Add quest rewards to gear initialization

This commit is contained in:
Yunfan Li
2024-08-19 18:46:23 +08:00
parent 0be18889e5
commit 1700a20c89
9 changed files with 151 additions and 122 deletions

View File

@@ -89,13 +89,21 @@ void StatsCollector::CollectSpellStats(uint32 spellId, float multiplier, int32 s
bool canNextTrigger = true;
uint32 procFlags;
uint32 procChance;
if (eventEntry && eventEntry->procFlags)
procFlags = eventEntry->procFlags;
else
procFlags = spellInfo->ProcFlags;
if (procFlags && !CanBeTriggeredByType(spellInfo, procFlags))
if (eventEntry && eventEntry->customChance)
procChance = eventEntry->customChance;
else
procChance = spellInfo->ProcChance;
bool lowChance = procChance <= 5;
if (lowChance || (procFlags && !CanBeTriggeredByType(spellInfo, procFlags)))
canNextTrigger = false;
if (spellInfo->StackAmount)
{
// Heuristic multiplier for spell with stackAmount since high stackAmount may not be available