This commit is contained in:
aozhiwei 2021-03-23 16:17:41 +08:00
parent 9166c94882
commit 2e7adfa889
3 changed files with 13 additions and 3 deletions

View File

@ -146,6 +146,7 @@ enum BuffEffectType_e
kBET_InGrass = 27, //在草丛
kBET_InWater = 28, //在水里
kBET_InIce = 29, //在冰里
kBET_Shield = 31, //护盾
kBET_ThroughWall = 50, //穿墙
kBET_Driver = 51, //驾驶中

View File

@ -434,7 +434,7 @@ void Creature::DoSkill(int skill_id, int target_id, const a8::Vec2& target_pos)
Creature* c = (Creature*)entity;
std::set<Entity*> target_list;
skill_target_pos_ = c->GetPos();
SelectSkillTargets(c->CurrentSkill(), c->GetPos(), target_list);
SelectSkillTargets(CurrentSkill(), c->GetPos(), target_list);
TriggerBuff(CurrentSkill(), target_list, kBTT_UseSkill);
if (!CurrentSkill()->meta->phases.empty() &&
CurrentSkill()->meta->phases[0].time_offset <= 0) {
@ -475,7 +475,7 @@ void Creature::UpdateSkill()
if (CurrentSkill()) {
if (curr_skill_phase < CurrentSkill()->meta->phases.size()) {
MetaData::SkillPhase* phase = &CurrentSkill()->meta->phases[curr_skill_phase];
if (phase->time_offset >= CurrentSkill()->GetLeftTime()) {
if (phase->time_offset >= CurrentSkill()->GetPassedTime()) {
ProcSkillPhase(phase);
++curr_skill_phase;
}
@ -715,6 +715,11 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
}
}
break;
case kBET_Shield:
{
}
break;
default:
{
}

View File

@ -55,13 +55,17 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
break;
case kST_EnemySingle:
{
#if 0
#if 1
Entity* entity = room->GetEntityByUniId(skill_target_id_);
if (entity && entity->IsEntityType(ET_Player)) {
Human* hum = (Human*)entity;
#if 1
target_list.insert(hum);
#else
if (IsEnemy(hum)) {
target_list.insert(hum);
}
#endif
}
#endif
}