根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:

```
docs(changelog): 更新版本更新日志

- 添加新功能说明
- 修复已知问题记录
- 更新相关文档内容
```
This commit is contained in:
昔念
2026-01-20 02:25:02 +08:00
parent 026689f3ed
commit 562bf380eb
28 changed files with 75 additions and 64 deletions

View File

@@ -9,7 +9,7 @@ import (
// 对应原 C# 的 C2S_EGG_GAME_PLAY
type C2S_EGG_GAME_PLAY struct {
Head common.TomeeHeader `cmd:"3201" struc:"skip"`
EggNum uint32 `json:"eggNum"` // 抽蛋次数标识1 = 1次 2 = 5次 3 = 10次
EggNum int32 `struc:"uint32"` // 抽蛋次数标识1 = 1次 2 = 5次 3 = 10次
// 注Go 中 uint 是平台相关类型32/64位游戏开发中推荐用 uint32 明确匹配 C# 的 uint
}

View File

@@ -80,7 +80,7 @@ func (f *FightC) UseSkill(c common.PlayerI, id uint32) {
ret := &action.SelectSkillAction{
BaseAction: action.NewBaseAction(c.GetInfo().UserID),
}
println("使用技能", c.GetInfo().UserID, id)
if f.GetInputByPlayer(c, false).CurrentPet == nil {
return
}

View File

@@ -22,12 +22,13 @@ type Effect6 struct {
// 我方使用效果
func (e *Effect6) Skill_Useed() bool {
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
t := &info.DamageZone{
Type: info.DamageType.Fixed,
//这个对面计算前是在他的回合,所以后手也能拿到伤害
Damage: e.Ctx().Our.SumDamage.Div(alpacadecimal.NewFromInt(int64(e.SideEffectArgs[0]))),
})
}
t.Damage = alpacadecimal.Min(t.Damage, e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1)))
e.Ctx().Our.Damage(e.Ctx().Our, t)
return true
}

View File

