fix(Core/Spells): Fixed work of sobering spells and other improvements for drunk system (#18390)

* fix(Core/Spells): Fix sobering spells and possible uint8 overflow/underflow in SPELL_EFFECT_INEBRIATE handler.

* fix(Core/Spells): Improvements for SPELL_AURA_MOD_FAKE_INEBRIATE handling
This commit is contained in:
Mykhailo Redko
2024-03-20 06:45:01 +02:00
committed by GitHub
parent 21c1c5de11
commit 33f951d742
4 changed files with 50 additions and 60 deletions

View File

@@ -2146,6 +2146,8 @@ public:
void SetDrunkValue(uint8 newDrunkValue, uint32 itemId = 0);
[[nodiscard]] uint8 GetDrunkValue() const { return GetByteValue(PLAYER_BYTES_3, 1); }
[[nodiscard]] int32 GetFakeDrunkValue() const { return GetInt32Value(PLAYER_FAKE_INEBRIATION); }
void UpdateInvisibilityDrunkDetect();
static DrunkenState GetDrunkenstateByValue(uint8 value);
[[nodiscard]] uint32 GetDeathTimer() const { return m_deathTimer; }