diff --git a/src/game/WorldHandlers/Group.h b/src/game/WorldHandlers/Group.h index f0ba5799..0a833105 100644 --- a/src/game/WorldHandlers/Group.h +++ b/src/game/WorldHandlers/Group.h @@ -463,7 +463,6 @@ class Group #ifdef ENABLE_PLAYERBOTS ObjectGuid GetTargetIcon(int index) { return m_targetIcons[index]; } - Rolls GetRolls() { return RollId; } #endif protected: diff --git a/src/modules/Bots/playerbot/strategy/actions/LootRollAction.cpp b/src/modules/Bots/playerbot/strategy/actions/LootRollAction.cpp index f2a5c874..68a36ef6 100644 --- a/src/modules/Bots/playerbot/strategy/actions/LootRollAction.cpp +++ b/src/modules/Bots/playerbot/strategy/actions/LootRollAction.cpp @@ -23,27 +23,20 @@ bool LootRollAction::Execute(Event event) return false; RollVote vote = ROLL_PASS; - for (vector::iterator i = group->GetRolls().begin(); i != group->GetRolls().end(); ++i) - { - if ((*i)->isValid() && (*i)->lootedTargetGUID == guid && (*i)->itemSlot == slot) - { - uint32 itemId = (*i)->itemid; - ItemPrototype const *proto = sItemStorage.LookupEntry(itemId); - if (!proto) - continue; - switch (proto->Class) - { - case ITEM_CLASS_WEAPON: - case ITEM_CLASS_ARMOR: - if (QueryItemUsage(proto)) - vote = ROLL_NEED; - break; - default: - if (IsLootAllowed(itemId)) - vote = ROLL_NEED; - break; - } + ItemPrototype const *proto = sItemStorage.LookupEntry(guid.GetEntry()); + if(proto) + { + switch (proto->Class) + { + case ITEM_CLASS_WEAPON: + case ITEM_CLASS_ARMOR: + if (QueryItemUsage(proto)) + vote = ROLL_NEED; + break; + default: + if (IsLootAllowed(guid.GetEntry())) + vote = ROLL_NEED; break; } }