This commit is contained in:
aozhiwei 2024-04-26 10:55:41 +08:00
parent 853d5cd2bc
commit 665c9a26a2
6 changed files with 59 additions and 6 deletions

View File

@ -401,13 +401,15 @@ void CallFuncBuff::ProcAddMinorMode()
}
}
});
#ifdef MYDEBUG
#ifdef MYDEBUG1
if (owner_ptr.Get()->IsPlayer()) {
a8::XPrintf("ProcAddMinorMode buff_uniid:%d buff_id:%d dur_time:%d 2222222222222222\n",
a8::XPrintf("ProcAddMinorMode buff_uniid:%d buff_id:%d dur_time:%d frame_no:%d 2222222222222222\n",
{
buff_uniid,
meta->buff_id(),
dur_time});
dur_time,
owner_ptr.Get()->room->GetFrameNo(),
});
}
#endif
}

View File

@ -360,6 +360,7 @@ int Creature::AddBuff(Creature* caster,
room->frame_event.AddBuff(GetWeakPtrRef(), buff.get());
}
#ifdef MYDEBUG1
if (IsPlayer())
{
SendDebugMsg(a8::Format("添加buff_id:%d effect:%d %s params:%d,%d,%d,%d,%d uniid:%d dur:%d",
{
@ -375,7 +376,7 @@ int Creature::AddBuff(Creature* caster,
room->xtimer.GetRemainTime(buff->remover_timer)
}));
a8::XPrintf("%s\n", {(a8::Format("添加buff_id:%d effect:%d %s params:%d,%d,%d,%d,%d uniid:%d dur:%d",
a8::XPrintf("%s\n", {(a8::Format("添加buff_id:%d effect:%d %s params:%d,%d,%d,%d,%d uniid:%d dur:%d frame_no:%d",
{
buff_meta->buff_id(),
buff_meta->buff_effect(),
@ -386,7 +387,8 @@ int Creature::AddBuff(Creature* caster,
buff_meta->_int_buff_param4,
buff_meta->_int_buff_param5,
buff->buff_uniid,
room->xtimer.GetRemainTime(buff->remover_timer)
room->xtimer.GetRemainTime(buff->remover_timer),
room->GetFrameNo()
}))});
}

View File

@ -392,6 +392,10 @@ public:
(context_.buff->skill_meta->skill_id(),
atom_idx.val,
atom_val.val);
} else {
#ifdef MYDEBUG
abort();
#endif
}
} else {
#ifdef MYDEBUG

View File

@ -956,6 +956,12 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg)
});
}
#endif
#ifdef MYDEBUG1
a8::XPrintf("CMMove aiming%d\n",
{
msg.aiming()
});
#endif
#ifdef MYDEBUG1
if (msg.skill_id()) {
a8::XPrintf("CMMove.Shot shot_sart:%d shot_hold:%d skill_hold:%d skill_id:%d seq:%d\n",

View File

@ -21,6 +21,7 @@
#include "movement.h"
#include "team.h"
#include "app.h"
#include "tracemgr.h"
#include "mt/Buff.h"
#include "mt/Skill.h"
@ -186,6 +187,14 @@ void Skill::AddMinorMode(
std::function<void(int)> cb
)
{
#ifdef MYDEBUG1
if (owner->IsPlayer()) {
a8::XPrintf("AddMinorMode frame_no:%d minor_type:%d\n", {owner->room->GetFrameNo(), minor_type});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}
#endif
bool is_player = owner->IsPlayer();
if (!minor_mode_timer_.expired()) {
owner->room->xtimer.Delete(minor_mode_timer_);
@ -199,7 +208,23 @@ void Skill::AddMinorMode(
[this] (int event, const a8::Args* args)
{
if (a8::TIMER_EXEC_EVENT == event) {
#ifdef MYDEBUG1
if (owner->IsPlayer()) {
a8::XPrintf("ExecTimer MinorMode frame_no:%d\n", {owner->room->GetFrameNo()});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}
#endif
} else if (a8::TIMER_DELETE_EVENT == event) {
#ifdef MYDEBUG1
if (owner->IsPlayer()) {
a8::XPrintf("DeleteTimer MinorMode frame_no:%d\n", {owner->room->GetFrameNo()});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}
#endif
minor_type_ = SMT_NONE;
minor_cd_time_ = 0;
minor_frameno_ = 0;
@ -245,6 +270,20 @@ void Skill::AddMinorMode(
void Skill::DoMinorMode()
{
#ifdef MYDEBUG1
if (owner->IsPlayer()) {
a8::XPrintf("DoMinorMode frameno:%d minor_type:%d timer_expired:%d cb:%d\n",
{
owner->room->GetFrameNo(),
GetMinorType(),
minor_mode_timer_.expired() ? 1 : 0,
minor_cb_ != nullptr ? 1 : 0
});
a8::XPrintf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n", {});
TraceMgr::Instance()->PrintBackTrace();
a8::XPrintf("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n", {});
}
#endif
if (GetMinorType() != SMT_NONE &&
GetMinorType() != SMT_DISABLE) {
auto old_cb = minor_cb_;

2
third_party/a8 vendored

@ -1 +1 @@
Subproject commit 4b4462b83320d77e10ea347d4055656538a4b220
Subproject commit d8a2bcbafed7b2a6941cb13131bfea1ef143066b