编辑文件 action.go
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-02-23 22:28:40 +08:00
committed by cnb
parent b260fff8e8
commit 25c9ecdad6

View File

@@ -78,7 +78,7 @@ func (f *FightC) ChangePet(c common.PlayerI, id uint32) {
case f.actionChan <- ret:
// 发送成功,可选记录日志
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, id)
case <-time.After(time.Second * 10):
case <-time.After(time.Second * 60):
// 通道满时的降级处理
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send skill, userID: %d, skillID: %d",
c.GetInfo().UserID, id)
@@ -120,7 +120,7 @@ func (f *FightC) UseSkill(c common.PlayerI, id uint32) {
case f.actionChan <- ret:
// 发送成功,可选记录日志
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, id)
case <-time.After(time.Second * 10):
case <-time.After(time.Second * 60):
// 通道满时的降级处理
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send skill, userID: %d, skillID: %d",
c.GetInfo().UserID, id)
@@ -137,7 +137,7 @@ func (f *FightC) Capture(c common.PlayerI, id uint32) {
case f.actionChan <- &action.UseItemAction{BaseAction: action.NewBaseAction(c.GetInfo().UserID), ItemID: id}:
// 发送成功,可选记录日志
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, id)
case <-time.After(time.Second * 10):
case <-time.After(time.Second * 60):
// 通道满时的降级处理
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send Capture, userID: %d ",
c.GetInfo().UserID)
@@ -155,7 +155,7 @@ func (f *FightC) UseItem(c common.PlayerI, cacthid, itemid uint32) {
case f.actionChan <- &action.UseItemAction{BaseAction: action.NewBaseAction(c.GetInfo().UserID), ItemID: itemid, CacthTime: cacthid}:
// 发送成功,可选记录日志
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, id)
case <-time.After(time.Second * 10):
case <-time.After(time.Second * 60):
// 通道满时的降级处理
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send UseItem, userID: %d, skillID: %d",
c.GetInfo().UserID, cacthid)