This commit is contained in:
aozhiwei 2023-06-08 18:58:27 +08:00
parent 0834cc9b00
commit f4604568f6
2 changed files with 4 additions and 1 deletions

View File

@ -331,7 +331,7 @@ int BaseAgent::GetUseableSkill(Creature* target)
Skill* skill = GetOwner()->GetSkill(skill_id);
if (skill && GetOwner()->CanUseSkill(skill->GetSkillId())) {
if (skill_id == 60121) {
if (target->GetPos().Distance2D2(GetOwner()->GetPos()) > 200) {
if (target->GetPos().Distance2D2(GetOwner()->GetPos()) > skill->meta->skill_distance()) {
continue;
}
}

View File

@ -295,6 +295,9 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
}
} else if (cmd == "create_boss") {
const mt::Hero* hero_meta = mt::Hero::GetById(60100);
if (cmds.size() >= 2) {
hero_meta = mt::Hero::GetById(a8::XValue(cmds[1]));
}
if (hero_meta) {
Hero* hero = room->CreateHero
(nullptr,