This commit is contained in:
aozhiwei 2023-04-20 15:25:45 +08:00
parent 1630fbfacc
commit 210e984412
4 changed files with 14 additions and 5 deletions

View File

@ -71,7 +71,7 @@ void Guide::UpdateStep()
void Guide::ProcMoveTarget()
{
owner_->room->xtimer.SetTimeoutEx
owner_->room->xtimer.SetIntervalEx
(1,
[this] (int event, const a8::Args* args)
{
@ -129,7 +129,7 @@ void Guide::ProcMoveTargetAndPickup()
}
}
owner_->room->xtimer.SetTimeoutEx
owner_->room->xtimer.SetIntervalEx
(1,
[this, context] (int event, const a8::Args* args)
{
@ -201,7 +201,7 @@ void Guide::ProcKillEnemy()
}
}
owner_->room->xtimer.SetTimeoutEx
owner_->room->xtimer.SetIntervalEx
(1,
[this, context] (int event, const a8::Args* args)
{
@ -277,7 +277,7 @@ void Guide::ProcUseSkillAndKillEnemy()
}
}
owner_->room->xtimer.SetTimeoutEx
owner_->room->xtimer.SetIntervalEx
(1,
[this, context] (int event, const a8::Args* args)
{

View File

@ -91,7 +91,6 @@ Human::Human():Creature()
}
stats = std::make_shared<PlayerStats>();
guide_ = std::make_shared<Guide>();
guide_->Init(this);
}
Human::~Human()
@ -102,6 +101,7 @@ Human::~Human()
void Human::Initialize()
{
Creature::Initialize();
guide_->Init(this);
volume_ = meta->_volume;
observers_.insert(this);
SetCurrWeapon(&weapons[0]);

View File

@ -41,6 +41,9 @@ namespace mt
case KILL_ENEMY_GUIDE_STEP:
{
for (auto& str : param_strs) {
if (str.size() <= 0) {
break;
}
std::vector<std::string> strings;
a8::Split(str, strings, ':');
if (strings.size() != 5) {
@ -62,6 +65,9 @@ namespace mt
{
for (size_t i = 1; i < param_strs.size(); ++i) {
std::string str = param_strs[i];
if (str.size() <= 0) {
break;
}
std::vector<std::string> strings;
a8::Split(str, strings, ':');
if (strings.size() != 5) {

View File

@ -329,6 +329,9 @@ int Room::AllocUniid()
void Room::ShuaAndroid()
{
if (IsNewBieRoom()) {
return;
}
if (GetGasData().GetGasMode() != GasInactive) {
return;
}