[New Rpg] New rpg start up (add GO_GRIND and NEAR_RANDOM status)

This commit is contained in:
Yunfan Li
2024-11-30 23:48:29 +08:00
parent 3e449fff73
commit 0fd894176b
27 changed files with 625 additions and 65 deletions

View File

@@ -29,6 +29,7 @@
#include "MotionMaster.h"
#include "MoveSpline.h"
#include "MoveSplineInit.h"
#include "NewRpgStrategy.h"
#include "ObjectGuid.h"
#include "PerformanceMonitor.h"
#include "Player.h"
@@ -774,7 +775,8 @@ void PlayerbotAI::Reset(bool full)
bot->GetMotionMaster()->Clear();
// bot->CleanupAfterTaxiFlight();
InterruptSpell();
rpgInfo = NewRpgInfo();
if (full)
{
for (uint8 i = 0; i < BOT_STATE_MAX; i++)
@@ -4137,16 +4139,16 @@ bool PlayerbotAI::AllowActive(ActivityType activityType)
{
// only keep updating till initializing time has completed,
// which prevents unneeded expensive GameTime calls.
if (_isBotInitializing)
{
_isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.12;
// if (_isBotInitializing)
// {
// _isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.12;
// no activity allowed during bot initialization
if (_isBotInitializing)
{
return false;
}
}
// // no activity allowed during bot initialization
// if (_isBotInitializing)
// {
// return false;
// }
// }
// General exceptions
if (activityType == PACKET_ACTIVITY)