mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge branch 'master' into 4.3.4
This commit is contained in:
@@ -1851,6 +1851,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
void RemoveAllSpellCooldown();
|
||||
void _LoadSpellCooldowns(PreparedQueryResult result);
|
||||
void _SaveSpellCooldowns(SQLTransaction& trans);
|
||||
uint32 GetLastPotionId() { return m_lastPotionId; }
|
||||
void SetLastPotionId(uint32 item_id) { m_lastPotionId = item_id; }
|
||||
void UpdatePotionCooldown(Spell* spell = NULL);
|
||||
|
||||
|
||||
@@ -1839,7 +1839,7 @@ void WorldSession::HandleHearthAndResurrect(WorldPacket& /*recvData*/)
|
||||
return;
|
||||
|
||||
_player->BuildPlayerRepop();
|
||||
_player->ResurrectPlayer(100);
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
|
||||
}
|
||||
|
||||
|
||||
@@ -4814,6 +4814,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
else
|
||||
return SPELL_FAILED_NOT_READY;
|
||||
}
|
||||
|
||||
// check if we are using a potion in combat for the 2nd+ time. Cooldown is added only after caster gets out of combat
|
||||
if (m_caster->ToPlayer()->GetLastPotionId() && m_CastItem && (m_CastItem->IsPotion() || m_spellInfo->IsCooldownStartedOnEvent()))
|
||||
return SPELL_FAILED_NOT_READY;
|
||||
}
|
||||
|
||||
if (m_spellInfo->AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL && !m_caster->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS))
|
||||
|
||||
Reference in New Issue
Block a user