头像框初始化

This commit is contained in:
hahwu 2026-02-12 11:21:15 +08:00
parent 29b55d85a3
commit e7feae1136
2 changed files with 2 additions and 4 deletions

View File

@ -10,7 +10,6 @@ import (
type AvatarMod struct {
List map[int]*Avatar
SetId int
Init bool
}
type Avatar struct {
@ -28,8 +27,7 @@ func (f *AvatarMod) Login(RegisterTime int64) {
}
func (a *AvatarMod) InitData() {
now := GoUtil.Now()
if a.List == nil || !a.Init {
a.Init = true
if a.List == nil {
a.List = make(map[int]*Avatar)
InitId := avatarCfg.GetInitList()
a.List = make(map[int]*Avatar, len(InitId))

View File

@ -81,7 +81,7 @@ func TestFixUserData(t *testing.T) {
func TestRandInt(t *testing.T) {
p1 := new(game.Player)
p1.InitPlayer("3625212")
p1.InitPlayer("4633401")
BaseMod := p1.GetBaseMod()
ChargeMod := p1.GetChargeMod()
EndlessMod := p1.GetEndlessMod()