This commit is contained in:
aozhiwei 2022-12-29 15:23:31 +08:00
parent 970a4de0d1
commit d935629cac
2 changed files with 34 additions and 28 deletions

View File

@ -118,6 +118,17 @@ void SprintBuff::Check(Position& pre_pos, std::map<int, long long>& hited_object
}
}
hited_objects[enemy->GetUniId()] = owner->room->GetFrameNo();
OnEnemyHit(enemy);
}
}
}
owner->SetPos(old_pos);
pre_pos = owner->GetPos();
}
void SprintBuff::OnEnemyHit(Creature* enemy)
{
for (int buff_id : meta->_param3_int_list) {
enemy->TryAddBuff(owner, buff_id);
}
@ -146,12 +157,6 @@ void SprintBuff::Check(Position& pre_pos, std::map<int, long long>& hited_object
break;
}
}
}
}
}
owner->SetPos(old_pos);
pre_pos = owner->GetPos();
}
void SprintBuff::ProcSkill()

View File

@ -13,6 +13,7 @@ class SprintBuff : public Buff
void SprintMove();
void CoCollisionCheck();
void Check(Position& pre_pos, std::map<int, long long>& hited_objects);
void OnEnemyHit(Creature* enemy);
void ProcSkill();
};