Przeglądaj źródła

新增代金币资源类型

lt 6 miesięcy temu
rodzic
commit
36b9d91393

+ 3 - 1
RO_Server_Trunk-branch_0.1.39/roserver/gmweb/main.go

@@ -1,6 +1,7 @@
 package main
 package main
 
 
 import (
 import (
+	"fmt"
 	"io/ioutil"
 	"io/ioutil"
 	"os"
 	"os"
 	"rocommon"
 	"rocommon"
@@ -90,7 +91,8 @@ func main() {
 		GiftList: make([]msg.GiftLists, 0),
 		GiftList: make([]msg.GiftLists, 0),
 	}
 	}
 	for _, v := range serverproto.RuneShopGiftsCfgLoader {
 	for _, v := range serverproto.RuneShopGiftsCfgLoader {
-		msg.ResDnyPayInfo.GiftList = append(msg.ResDnyPayInfo.GiftList, msg.GiftLists{strconv.Itoa(int(v.Id)), v.Name, float64(v.RMB), strconv.Itoa(int(v.Type)), v.Name, -1})
+		r, _ := strconv.ParseFloat(fmt.Sprintf("%.1f", v.RMB), 64)
+		msg.ResDnyPayInfo.GiftList = append(msg.ResDnyPayInfo.GiftList, msg.GiftLists{strconv.Itoa(int(v.Id)), v.Name, r, strconv.Itoa(int(v.Type)), v.Name, -1})
 	}
 	}
 	go func() {
 	go func() {
 		defer func() {
 		defer func() {

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

@@ -367,12 +367,12 @@ type ResGetPayInfo struct {
 }
 }
 
 
 type GiftLists struct {
 type GiftLists struct {
-	Id      string  `json:"Id"`      //充值档位ID
+	Id      string  `json:"id"`      //充值档位ID
 	Name    string  `json:"name"`    //充值档位名(展示给用户的
 	Name    string  `json:"name"`    //充值档位名(展示给用户的
-	Amount  float64 `json:"Amount"`  //充值档位金额 | 单位/元
+	Amount  float64 `json:"amount"`  //充值档位金额 | 单位/元
 	Extra   string  `json:"extra"`   //"充值档位透传
 	Extra   string  `json:"extra"`   //"充值档位透传
 	Desc    string  `json:"desc"`    //充值档位描述信息(展示给用户的)
 	Desc    string  `json:"desc"`    //充值档位描述信息(展示给用户的)
-	EndTime int64   `json:"EndTime"` //该档位到期时间,值为毫秒级时间戳,当值为-1时表示不限时
+	EndTime int64   `json:"endTime"` //该档位到期时间,值为毫秒级时间戳,当值为-1时表示不限时
 }
 }
 
 
 // 东南亚支付服务使用
 // 东南亚支付服务使用

+ 1 - 0
RO_Server_Trunk-branch_0.1.39/roserver/serverproto/common.proto

@@ -63,6 +63,7 @@ enum ResType {
     Res_CreditRecharge              = 53; // 免费充值额度(充值钱包中能够获得的资源)
     Res_CreditRecharge              = 53; // 免费充值额度(充值钱包中能够获得的资源)
     Res_ROCoin                      = 54; // RO币
     Res_ROCoin                      = 54; // RO币
     Res_BoliShopExp                 = 55; // boli商城等级对应的经验
     Res_BoliShopExp                 = 55; // boli商城等级对应的经验
+    Res_Cash                        = 56; // 代金币,可购买礼包
 }
 }
 
 
 //Count表示N次操作,Num表示目标个数 [枚举:目标:条件]
 //Count表示N次操作,Num表示目标个数 [枚举:目标:条件]