后台优化
This commit is contained in:
parent
e05fa5fbcf
commit
da8eefca45
@ -101,11 +101,13 @@ func AdminPlayerInfo(args []interface{}) error {
|
||||
req := &msg.ReqAdminInfo{}
|
||||
proto.Unmarshal(buf, req)
|
||||
player := G_GameLogicPtr.GetPlayer(req.Uid)
|
||||
online := true
|
||||
if player == nil {
|
||||
player = new(Player)
|
||||
player.M_DwUin = req.Uid
|
||||
player.InitPlayerOnly()
|
||||
player.ZeroUpdate(nil)
|
||||
online = false
|
||||
}
|
||||
res := make(map[string]interface{})
|
||||
res["Name"] = player.PlayMod.getBaseMod().NickName
|
||||
@ -121,6 +123,10 @@ func AdminPlayerInfo(args []interface{}) error {
|
||||
res["Login"] = player.GetPlayerBaseMod().Data.LoginTime
|
||||
res["Cumulative"] = player.PlayMod.getBaseMod().Cumulative
|
||||
res["TodayCumulative"] = player.PlayMod.getBaseMod().TodayCumulative
|
||||
if online {
|
||||
res["Cumulative"] = int64(player.PlayMod.getBaseMod().Cumulative) + GoUtil.Now() - int64(player.GetPlayerBaseMod().Data.LoginTime)
|
||||
res["TodayCumulative"] = int64(player.PlayMod.getBaseMod().TodayCumulative) + GoUtil.Now() - int64(player.GetPlayerBaseMod().Data.LoginTime)
|
||||
}
|
||||
res["Bonus"] = player.PlayMod.getLimitedTimeEventMod().Progress
|
||||
res["Code"] = player.PlayMod.getBaseMod().AddCode
|
||||
OrderMap := make(map[int]interface{})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user