mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 18:55:41 +00:00
coredump fix & rpg actions
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "Action.h"
|
||||
#include "Playerbots.h"
|
||||
#include "Timer.h"
|
||||
|
||||
uint32 NextAction::size(NextAction** actions)
|
||||
{
|
||||
@@ -101,11 +102,11 @@ Unit* Action::GetTarget()
|
||||
}
|
||||
|
||||
ActionBasket::ActionBasket(ActionNode* action, float relevance, bool skipPrerequisites, Event event) :
|
||||
action(action), relevance(relevance), skipPrerequisites(skipPrerequisites), event(event), created(time(nullptr))
|
||||
action(action), relevance(relevance), skipPrerequisites(skipPrerequisites), event(event), created(getMSTime())
|
||||
{
|
||||
}
|
||||
|
||||
bool ActionBasket::isExpired(time_t secs)
|
||||
bool ActionBasket::isExpired(uint32 msecs)
|
||||
{
|
||||
return time(nullptr) - created >= secs;
|
||||
return getMSTime() - created >= msecs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user