-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only try to loot quest objects if has items or not used
- Loading branch information
Showing
3 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
#include "playerbot/strategy/values/LootStrategyValue.h" | ||
#include "playerbot/strategy/values/ItemUsageValue.h" | ||
#include "playerbot/ServerFacade.h" | ||
#include "playerbot/strategy/values/SharedValueContext.h" | ||
|
||
|
||
using namespace ai; | ||
|
@@ -127,11 +128,12 @@ bool OpenLootAction::DoLoot(LootObject& lootObject) | |
{ | ||
// herb-like quest objects | ||
bool isForQuest = false; | ||
if (sObjectMgr.IsGameObjectForQuests(lootObject.guid.GetEntry())) | ||
if (go && sObjectMgr.IsGameObjectForQuests(lootObject.guid.GetEntry())) | ||
{ | ||
if (go->ActivateToQuest(bot)) | ||
{ | ||
isForQuest = true; | ||
std::list<uint32> lootItems = GAI_VALUE2(std::list<uint32>, "entry loot list", -go->GetEntry()); | ||
This comment has been minimized.
Sorry, something went wrong.
XandrKhv
|
||
isForQuest = !lootItems.empty() || go->GetLootState() != GO_READY; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning C4146, applying a unary minus to an unsigned type; the result is left unsigned