1
This commit is contained in:
parent
568e52a485
commit
883b1373c1
@ -372,6 +372,7 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
||||
break;
|
||||
case kST_EnemyAndSelf:
|
||||
{
|
||||
#if 0
|
||||
TouchAllLayerHumanList
|
||||
(
|
||||
[this, skill, &target_pos, &target_list] (Human* hum, bool& stop)
|
||||
@ -381,6 +382,7 @@ void Creature::SelectSkillTargets(Skill* skill, const a8::Vec2& target_pos, std:
|
||||
target_list.insert(hum);
|
||||
}
|
||||
});
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case kST_SingleEnemyAndSelf:
|
||||
@ -470,8 +472,10 @@ void Creature::DoSkill(int skill_id, int target_id, const a8::Vec2& target_pos)
|
||||
DoSkillPreProc(skill_id, target_id, target_pos);
|
||||
skill_target_id_ = target_id;
|
||||
skill_target_pos_ = target_pos;
|
||||
if (CanUseSkill(skill_id)) {
|
||||
Skill* skill = GetSkill(skill_id);
|
||||
if (skill && CanUseSkill(skill_id)) {
|
||||
ResetSkill();
|
||||
curr_skill_ = skill;
|
||||
playing_skill = true;
|
||||
CurrentSkill()->last_use_frameno = room->GetFrameNo();
|
||||
if (CurrentSkill()->meta->i->skill_target() == kST_Self
|
||||
@ -511,6 +515,7 @@ void Creature::DoSkillPostProc(bool used, int skill_id, int target_id, const a8:
|
||||
|
||||
void Creature::ResetSkill()
|
||||
{
|
||||
curr_skill_ = nullptr;
|
||||
curr_skill_phase = 0;
|
||||
skill_dir = a8::Vec2();
|
||||
skill_target_pos_ = a8::Vec2();
|
||||
@ -596,7 +601,7 @@ MetaData::SkillPhase* Creature::GetCurrSkillPhase()
|
||||
|
||||
Skill* Creature::CurrentSkill()
|
||||
{
|
||||
return nullptr;
|
||||
return curr_skill_;
|
||||
}
|
||||
|
||||
void Creature::ProcBuffEffect(Creature* caster, Buff* buff)
|
||||
|
@ -90,6 +90,7 @@ private:
|
||||
float skill_param1 = 0;
|
||||
bool playing_skill = false;
|
||||
size_t curr_skill_phase = 0;
|
||||
Skill* curr_skill_ = nullptr;
|
||||
int skill_target_id_ = 0;
|
||||
a8::Vec2 skill_target_pos_;
|
||||
std::map<int, Skill*> skill_hash_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user