This commit is contained in:
@@ -64,6 +64,12 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
|
||||
c.Service.Item.UPDATE(v, -1)
|
||||
|
||||
}
|
||||
result = &pet.PetFusionInfo{
|
||||
|
||||
SoulID: 1000017,
|
||||
|
||||
CostItemFlag: 0,
|
||||
}
|
||||
if resid == 0 {
|
||||
|
||||
_, ok := lo.Find(data.GoldItem1[:], func(item uint32) bool {
|
||||
@@ -71,6 +77,7 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
|
||||
})
|
||||
if c.Service.Item.CheakItem(300044) > 0 && ok {
|
||||
c.Service.Item.UPDATE(300044, -1)
|
||||
result.CostItemFlag = 1
|
||||
|
||||
} else {
|
||||
if Auxpetinfo.Level > 5 {
|
||||
@@ -112,17 +119,14 @@ func (h Controller) PetFusion(data *pet.C2S_PetFusion, c *player.Player) (result
|
||||
|
||||
if c.Service.Item.CheakItem(300043) > 0 && ok2 {
|
||||
c.Service.Item.UPDATE(300043, -1)
|
||||
result.CostItemFlag = 1
|
||||
} else {
|
||||
|
||||
c.PetDel(data.Auxcatchtime)
|
||||
|
||||
}
|
||||
|
||||
result.ObtainTime = r.CatchTime
|
||||
result.StarterCpTm = r.ID
|
||||
//todo材料扣除
|
||||
return &pet.PetFusionInfo{
|
||||
ObtainTime: r.CatchTime,
|
||||
SoulID: 1000017,
|
||||
StarterCpTm: r.ID,
|
||||
CostItemFlag: 0,
|
||||
}, 0
|
||||
return result, 0
|
||||
}
|
||||
|
||||
@@ -245,13 +245,12 @@ func (f *FightC) handleTimeout(ourID, oppID uint32, actions map[uint32]action.Ba
|
||||
if _, exists := actions[pid]; exists {
|
||||
continue
|
||||
}
|
||||
//cool.Logger.Debug(context.Background(), "玩家超时", pid)
|
||||
|
||||
f.Reason = info.BattleOverReason.PlayerOVerTime
|
||||
f.closefight = true
|
||||
//对方赢
|
||||
if f.Info.Status == info.BattleMode.FIGHT_WITH_NPC {
|
||||
f.WinnerId = f.GetInputByPlayer(f.getPlayerByID(pid), true).Player.GetInfo().UserID
|
||||
f.WinnerId = 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ func NewFight(p1, p2 common.PlayerI, fn func(info.FightOverInfo)) (*FightC, erro
|
||||
})
|
||||
|
||||
cool.Cron.AfterFunc(loadtime, func() {
|
||||
fmt.Println(f.Our.UserID, "战斗超时结算")
|
||||
//fmt.Println(f.Our.UserID, "战斗超时结算")
|
||||
if !f.Our.Finished || !f.Opp.Finished { //如果有任一没有加载完成
|
||||
f.closefight = true //阻止继续添加action
|
||||
f.Reason = info.BattleOverReason.PlayerOffline
|
||||
|
||||
Reference in New Issue
Block a user