This commit is contained in:
aozhiwei 2024-05-11 11:57:51 +08:00
parent 38864c9bf4
commit 27eb91010e
4 changed files with 22 additions and 10 deletions

View File

@ -400,7 +400,8 @@ void CallFuncBuff::ProcAddMinorMode()
}
}
}
});
},
meta->buff_id());
#ifdef MYDEBUG1
if (owner_ptr.Get()->IsPlayer()) {
a8::XPrintf("ProcAddMinorMode buff_uniid:%d buff_id:%d dur_time:%d frame_no:%d 2222222222222222\n",

View File

@ -184,12 +184,17 @@ int Skill::GetMaxExp()
void Skill::AddMinorMode(
int minor_type,
int minor_cd_time,
std::function<void(int)> cb
std::function<void(int)> cb,
int buff_id
)
{
#ifdef MYDEBUG1
#ifdef MYDEBUG
if (owner->IsPlayer()) {
a8::XPrintf("AddMinorMode frame_no:%d minor_type:%d\n", {owner->room->GetFrameNo(), minor_type});
a8::XPrintf("AddMinorMode frame_no:%d minor_type:%d minor_cd_time:%d buff_id:%d\n",
{owner->room->GetFrameNo(),
minor_type,
minor_cd_time,
buff_id});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
@ -205,22 +210,25 @@ void Skill::AddMinorMode(
minor_cb_ = cb;
minor_mode_timer_ = owner->room->xtimer.SetTimeoutWpEx
(minor_cd_time / FRAME_RATE_MS,
[this] (int event, const a8::Args* args)
[this, buff_id] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
#ifdef MYDEBUG1
#ifdef MYDEBUG
if (owner->IsPlayer()) {
a8::XPrintf("ExecTimer MinorMode frame_no:%d\n", {owner->room->GetFrameNo()});
a8::XPrintf("ExecTimer MinorMode frame_no:%d buff_id:%d\n", {owner->room->GetFrameNo(), buff_id});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}
#endif
} else if (a8::TIMER_DELETE_EVENT == event) {
#ifdef MYDEBUG1
#ifdef MYDEBUG
if (owner->IsPlayer()) {
a8::XPrintf("DeleteTimer MinorMode frame_no:%d\n", {owner->room->GetFrameNo()});
a8::XPrintf("DeleteTimer MinorMode frame_no:%d buff_id:%d\n", {owner->room->GetFrameNo(), buff_id});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
if (buff_id == 202030) {
int i = 0;
}
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}

View File

@ -50,7 +50,8 @@ class Skill
void AddMinorMode(
int minor_type,
int minor_cd_time,
std::function<void(int)> cb
std::function<void(int)> cb,
int buff_id
);
void DoMinorMode();
void CancelMinorMode();

View File

@ -34,7 +34,9 @@ void TraceMgr::Trace(const std::string& hint)
void TraceMgr::PrintBackTrace()
{
#if 0
std::cout << boost::stacktrace::stacktrace();
#endif
}
#endif