mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
*Use SpellCastResult and finaly fix SPELL_CAST_OK value (255 custom value now). By VladimirMangos.
--HG-- branch : trunk
This commit is contained in:
@@ -3385,7 +3385,7 @@ void Unit::_UpdateAutoRepeatSpell()
|
||||
if (isAttackReady(RANGED_ATTACK))
|
||||
{
|
||||
// Check if able to cast
|
||||
if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->CanCast(true))
|
||||
if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->CheckCast(true) != SPELL_CAST_OK)
|
||||
{
|
||||
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||
return;
|
||||
@@ -11955,8 +11955,11 @@ Player* Unit::GetSpellModOwner() const
|
||||
}
|
||||
|
||||
///----------Pet responses methods-----------------
|
||||
void Unit::SendPetCastFail(uint32 spellid, uint8 msg)
|
||||
void Unit::SendPetCastFail(uint32 spellid, SpellCastResult msg)
|
||||
{
|
||||
if(msg == SPELL_CAST_OK)
|
||||
return;
|
||||
|
||||
Unit *owner = GetCharmerOrOwner();
|
||||
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user