1
This commit is contained in:
parent
9166c94882
commit
2e7adfa889
@ -146,6 +146,7 @@ enum BuffEffectType_e
|
|||||||
kBET_InGrass = 27, //在草丛
|
kBET_InGrass = 27, //在草丛
|
||||||
kBET_InWater = 28, //在水里
|
kBET_InWater = 28, //在水里
|
||||||
kBET_InIce = 29, //在冰里
|
kBET_InIce = 29, //在冰里
|
||||||
|
kBET_Shield = 31, //护盾
|
||||||
|
|
||||||
kBET_ThroughWall = 50, //穿墙
|
kBET_ThroughWall = 50, //穿墙
|
||||||
kBET_Driver = 51, //驾驶中
|
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;
|
Creature* c = (Creature*)entity;
|
||||||
std::set<Entity*> target_list;
|
std::set<Entity*> target_list;
|
||||||
skill_target_pos_ = c->GetPos();
|
skill_target_pos_ = c->GetPos();
|
||||||
SelectSkillTargets(c->CurrentSkill(), c->GetPos(), target_list);
|
SelectSkillTargets(CurrentSkill(), c->GetPos(), target_list);
|
||||||
TriggerBuff(CurrentSkill(), target_list, kBTT_UseSkill);
|
TriggerBuff(CurrentSkill(), target_list, kBTT_UseSkill);
|
||||||
if (!CurrentSkill()->meta->phases.empty() &&
|
if (!CurrentSkill()->meta->phases.empty() &&
|
||||||
CurrentSkill()->meta->phases[0].time_offset <= 0) {
|
CurrentSkill()->meta->phases[0].time_offset <= 0) {
|
||||||
@ -475,7 +475,7 @@ void Creature::UpdateSkill()
|
|||||||
if (CurrentSkill()) {
|
if (CurrentSkill()) {
|
||||||
if (curr_skill_phase < CurrentSkill()->meta->phases.size()) {
|
if (curr_skill_phase < CurrentSkill()->meta->phases.size()) {
|
||||||
MetaData::SkillPhase* phase = &CurrentSkill()->meta->phases[curr_skill_phase];
|
MetaData::SkillPhase* phase = &CurrentSkill()->meta->phases[curr_skill_phase];
|
||||||
if (phase->time_offset >= CurrentSkill()->GetLeftTime()) {
|
if (phase->time_offset >= CurrentSkill()->GetPassedTime()) {
|
||||||
ProcSkillPhase(phase);
|
ProcSkillPhase(phase);
|
||||||
++curr_skill_phase;
|
++curr_skill_phase;
|
||||||
}
|
}
|
||||||
@ -715,6 +715,11 @@ void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case kBET_Shield:
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -55,13 +55,17 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
|||||||
break;
|
break;
|
||||||
case kST_EnemySingle:
|
case kST_EnemySingle:
|
||||||
{
|
{
|
||||||
#if 0
|
#if 1
|
||||||
Entity* entity = room->GetEntityByUniId(skill_target_id_);
|
Entity* entity = room->GetEntityByUniId(skill_target_id_);
|
||||||
if (entity && entity->IsEntityType(ET_Player)) {
|
if (entity && entity->IsEntityType(ET_Player)) {
|
||||||
Human* hum = (Human*)entity;
|
Human* hum = (Human*)entity;
|
||||||
|
#if 1
|
||||||
|
target_list.insert(hum);
|
||||||
|
#else
|
||||||
if (IsEnemy(hum)) {
|
if (IsEnemy(hum)) {
|
||||||
target_list.insert(hum);
|
target_list.insert(hum);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user