This commit is contained in:
aozhiwei 2023-06-01 18:19:51 +08:00
parent 6dfb750f09
commit 93a60f2f7f
4 changed files with 14 additions and 1 deletions

View File

@ -127,7 +127,8 @@ void Android::InternalUpdate(int delta_time)
room->grid_service->MoveCreature(this);
return;
}
if (GetMovement()->GetPathSize() > 0) {
if (GetMovement()->GetPathSize() > 0 ||
HasBuffEffect(kBET_Sprint)) {
Global::Instance()->verify_set_pos = 1;
UpdateMove();
#ifdef DEBUG1

View File

@ -312,9 +312,15 @@ bool BaseAgent::CanUseSkill(int skill_id)
int BaseAgent::GetUseableSkill(Creature* target)
{
if (!target->IsPlayer()) {
return -1;
}
if (GetOwner()->IsHuman()) {
Skill* skill = GetOwner()->GetMainSkill();
if (skill && GetOwner()->CanUseSkill(skill->GetSkillId())) {
if (skill->GetMinorType()) {
return -1;
}
return skill->GetSkillId();
}
}

View File

@ -26,6 +26,7 @@ void SprintBuff::Activate()
void SprintBuff::Deactivate()
{
int i = 0;
}
void SprintBuff::SprintMove()

View File

@ -39,6 +39,11 @@ namespace mt
int try_count = 0;
while (true) {
const mt::Robot* tmp_robot_meta = raw_list[rand() % raw_list.size()];
#ifdef DEBUG1
if (tmp_robot_meta->hero_id() != 30100) {
continue;
}
#endif
if (refreshed_robot_set.find(tmp_robot_meta->id()) == refreshed_robot_set.end()) {
return tmp_robot_meta;
}