1
This commit is contained in:
parent
970a4de0d1
commit
d935629cac
@ -118,34 +118,7 @@ void SprintBuff::Check(Position& pre_pos, std::map<int, long long>& hited_object
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hited_objects[enemy->GetUniId()] = owner->room->GetFrameNo();
|
hited_objects[enemy->GetUniId()] = owner->room->GetFrameNo();
|
||||||
for (int buff_id : meta->_param3_int_list) {
|
OnEnemyHit(enemy);
|
||||||
enemy->TryAddBuff(owner, buff_id);
|
|
||||||
}
|
|
||||||
if (skill_meta) {
|
|
||||||
switch (skill_meta->GetMagicId()) {
|
|
||||||
case MAGIC_YMCZ:
|
|
||||||
{
|
|
||||||
float dmg = SkillHelper::GetYmczDmg(owner,
|
|
||||||
enemy,
|
|
||||||
skill_meta);
|
|
||||||
if (dmg > 0.0001f) {
|
|
||||||
enemy->DecHP(
|
|
||||||
dmg,
|
|
||||||
owner->GetUniId(),
|
|
||||||
owner->GetName(),
|
|
||||||
0,
|
|
||||||
owner->GetUniId(),
|
|
||||||
owner->GetName()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,6 +127,38 @@ void SprintBuff::Check(Position& pre_pos, std::map<int, long long>& hited_object
|
|||||||
pre_pos = owner->GetPos();
|
pre_pos = owner->GetPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SprintBuff::OnEnemyHit(Creature* enemy)
|
||||||
|
{
|
||||||
|
for (int buff_id : meta->_param3_int_list) {
|
||||||
|
enemy->TryAddBuff(owner, buff_id);
|
||||||
|
}
|
||||||
|
if (skill_meta) {
|
||||||
|
switch (skill_meta->GetMagicId()) {
|
||||||
|
case MAGIC_YMCZ:
|
||||||
|
{
|
||||||
|
float dmg = SkillHelper::GetYmczDmg(owner,
|
||||||
|
enemy,
|
||||||
|
skill_meta);
|
||||||
|
if (dmg > 0.0001f) {
|
||||||
|
enemy->DecHP(
|
||||||
|
dmg,
|
||||||
|
owner->GetUniId(),
|
||||||
|
owner->GetName(),
|
||||||
|
0,
|
||||||
|
owner->GetUniId(),
|
||||||
|
owner->GetName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SprintBuff::ProcSkill()
|
void SprintBuff::ProcSkill()
|
||||||
{
|
{
|
||||||
if (skill_meta) {
|
if (skill_meta) {
|
||||||
|
@ -13,6 +13,7 @@ class SprintBuff : public Buff
|
|||||||
void SprintMove();
|
void SprintMove();
|
||||||
void CoCollisionCheck();
|
void CoCollisionCheck();
|
||||||
void Check(Position& pre_pos, std::map<int, long long>& hited_objects);
|
void Check(Position& pre_pos, std::map<int, long long>& hited_objects);
|
||||||
|
void OnEnemyHit(Creature* enemy);
|
||||||
void ProcSkill();
|
void ProcSkill();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user