Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-09-19 09:23:59 -06:00
committed by GitHub
33 changed files with 677 additions and 148 deletions

View File

@@ -25,6 +25,7 @@
#include "HostileRefMgr.h"
#include "MotionMaster.h"
#include "Object.h"
#include "Optional.h"
#include "SpellAuraDefines.h"
#include "SpellDefines.h"
#include "ThreatMgr.h"
@@ -836,6 +837,7 @@ private:
HealInfo* _healInfo;
SpellInfo const* const _triggeredByAuraSpell;
int8 _procAuraEffectIndex;
std::optional<float> _chance;
public:
explicit ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, uint32 typeMask, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell const* spell, DamageInfo* damageInfo, HealInfo* healInfo, SpellInfo const* triggeredByAuraSpell = nullptr, int8 procAuraEffectIndex = -1);
@@ -855,6 +857,9 @@ public:
[[nodiscard]] int8 GetTriggerAuraEffectIndex() const { return _procAuraEffectIndex; }
[[nodiscard]] uint32 GetProcCooldown() const { return _cooldown; }
void SetProcCooldown(uint32 cooldown) { _cooldown = cooldown; }
[[nodiscard]] std::optional<float> GetProcChance() const { return _chance; }
void SetProcChance(float chance) { _chance = chance; }
void ResetProcChance() { _chance.reset(); }
};
// Struct for use in Unit::CalculateMeleeDamage