编辑文件 action.go
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -78,7 +78,7 @@ func (f *FightC) ChangePet(c common.PlayerI, id uint32) {
|
|||||||
case f.actionChan <- ret:
|
case f.actionChan <- ret:
|
||||||
// 发送成功,可选记录日志
|
// 发送成功,可选记录日志
|
||||||
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, 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 skill, userID: %d, skillID: %d",
|
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send skill, userID: %d, skillID: %d",
|
||||||
c.GetInfo().UserID, id)
|
c.GetInfo().UserID, id)
|
||||||
@@ -120,7 +120,7 @@ func (f *FightC) UseSkill(c common.PlayerI, id uint32) {
|
|||||||
case f.actionChan <- ret:
|
case f.actionChan <- ret:
|
||||||
// 发送成功,可选记录日志
|
// 发送成功,可选记录日志
|
||||||
// log.Printf("send skill success, userID: %d, skillID: %d", c.GetInfo().UserID, 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 skill, userID: %d, skillID: %d",
|
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send skill, userID: %d, skillID: %d",
|
||||||
c.GetInfo().UserID, id)
|
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}:
|
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)
|
// 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 ",
|
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send Capture, userID: %d ",
|
||||||
c.GetInfo().UserID)
|
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}:
|
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)
|
// 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",
|
cool.Logger.Printf(context.Background(), "actionChan is full, failed to send UseItem, userID: %d, skillID: %d",
|
||||||
c.GetInfo().UserID, cacthid)
|
c.GetInfo().UserID, cacthid)
|
||||||
|
|||||||
Reference in New Issue
Block a user