1
This commit is contained in:
parent
29bb2084f7
commit
bef93e4fc2
@ -41,6 +41,7 @@ void Buff::Init()
|
|||||||
INIT_LIST_HEAD(&effect_entry);
|
INIT_LIST_HEAD(&effect_entry);
|
||||||
INIT_LIST_HEAD(&depend_entry);
|
INIT_LIST_HEAD(&depend_entry);
|
||||||
INIT_LIST_HEAD(&cond_entry);
|
INIT_LIST_HEAD(&cond_entry);
|
||||||
|
INIT_LIST_HEAD(&break_skill_entry);
|
||||||
INIT_LIST_HEAD(&on_remove_contexts);
|
INIT_LIST_HEAD(&on_remove_contexts);
|
||||||
for (int effect_id : meta->_effect_list) {
|
for (int effect_id : meta->_effect_list) {
|
||||||
effect_list_.push_back(owner->AddEffect(effect_id));
|
effect_list_.push_back(owner->AddEffect(effect_id));
|
||||||
@ -60,6 +61,9 @@ void Buff::UnInit()
|
|||||||
if (!list_empty(&cond_entry)) {
|
if (!list_empty(&cond_entry)) {
|
||||||
list_del_init(&cond_entry);
|
list_del_init(&cond_entry);
|
||||||
}
|
}
|
||||||
|
if (!list_empty(&break_skill_entry)) {
|
||||||
|
list_del_init(&break_skill_entry);
|
||||||
|
}
|
||||||
while (!list_empty(&on_remove_contexts)) {
|
while (!list_empty(&on_remove_contexts)) {
|
||||||
RemoveBuffCbConext* cb = list_last_entry(&on_remove_contexts,
|
RemoveBuffCbConext* cb = list_last_entry(&on_remove_contexts,
|
||||||
RemoveBuffCbConext,
|
RemoveBuffCbConext,
|
||||||
|
@ -31,6 +31,7 @@ class Buff
|
|||||||
list_head effect_entry;
|
list_head effect_entry;
|
||||||
list_head depend_entry;
|
list_head depend_entry;
|
||||||
list_head cond_entry;
|
list_head cond_entry;
|
||||||
|
list_head break_skill_entry;
|
||||||
list_head on_remove_contexts;
|
list_head on_remove_contexts;
|
||||||
a8::XTimerWp remover_timer;
|
a8::XTimerWp remover_timer;
|
||||||
std::shared_ptr<a8::Args> init_args;
|
std::shared_ptr<a8::Args> init_args;
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
|
|
||||||
Creature::Creature():MoveableEntity()
|
Creature::Creature():MoveableEntity()
|
||||||
{
|
{
|
||||||
|
INIT_LIST_HEAD(&break_skill_buffs_);
|
||||||
weak_ptr_chunk_.Set(this);
|
weak_ptr_chunk_.Set(this);
|
||||||
trigger_ = std::make_shared<Trigger>(this);
|
trigger_ = std::make_shared<Trigger>(this);
|
||||||
trigger_->Init();
|
trigger_->Init();
|
||||||
@ -4129,3 +4130,16 @@ bool Creature::IsOb()
|
|||||||
{
|
{
|
||||||
return a8::HasBitFlag(status, CS_IsOb);
|
return a8::HasBitFlag(status, CS_IsOb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Creature::HasBreakSkillBuffs(Buff* buff)
|
||||||
|
{
|
||||||
|
if (list_empty(&break_skill_buffs_)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Creature::TriggerBreakSkill(Buff* buff)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -208,6 +208,8 @@ class Creature : public MoveableEntity
|
|||||||
void RecalcBuffAttr();
|
void RecalcBuffAttr();
|
||||||
void RemoveBuffByEffectId(int buff_effect_id);
|
void RemoveBuffByEffectId(int buff_effect_id);
|
||||||
void ClearBuffList();
|
void ClearBuffList();
|
||||||
|
bool HasBreakSkillBuffs(Buff* buff);
|
||||||
|
void TriggerBreakSkill(Buff* buff);
|
||||||
void TriggerBuff(Skill* skill, std::set<Creature*>& target_list, BuffTriggerType_e trigger_type);
|
void TriggerBuff(Skill* skill, std::set<Creature*>& target_list, BuffTriggerType_e trigger_type);
|
||||||
Skill* GetSkill(int skill_id);
|
Skill* GetSkill(int skill_id);
|
||||||
Skill* GetMainSkill();
|
Skill* GetMainSkill();
|
||||||
@ -480,6 +482,7 @@ private:
|
|||||||
int follow_times_ = 0;
|
int follow_times_ = 0;
|
||||||
std::map<int, int> buff_tags_;
|
std::map<int, int> buff_tags_;
|
||||||
const mt::BattleHeroGrow* hero_grow_meta_ = nullptr;
|
const mt::BattleHeroGrow* hero_grow_meta_ = nullptr;
|
||||||
|
list_head break_skill_buffs_;
|
||||||
|
|
||||||
int hero_level_ = 1;
|
int hero_level_ = 1;
|
||||||
int hero_exp_ = 0;
|
int hero_exp_ = 0;
|
||||||
|
@ -1038,7 +1038,7 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef MYDEBUG
|
#ifdef MYDEBUG1
|
||||||
a8::XPrintf("attack_dir:%f,%f,%f cli_dir:%f,%f,%f\n",
|
a8::XPrintf("attack_dir:%f,%f,%f cli_dir:%f,%f,%f\n",
|
||||||
{
|
{
|
||||||
GetAttackDir().x,
|
GetAttackDir().x,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user