mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-15 09:50:27 +00:00
Active loot roll (#1338)
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
|
||||
bool LootRollAction::Execute(Event event)
|
||||
{
|
||||
Player* bot = QueryItemUsageAction::botAI->GetBot();
|
||||
|
||||
Group* group = bot->GetGroup();
|
||||
if (!group)
|
||||
return false;
|
||||
@@ -108,61 +106,11 @@ bool LootRollAction::Execute(Event event)
|
||||
group->CountRollVote(bot->GetGUID(), guid, vote);
|
||||
break;
|
||||
}
|
||||
// One item at a time
|
||||
return true;
|
||||
}
|
||||
|
||||
// WorldPacket p(event.getPacket()); //WorldPacket packet for CMSG_LOOT_ROLL, (8+4+1)
|
||||
// p.rpos(0); //reset packet pointer
|
||||
// p >> guid; //guid of the item rolled
|
||||
// p >> slot; //number of players invited to roll
|
||||
// p >> rollType; //need,greed or pass on roll
|
||||
|
||||
// std::vector<Roll*> rolls = group->GetRolls();
|
||||
// bot->Say("guid:" + std::to_string(guid.GetCounter()) +
|
||||
// "item entry:" + std::to_string(guid.GetEntry()), LANG_UNIVERSAL);
|
||||
// for (std::vector<Roll*>::iterator i = rolls.begin(); i != rolls.end(); ++i)
|
||||
// {
|
||||
// if ((*i)->isValid() && (*i)->itemGUID == guid && (*i)->itemSlot == slot)
|
||||
// {
|
||||
// uint32 itemId = (*i)->itemid;
|
||||
// bot->Say("item entry2:" + std::to_string(itemId), LANG_UNIVERSAL);
|
||||
// ItemTemplate const *proto = sObjectMgr->GetItemTemplate(itemId);
|
||||
// if (!proto)
|
||||
// continue;
|
||||
|
||||
// switch (proto->Class)
|
||||
// {
|
||||
// case ITEM_CLASS_WEAPON:
|
||||
// case ITEM_CLASS_ARMOR:
|
||||
// if (!QueryItemUsage(proto).empty())
|
||||
// vote = NEED;
|
||||
// else if (bot->HasSkill(SKILL_ENCHANTING))
|
||||
// vote = DISENCHANT;
|
||||
// break;
|
||||
// default:
|
||||
// if (StoreLootAction::IsLootAllowed(itemId, botAI))
|
||||
// vote = NEED;
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(guid.GetEntry()))
|
||||
// {
|
||||
// switch (proto->Class)
|
||||
// {
|
||||
// case ITEM_CLASS_WEAPON:
|
||||
// case ITEM_CLASS_ARMOR:
|
||||
// if (!QueryItemUsage(proto).empty())
|
||||
// vote = NEED;
|
||||
// break;
|
||||
// default:
|
||||
// if (StoreLootAction::IsLootAllowed(guid.GetEntry(), botAI))
|
||||
// vote = NEED;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user