lt 1 год назад
Родитель
Сommit
20567c97e9

+ 12 - 0
RO_Server_Trunk-branch_0.1.39/roserver/game/model/role_bag.go

@@ -883,6 +883,7 @@ func (this *RoleBag) autoUseItem(itemCfgId int32, count uint32, notify bool, ite
 				addItemList[int32(itemId)] += int32(cnt)
 			}
 		case serverproto.ResType_Res_QuickBattle:
+			//util.InfoF("oioioio3:%v len:%v", cfgData, len(cfgData.ComposeItem))
 			for _, data := range cfgData.ComposeItem {
 				itemList := strings.Split(data, ":")
 				if len(itemList) < 2 {
@@ -895,6 +896,7 @@ func (this *RoleBag) autoUseItem(itemCfgId int32, count uint32, notify bool, ite
 				if !ok {
 					continue
 				}
+				//util.InfoF("oioioio1:%v", itemId)
 				if itemId == int(serverproto.ResType_Res_RoleBaseExp) {
 					itemNum = levelCfg.BaseExpOl
 				} else if itemId == int(serverproto.ResType_Res_HeroBaseExp) {
@@ -903,6 +905,9 @@ func (this *RoleBag) autoUseItem(itemCfgId int32, count uint32, notify bool, ite
 					itemNum = levelCfg.ZenyOl
 				} else if itemId == int(serverproto.ResType_Res_Cruise) {
 					itemNum = levelCfg.CruiseOl
+				} else if itemId == 600 || itemId == int(serverproto.ResType_Res_ROCoin) {
+					//util.InfoF("oioioio2:%v", itemId)
+					itemNum = 1
 				} else {
 					continue
 				}
@@ -912,7 +917,14 @@ func (this *RoleBag) autoUseItem(itemCfgId int32, count uint32, notify bool, ite
 					util.ErrorF("uid=%v useItem limit configid=%v count=%v", this.role.GetUUid(), itemCfgId, count)
 					return serverproto.ErrorCode_ERROR_SERVER_USE_FAILED_LIMIT
 				}
+				if itemId == 600 {
+					tmpAddNum = 1
+				}
+				if itemId == int(serverproto.ResType_Res_ROCoin) {
+					tmpAddNum = 60
+				}
 				addItemList[int32(itemId)] += int32(tmpAddNum)
+				//util.InfoF("oioioio:%v", addItemList)
 			}
 		case serverproto.ResType_Res_Gift_Unique:
 			//只能使用一个

+ 7 - 0
RO_Server_Trunk-branch_0.1.39/roserver/serverproto/config_csv.go

@@ -1,5 +1,9 @@
 package serverproto
 
+import (
+	"rocommon/util"
+)
+
 const (
 	CFG_ActiveCodeCfg                    = "ActiveCodeCfg.csv"
 	CFG_ActivitiesBtChargeTaskGoldCfg    = "ActivitiesBtChargeTaskGoldCfg.csv"
@@ -2023,6 +2027,9 @@ func ItemCfgLoad(path string) {
 	ItemCfgLoader = map[int32]*ItemCfg{}
 	loadCsvCfg(path+"ItemCfg.csv", &cfg)
 	for _, row := range cfg {
+		if row.Id == 8 {
+			util.InfoF("awawawawawa,%v,%v", row.ComposeItem, len(row.ComposeItem))
+		}
 		ItemCfgLoader[row.Id] = row
 	}
 }