1
This commit is contained in:
parent
12642cbf6b
commit
017d59721e
@ -583,7 +583,7 @@ void Human::DoSkill()
|
|||||||
std::set<Entity*> target_list;
|
std::set<Entity*> target_list;
|
||||||
skill_target_pos = hum->pos;
|
skill_target_pos = hum->pos;
|
||||||
SelectSkillTargets(hum->pos, target_list);
|
SelectSkillTargets(hum->pos, target_list);
|
||||||
TriggerBuff(target_list, BTT_UseSkill);
|
TriggerBuff(skill_meta, target_list, BTT_UseSkill);
|
||||||
if (!skill_meta->phases.empty() && skill_meta->phases[0].time_offset <= 0) {
|
if (!skill_meta->phases.empty() && skill_meta->phases[0].time_offset <= 0) {
|
||||||
UpdateSkill();
|
UpdateSkill();
|
||||||
}
|
}
|
||||||
@ -1210,10 +1210,11 @@ int Human::GetSkillCd()
|
|||||||
return skill_meta ? skill_meta->i->skill_cd() * 1000 : 0;
|
return skill_meta ? skill_meta->i->skill_cd() * 1000 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Human::TriggerBuff(std::set<Entity*>& target_list, BuffTriggerType_e trigger_type)
|
void Human::TriggerBuff(MetaData::Skill* sender_skill_meta,
|
||||||
|
std::set<Entity*>& target_list, BuffTriggerType_e trigger_type)
|
||||||
{
|
{
|
||||||
auto itr = skill_meta->trigger_type_buffs.find(trigger_type);
|
auto itr = sender_skill_meta->trigger_type_buffs.find(trigger_type);
|
||||||
if (itr != skill_meta->trigger_type_buffs.end()) {
|
if (itr != sender_skill_meta->trigger_type_buffs.end()) {
|
||||||
for (MetaData::Buff* buff_meta : itr->second) {
|
for (MetaData::Buff* buff_meta : itr->second) {
|
||||||
for (Entity* entity : target_list) {
|
for (Entity* entity : target_list) {
|
||||||
if (entity->entity_type != ET_Player) {
|
if (entity->entity_type != ET_Player) {
|
||||||
@ -1406,7 +1407,7 @@ void Human::OnSkillHit(MetaData::Skill* skill_meta)
|
|||||||
{
|
{
|
||||||
std::set<Entity*> target_list;
|
std::set<Entity*> target_list;
|
||||||
target_list.insert(this);
|
target_list.insert(this);
|
||||||
TriggerBuff(target_list, BTT_SkillHit);
|
TriggerBuff(skill_meta, target_list, BTT_SkillHit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Human::OnEnterGrass()
|
void Human::OnEnterGrass()
|
||||||
@ -1657,7 +1658,7 @@ void Human::_UpdateAssaultMove()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TriggerBuff(target_list, BTT_SkillHit);
|
TriggerBuff(skill_meta, target_list, BTT_SkillHit);
|
||||||
room->frame_event.AddExplosion(0, pos, 2);
|
room->frame_event.AddExplosion(0, pos, 2);
|
||||||
room->grid_service.MoveHuman(this);
|
room->grid_service.MoveHuman(this);
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,8 @@ class Human : public Entity
|
|||||||
int SkinLv();
|
int SkinLv();
|
||||||
int GetSkillLeftTime();
|
int GetSkillLeftTime();
|
||||||
int GetSkillCd();
|
int GetSkillCd();
|
||||||
void TriggerBuff(std::set<Entity*>& target_list, BuffTriggerType_e trigger_type);
|
void TriggerBuff(MetaData::Skill* sender_skill_meta,
|
||||||
|
std::set<Entity*>& target_list, BuffTriggerType_e trigger_type);
|
||||||
void AddBuff(MetaData::Buff* buff_meta);
|
void AddBuff(MetaData::Buff* buff_meta);
|
||||||
void RemoveBuffById(int buff_id);
|
void RemoveBuffById(int buff_id);
|
||||||
void RemoveBuffByEffectId(int buff_effect_id);
|
void RemoveBuffByEffectId(int buff_effect_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user