feat(config): 添加超时空地图配置和时间地图查询功能 新增IsTimeSpace字段用于标识地图是否为超时空地图, 添加TimeMap API接口支持查询超时空地图配置 perf(socket): 优化XORDecryptU解密函数减少内存分配 基于bytebufferpool实现缓冲区池化,大幅降低高频调用下的 内存分配和GC压力,提升性能表现 refactor(utils): 优化packVal序列化函数提升性能和稳定性 减少反射开销,优化内存拷贝操作,改进错误处理机制, 替换panic为error返回,增强代码健壮性 docs(readme): 添加新的pprof性能分析地址配置 ```
This commit is contained in:
@@ -35,7 +35,10 @@ func (h Controller) EggGamePlay(data1 *egg.C2S_EGG_GAME_PLAY, c *player.Player)
|
||||
if grand.Meet(int(data1.EggNum), 100) {
|
||||
r := service.NewPetRewardService().GetEgg()
|
||||
newPet := model.GenPetInfo(int(r.MonID), int(r.DV), int(r.Nature), int(r.Effect), int(r.Lv), nil, 0)
|
||||
newPet.RandShiny()
|
||||
if grand.Meet(1, 500) {
|
||||
newPet.RandomByWeightShiny()
|
||||
}
|
||||
|
||||
c.Service.Pet.PetAdd(newPet)
|
||||
|
||||
result.HadTime = newPet.CatchTime
|
||||
|
||||
Reference in New Issue
Block a user