增加账号重置GM
This commit is contained in:
parent
f99ece7531
commit
07935149a7
@ -561,6 +561,7 @@ func ReqGmCommand_(player *Player, Command string) error {
|
||||
}
|
||||
log.Debug("player reset: old account: %s; new account %s", account, newAccount)
|
||||
BaseMod.Account = newAccount
|
||||
player.GetPlayerBaseMod().Data.UserName = newAccount
|
||||
player.PushAndSendClienRes(&msg.ForceKickOut{})
|
||||
case "resetCode":
|
||||
BaseMod := player.PlayMod.getBaseMod()
|
||||
|
||||
@ -170,10 +170,9 @@ func (p *PlayerModData) InitMod(player *Player) (bool, error) {
|
||||
is_update = true
|
||||
}
|
||||
BaseMod := &p.ModList.Base
|
||||
PlayerBaseMod := player.GetPlayerBaseMod()
|
||||
if BaseMod.Uid == 0 {
|
||||
PlayerBaseMod := player.GetPlayerBaseMod()
|
||||
BaseMod.Uid = PlayerBaseMod.Data.DwUin
|
||||
BaseMod.SetAccount(PlayerBaseMod.Data.UserName)
|
||||
BaseMod.SetLevel(1)
|
||||
BaseMod.SetExp(0)
|
||||
BaseMod.SetEnergy(userCfg.GetInitEnergy())
|
||||
@ -183,6 +182,7 @@ func (p *PlayerModData) InitMod(player *Player) (bool, error) {
|
||||
BaseMod.FackBookId = PlayerBaseMod.Data.FaceBookId
|
||||
is_update = true
|
||||
}
|
||||
BaseMod.SetAccount(PlayerBaseMod.Data.UserName)
|
||||
Ip := p.GetPlayer().GetIp()
|
||||
p.ModList.Handbook.InitData()
|
||||
p.ModList.Order.InitData()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user