refactor(player): 重构OgreInfo数据结构并优化怪物生成逻辑

- 将Player结构体中的OgreInfo字段从[9]OgrePetInfo数组改为OgrePet结构体
- 更新所有OgreInfo的访问方式,使用OgreInfo.Data[index]替代OgreInfo[index]
- 移除不再使用的common包
This commit is contained in:
2025-12-28 23:16:59 +08:00
parent 67227f3016
commit dee8193bde
3 changed files with 22 additions and 22 deletions

View File

@@ -165,7 +165,7 @@ func (h Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundI
if !p.CanFight() {
return nil, errorcode.ErrorCodes.ErrSystemError
}
refPet := p.OgreInfo[data1.Number]
refPet := p.OgreInfo.Data[data1.Number]
if refPet.Id == 0 {
return nil, errorcode.ErrorCodes.ErrPokemonNotExists