[Bug Fix] Fix for castspell command (#2010)

Fix for using castspell command with parameter 0
This commit is contained in:
KayenEQ 2022-02-17 20:44:11 -05:00 committed by GitHub
parent 71dfa9acc0
commit ad28f3c3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
}
//Added to prevent MQ2 exploitation of equipping normally-unequippable/clickable items with effects and clicking them for benefits.
if (item_slot && IsClient() && (slot == CastingSlot::Item || slot == CastingSlot::PotionBelt))
if (item_slot != 0xFFFFFFFF && IsClient() && (slot == CastingSlot::Item || slot == CastingSlot::PotionBelt))
{
if (!CheckItemRaceClassDietyRestrictionsOnCast(item_slot)) {
StopCastSpell(spell_id, send_spellbar_enable);