fix(Core/Player): Fix potion cooldown not ticking after combat ends (#25135)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: Treeston <treeston.mmoc@gmail.com>
This commit is contained in:
@@ -1826,6 +1826,7 @@ public:
|
|||||||
uint32 GetLastPotionId() { return m_lastPotionId; }
|
uint32 GetLastPotionId() { return m_lastPotionId; }
|
||||||
void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; }
|
void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; }
|
||||||
void UpdatePotionCooldown(Spell* spell = nullptr);
|
void UpdatePotionCooldown(Spell* spell = nullptr);
|
||||||
|
void AtExitCombat() override;
|
||||||
|
|
||||||
void setResurrectRequestData(ObjectGuid guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana)
|
void setResurrectRequestData(ObjectGuid guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1545,6 +1545,16 @@ void Player::UpdatePvP(bool state, bool _override)
|
|||||||
sScriptMgr->OnPlayerPVPFlagChange(this, state);
|
sScriptMgr->OnPlayerPVPFlagChange(this, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::AtExitCombat()
|
||||||
|
{
|
||||||
|
Unit::AtExitCombat();
|
||||||
|
UpdatePotionCooldown();
|
||||||
|
|
||||||
|
if (IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_ABILITY))
|
||||||
|
for (uint8 i = 0; i < MAX_RUNES; ++i)
|
||||||
|
SetGracePeriod(i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void Player::UpdatePotionCooldown(Spell* spell)
|
void Player::UpdatePotionCooldown(Spell* spell)
|
||||||
{
|
{
|
||||||
// no potion used i combat or still in combat
|
// no potion used i combat or still in combat
|
||||||
|
|||||||
Reference in New Issue
Block a user