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:
parent
48fa4d2856
commit
0464e90853
2 changed files with 11 additions and 0 deletions
|
|
@ -1826,6 +1826,7 @@ public:
|
|||
uint32 GetLastPotionId() { return m_lastPotionId; }
|
||||
void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; }
|
||||
void UpdatePotionCooldown(Spell* spell = nullptr);
|
||||
void AtExitCombat() override;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
// no potion used i combat or still in combat
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue