Merge branch 'master' into 4.3.4

This commit is contained in:
DDuarte
2014-01-11 17:27:41 +00:00
3 changed files with 6 additions and 1 deletions

View File

@@ -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);

View File

@@ -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());
}

View File

@@ -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))