修复玩家基础信息

This commit is contained in:
hahwu 2025-01-08 11:03:21 +08:00
parent 274d730c0b
commit b0a98d1680
2 changed files with 8 additions and 2 deletions

View File

@ -130,6 +130,12 @@ func ReqGmCommand(args []interface{}) error {
case "clearRank": case "clearRank":
num, _ := strconv.Atoi(arg[1]) num, _ := strconv.Atoi(arg[1])
G_GameLogicPtr.RankMgr.ClearRank(num) G_GameLogicPtr.RankMgr.ClearRank(num)
case "resetUserInfo":
Rank := G_GameLogicPtr.RankMgr.getRank(RANK_TYPE_USER)
for _, v := range Rank {
G_GameLogicPtr.GetResSimplePlayerByUid(v.Uid)
}
case "champshipZero": case "champshipZero":
G_GameLogicPtr.ChampshipMgrSend(&MsgMod.Msg{ G_GameLogicPtr.ChampshipMgrSend(&MsgMod.Msg{
Type: MsgMod.HANDLE_TYPE_CHAMPSHIP_ZERO, Type: MsgMod.HANDLE_TYPE_CHAMPSHIP_ZERO,

View File

@ -694,7 +694,7 @@ func (p *Player) GetSimpleData(Uid int, simple *PlayerSimpleData) error {
if Base == nil { if Base == nil {
return errors.New("GetSimpleData failed") return errors.New("GetSimpleData failed")
} }
simple.Name = p.GetPlayerBaseMod().GetName() simple.Name = p.PlayMod.getBaseMod().NickName
simple.Avatar = p.PlayMod.getAvatarMod().SetId simple.Avatar = p.PlayMod.getAvatarMod().SetId
simple.Face = p.PlayMod.getFaceMod().SetId simple.Face = p.PlayMod.getFaceMod().SetId
simple.Level = p.GetPlayerBaseMod().GetLevel() simple.Level = p.GetPlayerBaseMod().GetLevel()
@ -715,7 +715,7 @@ func (p *Player) GetSimpleData(Uid int, simple *PlayerSimpleData) error {
func (p *Player) UpdateUserInfo() { func (p *Player) UpdateUserInfo() {
simple := &PlayerSimpleData{} simple := &PlayerSimpleData{}
Base := p.GetPlayerBaseMod() Base := p.GetPlayerBaseMod()
simple.Name = p.GetPlayerBaseMod().GetName() simple.Name = p.PlayMod.getBaseMod().NickName
simple.Avatar = p.PlayMod.getAvatarMod().SetId simple.Avatar = p.PlayMod.getAvatarMod().SetId
simple.Uid = int(p.M_DwUin) simple.Uid = int(p.M_DwUin)
simple.Star = p.GetPlayerBaseMod().GetStar() simple.Star = p.GetPlayerBaseMod().GetStar()