Tweak automation

This commit is contained in:
郑佩茹
2022-09-22 17:22:19 -06:00
parent 1e490e80e4
commit 88d81c7a31
4 changed files with 31 additions and 3 deletions

View File

@@ -309,6 +309,10 @@ bool DisEnchantRandomItemAction::Execute(Event event)
for (auto& item: items)
{
// don't touch rare+ items if with real player/guild
if ((botAI->HasRealPlayerMaster() || botAI->IsInRealGuild()) && item->GetTemplate()->Quality > ITEM_QUALITY_UNCOMMON)
return false;
if(CastCustomSpellAction::Execute(Event("disenchant random item", "13262 "+ chat->FormatQItem(item->GetEntry()))))
return true;
}