1
This commit is contained in:
parent
9166c94882
commit
2e7adfa889
@ -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, //驾驶中
|
||||
|
@ -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:
|
||||
{
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user