mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Resolved issues with herb gathering (#926)
* Check game objects loot tables and determine if loot is valid * Removed LOS checks since they already occur and removed enemy near node check * Dismount if mounted, decresed interaction distance, added looting delay * Decreased interaction distance * oops, wrong file * Check game objects loot tables and determine if loot is valid
This commit is contained in:
@@ -13,9 +13,9 @@ bool LootAvailableTrigger::IsActive()
|
||||
{
|
||||
return AI_VALUE(bool, "has available loot") &&
|
||||
(sServerFacade->IsDistanceLessOrEqualThan(AI_VALUE2(float, "distance", "loot target"),
|
||||
INTERACTION_DISTANCE) ||
|
||||
INTERACTION_DISTANCE - 2.0f) ||
|
||||
AI_VALUE(GuidVector, "all targets").empty()) &&
|
||||
!AI_VALUE2(bool, "combat", "self target") && !AI_VALUE2(bool, "mounted", "self target");
|
||||
!AI_VALUE2(bool, "combat", "self target");
|
||||
}
|
||||
|
||||
bool FarFromCurrentLootTrigger::IsActive()
|
||||
@@ -24,7 +24,7 @@ bool FarFromCurrentLootTrigger::IsActive()
|
||||
if (!loot.IsLootPossible(bot))
|
||||
return false;
|
||||
|
||||
return AI_VALUE2(float, "distance", "loot target") > INTERACTION_DISTANCE;
|
||||
return AI_VALUE2(float, "distance", "loot target") >= INTERACTION_DISTANCE - 2.0f;
|
||||
}
|
||||
|
||||
bool CanLootTrigger::IsActive() { return AI_VALUE(bool, "can loot"); }
|
||||
|
||||
Reference in New Issue
Block a user