mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-29 08:23:48 +00:00
miscs: engine
This commit is contained in:
@@ -26,21 +26,53 @@ bool LootRollAction::Execute(Event event)
|
||||
p >> rollType; //need,greed or pass on roll
|
||||
|
||||
RollVote vote = PASS;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
// }
|
||||
// }
|
||||
|
||||
switch (group->GetLootMethod())
|
||||
{
|
||||
|
||||
@@ -135,11 +135,10 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
||||
if (!IsMovingAllowed(mapId, x, y, z)) {
|
||||
return false;
|
||||
}
|
||||
// if (bot->HasUnitMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_FAR)) {
|
||||
// bot->Yell("I'm falling!", LANG_UNIVERSAL);
|
||||
// if (bot->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_FALLING_SLOW | MOVEMENTFLAG_FALLING_FAR)) {
|
||||
// bot->Say("I'm falling!, flag:" + std::to_string(bot->m_movementInfo.GetMovementFlags()), LANG_UNIVERSAL);
|
||||
// return false;
|
||||
// }
|
||||
// bot->UpdateGroundPositionZ(x, y, z);
|
||||
z += 2.0f;
|
||||
bot->UpdateAllowedPositionZ(x, y, z);
|
||||
// z += 0.5f;
|
||||
|
||||
Reference in New Issue
Block a user