|
|
@@ -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:
|
|
|
//只能使用一个
|