forked from mirror/azerothcore-wotlk
fix(Scripts/World): Arcane Charges (#25806)
This commit is contained in:
@@ -52,18 +52,25 @@ public:
|
|||||||
if (player->GetZoneId() != AREA_ISLE_OF_QUEL_DANAS)
|
if (player->GetZoneId() != AREA_ISLE_OF_QUEL_DANAS)
|
||||||
disabled = true;
|
disabled = true;
|
||||||
break;
|
break;
|
||||||
case 34475:
|
|
||||||
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES))
|
|
||||||
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow use in flight only
|
// allow use in flight only
|
||||||
if (player->IsInFlight() && !disabled)
|
if (player->IsInFlight())
|
||||||
return false;
|
{
|
||||||
|
if (!disabled)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else // error
|
||||||
|
{
|
||||||
|
if (itemId == 34475)
|
||||||
|
{
|
||||||
|
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES))
|
||||||
|
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
// error
|
|
||||||
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user