@@ -68,7 +68,7 @@ type ContinuousDamage struct {
// 技能命中前触发伤害1/8最大生命值真实伤害
func (e *ContinuousDamage) ActionStart(attacker, defender *action.SelectSkillAction) bool {
damage := e.calculateDamage()
println(damage.IntPart(), "烧伤")
e.Ctx().Our.Damage(e.Input, &info.DamageZone{
Type: info.DamageType.True,
Damage: damage,

View File

@@ -7,7 +7,6 @@ import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/modules/player/model"
"fmt"
"reflect"
"github.com/alpacahq/alpacadecimal"
@@ -268,12 +267,12 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
})
}
fmt.Println(i,
"技能名称:", attacker.CurrentPet.Info.Name,
"玩家技能伤害:", attacker.SumDamage,
"自身剩余血量:", attacker.CurrentPet.Info.Hp,
"对手剩余血量:", defender.CurrentPet.Info.Hp,
)
// fmt.Println(i,
// "技能名称:", attacker.CurrentPet.Info.Name,
// "玩家技能伤害:", attacker.SumDamage,
// "自身剩余血量:", attacker.CurrentPet.Info.Hp,
// "对手剩余血量:", defender.CurrentPet.Info.Hp,
// )
if attacker.CurrentPet.Info.Hp <= 0 {
attacker.CurrentPet.NotAlive = true
f.Broadcast(func(ff *input.Input) {

View File

@@ -192,7 +192,7 @@ func (our *Input) Damage(in *Input, sub *info.DamageZone) {
}
func (our *Input) GetAction() {
println("开始执行NPC动作")
next := our.Exec(func(t Effect) bool {
return t.HookAction()

View File

@@ -2,6 +2,7 @@ package input
import (
"blazing/common/data/xmlres"
"blazing/cool"
"fmt"
"blazing/logic/service/common"
@@ -71,7 +72,9 @@ func (our *Input) SortPet() {
t := Geteffect(EffectType.NewSel, e1.EID)
if t != nil {
ef := t.ID()
fmt.Println("初始化特性", ef.Suffix())
if cool.Config.ServerInfo.IsDebug != 0 {
fmt.Println("初始化特性", ef.Suffix())
}
ef.SetCatchTime(s.Info.CatchTime)

View File

@@ -3,8 +3,6 @@ package input
import (
"blazing/common/utils"
"blazing/logic/service/fight/info"
"fmt"
)
// 攻击,防御,特攻,特防,速度,命中
@@ -27,20 +25,20 @@ func (target *Input) SetProp(source *Input, prop, level int8, opType info.EnumAb
// 属性提升上限为6
newValue = utils.Min(target.AttackValue.Prop[p]+l, 6)
if newValue > target.AttackValue.Prop[p] {
fmt.Println("属性值会增加")
//fmt.Println("属性值会增加")
return true
}
fmt.Println("属性值不会增加")
//fmt.Println("属性值不会增加")
return false
case info.AbilityOpType.SUB:
// 属性降低,下限为-6
newValue = utils.Max(target.AttackValue.Prop[p]+l, -6)
if newValue < target.AttackValue.Prop[p] {
fmt.Println("属性值会减少")
//fmt.Println("属性值会减少")
return true
}
fmt.Println("属性值不会减少")
//fmt.Println("属性值不会减少")
return false
case info.AbilityOpType.RESET:

View File

@@ -31,15 +31,13 @@ func (f *FightC) battleLoop() {
for !f.closefight {
f.Round++
//fmt.Printf("—— 第 %d 回合开始 ——\n", f.Round)
// AI自动技能
actions := f.collectPlayerActions(ourID, oppID)
if f.closefight {
break
}
println("进入回合", f.Round)
f.resolveRound(actions[ourID], actions[oppID])
}
@@ -89,6 +87,7 @@ func (f *FightC) battleLoop() {
defer f.Our.Player.(*player.Player).Service.Barge.Update(f.Opp.Player.GetInfo().PetList[0].ID, true)
}
f.Our.Player.(*player.Player).GenMonster()
}
//大乱斗,给个延迟
@@ -109,8 +108,7 @@ func (f *FightC) battleLoop() {
f.callback(f.FightOverInfo) //先执行回调,再执行返回信息,在回调内修改战斗判断
}
// close(f.actionChan)
fmt.Println(f.ownerID, "战斗循环结束")
close(f.over)
}
@@ -191,8 +189,7 @@ func (f *FightC) collectPlayerActions(ourID, oppID uint32) map[uint32]action.Bat
if f.Info.Status == info.BattleMode.FIGHT_WITH_NPC && pid == 0 {
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
f.Our.Player.SendPackCmd(2407, &ret.Reason)
// f.Opp.GetAction()
println("开始执行NPC死切动作")
}
continue
}
@@ -310,7 +307,7 @@ func (f *FightC) handleItemAction(a *action.UseItemAction) {
if !ok {
return
}
r := f.GetInputByAction(a, false).Player.(*player.Player).Service.Item.CheakItem(a.ItemID)
r := f.GetInputByAction(a, false).Player.(*player.Player).Service.Item.CheakItem(uint32(a.ItemID))
if r < 1 {
return
}
@@ -400,7 +397,7 @@ func (f *FightC) handleSkillActions(a1, a2 action.BattleActionI) {
}
f.enterturn(s1, s2)
fmt.Println("玩家执行技能:", s1.PlayerID, s1.Info.ID, s2.PlayerID, s2.Info.ID)
}
}

View File

@@ -9,7 +9,7 @@ import (
type C2S_USE_PET_ITEM_OUT_OF_FIGHT struct {
Head common.TomeeHeader `cmd:"2326" struc:"skip"`
CatchTime uint32 `json:"catch_time"` // 使用物品的精灵的捕获时间
ItemID uint32 `json:"item_id"` // 使用的物品ID
ItemID int32 `struc:"uint32"` // 使用的物品ID
}
// S2C_USE_PET_ITEM_OUT_OF_FIGHT 服务端→客户端:非战斗场景使用宠物道具回包

View File

@@ -31,7 +31,7 @@ func (p *Player) Next(time.Time) time.Time {
}
// 应该根据怪物信息决定后端生成
func (p *Player) genMonster() {
func (p *Player) GenMonster() {
if atomic.LoadUint32(&p.Canmon) == 0 { //已经进入地图或者没在战斗中,就可以刷新怪
return
}

View File

@@ -18,18 +18,19 @@ func (p *Player) BossCompletedTask(taskID int, ot int) {
}
p.Service.Task.Exec(uint32(taskID), func(te *model.TaskEX) bool {
if te != nil {
r := bitset32.From(te.Data)
if !r.Test(uint(ot)) {
r.Set(uint(ot))
p.bossgive(taskID, ot)
}
if te.Data == nil {
te.Data = []uint32{}
}
return true
r := bitset32.From(te.Data)
if !r.Test(uint(ot)) {
r.Set(uint(ot))
p.bossgive(taskID, ot)
te.Data = r.Bytes()
return true
}
return false
})
}

View File

@@ -23,7 +23,7 @@ func NewPlayer(opts ...PlayerOption) *Player {
// 获取当前地图的怪物配置
p.genMonster() //生成野怪
p.GenMonster() //生成野怪
})

View File

@@ -218,8 +218,10 @@ func (h *ClientData) OnEvent(v []byte) {
return
}
}
fmt.Println("接收数据", header.UserID, header.CMD)
// cool.Loger.Debug(context.TODO(), "接收数据", header.UserID, header.CMD)
if cool.Config.ServerInfo.IsDebug != 0 {
fmt.Println("接收数据", header.UserID, header.CMD)
}
h.Recv(header)
}

View File

@@ -49,7 +49,7 @@ func (o *OgrePetInfo) RandSHiny() {
var co *data.GlowFilter
if o.Ext == 0 {
co = config.NewShinyService().RandShiny(o.Id)
co = config.NewShinyService().FixShiny(o.Id)
}
if co != nil && len(o.ShinyInfo) == 0 {