Merge branch 'develop' into sdk
This commit is contained in:
commit
099d7793f0
@ -197,7 +197,7 @@ func (ad *GameLogic) NewAccountInsertDataToDB() bool {
|
||||
playerInfo.PackUnlockCount = 5
|
||||
playerInfo.EnergyBuyCount = 0
|
||||
playerInfo.UserName = ad.Db_AccountInfo.UserName
|
||||
playerInfo.LoginTime = 0
|
||||
playerInfo.LoginTime = (int32)(time.Now().Unix())
|
||||
playerInfo.LogoutTime = 0
|
||||
playerInfo.Todayolinetime = 0
|
||||
playerInfo.Rolecreatetime = (int32)(time.Now().Unix())
|
||||
|
||||
@ -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
|
||||
@ -118,10 +120,16 @@ func AdminPlayerInfo(args []interface{}) error {
|
||||
res["Energy"] = player.GetPlayerBaseMod().GetEnergy()
|
||||
res["Diamond"] = player.GetPlayerBaseMod().GetDiamond()
|
||||
res["Mac"] = player.GetPlayerBaseMod().GetName()
|
||||
res["Login"] = player.GetPlayerBaseMod().Data.LoginTime
|
||||
res["Login"] = player.PlayMod.getBaseMod().LoginTime
|
||||
res["Cumulative"] = player.PlayMod.getBaseMod().Cumulative
|
||||
res["RegisterTime"] = player.GetPlayerBaseMod().GetRegisterTime()
|
||||
res["TodayCumulative"] = player.PlayMod.getBaseMod().TodayCumulative
|
||||
if online {
|
||||
res["Cumulative"] = int64(player.PlayMod.getBaseMod().Cumulative) + GoUtil.Now() - int64(player.PlayMod.getBaseMod().LoginTime)
|
||||
res["TodayCumulative"] = int64(player.PlayMod.getBaseMod().TodayCumulative) + GoUtil.Now() - int64(player.PlayMod.getBaseMod().LoginTime)
|
||||
}
|
||||
res["Bonus"] = player.PlayMod.getLimitedTimeEventMod().Progress
|
||||
res["Code"] = player.PlayMod.getBaseMod().AddCode
|
||||
OrderMap := make(map[int]interface{})
|
||||
Index := 0
|
||||
for k, v := range player.PlayMod.getOrderMod().OrderList {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user