mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7365] Implement potion in combat delay proper work.
Original patch provided by miranda.conrado.
This commit is contained in:
parent
2b10d8fd71
commit
de51363151
5 changed files with 45 additions and 1 deletions
|
|
@ -2521,6 +2521,15 @@ void Spell::SendSpellCooldown()
|
|||
|
||||
Player* _player = (Player*)m_caster;
|
||||
|
||||
// mana/health potions, disabled by client
|
||||
if (m_spellInfo->Category==SPELLCATEGORY_HEALTH_MANA_POTIONS)
|
||||
{
|
||||
// need in some way provided data for Spell::finish SendCooldownEvent
|
||||
if(m_CastItem)
|
||||
_player->SetLastPotionId(m_CastItem->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
// have infinity cooldown but set at aura apply
|
||||
if(m_spellInfo->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
|
||||
return;
|
||||
|
|
@ -2716,6 +2725,10 @@ void Spell::finish(bool ok)
|
|||
((Player*)m_caster)->ClearComboPoints();
|
||||
}
|
||||
|
||||
// mana/health potions, disabled by client, send event "not in combat"
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && m_spellInfo->Category == SPELLCATEGORY_HEALTH_MANA_POTIONS)
|
||||
((Player*)m_caster)->UpdatePotionCooldown(this);
|
||||
|
||||
// call triggered spell only at successful cast (after clear combo points -> for add some if need)
|
||||
if(!m_TriggerSpells.empty())
|
||||
TriggerSpell();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue