This commit is contained in:
aozhiwei 2023-06-01 18:31:22 +08:00
parent 93a60f2f7f
commit 6cb4cea85b
3 changed files with 8 additions and 5 deletions

View File

@ -234,7 +234,7 @@ behaviac::EBTStatus AndroidAgent::DoAttack()
} }
} }
} }
#ifdef DEBUG #ifdef DEBUG1
if (context->target.Get()->IsPlayer()) { if (context->target.Get()->IsPlayer()) {
a8::XPrintf("DoAttack %d use_skill_ok:%d time:%d\n", a8::XPrintf("DoAttack %d use_skill_ok:%d time:%d\n",
{GetOwner()->GetUniId(), {GetOwner()->GetUniId(),
@ -334,7 +334,7 @@ behaviac::EBTStatus AndroidAgent::DoPursuit()
} }
} }
} }
#ifdef DEBUG #ifdef DEBUG1
if (context->target.Get()->IsPlayer()) { if (context->target.Get()->IsPlayer()) {
a8::XPrintf("DoPursuit %d use_skill_ok:%d time:%d\n", a8::XPrintf("DoPursuit %d use_skill_ok:%d time:%d\n",
{GetOwner()->GetUniId(), {GetOwner()->GetUniId(),

View File

@ -189,7 +189,7 @@ behaviac::EBTStatus BaseAgent::CoAttackTarget(int target_id)
} }
} }
} }
#ifdef DEBUG #ifdef DEBUG1
if (context->target.Get()->IsPlayer()) { if (context->target.Get()->IsPlayer()) {
a8::XPrintf("DoAttack %d use_skill_ok:%d time:%d\n", a8::XPrintf("DoAttack %d use_skill_ok:%d time:%d\n",
{GetOwner()->GetUniId(), {GetOwner()->GetUniId(),
@ -312,9 +312,11 @@ bool BaseAgent::CanUseSkill(int skill_id)
int BaseAgent::GetUseableSkill(Creature* target) int BaseAgent::GetUseableSkill(Creature* target)
{ {
#if 0
if (!target->IsPlayer()) { if (!target->IsPlayer()) {
return -1; return -1;
} }
#endif
if (GetOwner()->IsHuman()) { if (GetOwner()->IsHuman()) {
Skill* skill = GetOwner()->GetMainSkill(); Skill* skill = GetOwner()->GetMainSkill();
if (skill && GetOwner()->CanUseSkill(skill->GetSkillId())) { if (skill && GetOwner()->CanUseSkill(skill->GetSkillId())) {
@ -398,6 +400,7 @@ bool BaseAgent::InternalUseSkill(int skill_id, CreatureWeakPtr target, int& wait
break; break;
case MAGIC_20301_XL: case MAGIC_20301_XL:
{ {
skill_distance = 30;
GetOwner()->DoSkill(skill->GetSkillId(), target.Get()->GetUniId(), skill_dir, skill_distance); GetOwner()->DoSkill(skill->GetSkillId(), target.Get()->GetUniId(), skill_dir, skill_distance);
return true; return true;
} }

View File

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