mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-13 23:33:47 +00:00
coredump fix & rpg actions
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "LeaveGroupAction.h"
|
||||
#include "Event.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
bool LeaveGroupAction::Execute(Event event)
|
||||
@@ -153,5 +154,9 @@ bool LeaveFarAwayAction::isUseful()
|
||||
if (abs(int32(master->getLevel() - bot->getLevel())) > 4)
|
||||
return true;
|
||||
|
||||
if (bot->GetMapId() != master->GetMapId() || bot->GetDistance2d(master) >= 2 * sPlayerbotAIConfig->rpgDistance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user