This commit is contained in:
aozhiwei 2024-03-15 17:39:30 +08:00
parent b2bb5abb78
commit 8f714b5d62
2 changed files with 26 additions and 3 deletions

View File

@ -355,6 +355,15 @@ void CallFuncBuff::ProcAddMinorMode()
auto owner_ptr = owner->GetWeakPtrRef();
auto meta_ptr = meta;
auto skill_meta_ptr = skill_meta;
#ifdef MYDEBUG
if (owner_ptr.Get()->IsPlayer()) {
a8::XPrintf("ProcAddMinorMode buff_uniid:%d buff_id:%d dur_time:%d\n",
{
buff_uniid,
meta->buff_id(),
dur_time});
}
#endif
skill->AddMinorMode
(
meta->_int_buff_param2,
@ -378,7 +387,11 @@ void CallFuncBuff::ProcAddMinorMode()
owner_ptr.Get()->RemoveBuffById(buff_id);
}
}
#if 0
} else if (action == kSmaTimeOut) {
#else
} else if (action == kSmaTimeOut || action == kSmaCancel) {
#endif
for (int buff_id : meta_ptr->_buff_param7_int_list) {
owner_ptr.Get()->RemoveBuffById(buff_id);
}
@ -388,6 +401,15 @@ void CallFuncBuff::ProcAddMinorMode()
}
}
});
#ifdef MYDEBUG
if (owner_ptr.Get()->IsPlayer()) {
a8::XPrintf("ProcAddMinorMode buff_uniid:%d buff_id:%d dur_time:%d 2222222222222222\n",
{
buff_uniid,
meta->buff_id(),
dur_time});
}
#endif
}
}
}

View File

@ -483,13 +483,14 @@ void Skill::ProcJumpToPhase(const mt::SkillPhase* phase)
void Skill::CancelMinorMode()
{
if (GetMinorType() != SMT_NONE) {
if (minor_cb_) {
minor_cb_(kSmaCancel);
}
auto old_cb = minor_cb_;
minor_cb_ = nullptr;
if (!minor_mode_timer_.expired()) {
owner->room->xtimer.Delete(minor_mode_timer_);
}
if (old_cb) {
old_cb(kSmaCancel);
}
}
}