头像框初始化
This commit is contained in:
parent
29b55d85a3
commit
e7feae1136
@ -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))
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user