lt hace 6 meses
padre
commit
f4e9677d47

+ 1 - 1
RO_Server_Trunk-branch_0.1.39/rocommon/util/timer.go

@@ -30,7 +30,7 @@ var gameLoc *time.Location = nil
 
 func GetLoc() *time.Location {
 	if gameLoc == nil {
-		loc, err := time.LoadLocation("Europe/Moscow")
+		loc, err := time.LoadLocation("Asia/Shanghai")
 		if err != nil {
 			gameLoc = time.Local
 		} else {

+ 13 - 2
RO_Server_Trunk-branch_0.1.39/roserver/gmweb/msg/web_gmmsg.go

@@ -284,7 +284,8 @@ func WebGmProcessUserListGet(c *gin.Context) {
 				}
 				return nil
 			})
-			bfInfoList = append(bfInfoList, &Uid{Uid: strconv.FormatUint(bfInfo.Uid, 10), Server: strconv.Itoa(bfInfo.Serverid / 2), CharacterName: bfInfo.NickName})
+			serverId := strconv.Itoa(bfInfo.Serverid / 2)
+			bfInfoList = append(bfInfoList, &Uid{Uid: strconv.FormatUint(bfInfo.Uid, 10), Server: serverId, CharacterName: bfInfo.NickName, ServerName: serverId + "区"})
 		}
 		if len(bfInfoList) == 0 {
 			c.JSON(http.StatusOK, gin.H{
@@ -340,7 +341,15 @@ func WebGmProcessUserListCheck(c *gin.Context) {
 			return
 		}
 	}
-	c.JSON(http.StatusOK, CheckUser{CharacterName: bfInfo.NickName, Server: strconv.Itoa(bfInfo.Serverid / 2)})
+	if bfInfo == nil {
+		c.JSON(404, gin.H{
+			"code":    "UID_NOT_FOUND",
+			"message": "UID does not exist",
+		})
+		return
+	}
+	serverId := strconv.Itoa(bfInfo.Serverid / 2)
+	c.JSON(http.StatusOK, CheckUser{CharacterName: bfInfo.NickName, Server: serverId, ServerName: serverId + "区"})
 }
 
 func WebGmProcessCreateOrder(c *gin.Context) {
@@ -392,11 +401,13 @@ type UserList struct {
 type Uid struct {
 	Uid           string `json:"uid"`
 	Server        string `json:"server"`
+	ServerName    string `json:"serverName"`
 	CharacterName string `json:"characterName"`
 }
 
 type CheckUser struct {
 	Server        string `json:"server"`
+	ServerName    string `json:"serverName"`
 	CharacterName string `json:"characterName"`
 	//CallBackKey   string `json:"callBackKey"`
 }