mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
Item use check
This commit is contained in:
@@ -86,7 +86,9 @@ bool UseItemAction::UseItem(Item* item, ObjectGuid goGuid, Item* itemTarget, Uni
|
||||
if (item->GetTemplate()->Spells[i].SpellId > 0)
|
||||
{
|
||||
spellId = item->GetTemplate()->Spells[i].SpellId;
|
||||
break;
|
||||
if (!botAI->CanCastSpell(spellId, bot, false, item)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,7 +197,7 @@ bool UseItemAction::UseItem(Item* item, ObjectGuid goGuid, Item* itemTarget, Uni
|
||||
|
||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; i++)
|
||||
{
|
||||
spellId = item->GetTemplate()->Spells[i].SpellId;
|
||||
uint32 spellId = item->GetTemplate()->Spells[i].SpellId;
|
||||
if (!spellId)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user