配置更新
This commit is contained in:
parent
78c8ba45bf
commit
87cb5dadb9
@ -10,11 +10,13 @@ import (
|
|||||||
const (
|
const (
|
||||||
DECORATE_COST = "DecorateCost"
|
DECORATE_COST = "DecorateCost"
|
||||||
INDOOR_PROGRESS = "IndoorProgress"
|
INDOOR_PROGRESS = "IndoorProgress"
|
||||||
|
DECORATE_CONST = "DecorateConst"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
gamedata.InitCfg("DecorateCost")
|
gamedata.InitCfg(DECORATE_COST)
|
||||||
gamedata.InitCfg("IndoorProgress")
|
gamedata.InitCfg(INDOOR_PROGRESS)
|
||||||
|
gamedata.InitCfg(DECORATE_CONST)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetStarCost(AreaId, SortId int) int {
|
func GetStarCost(AreaId, SortId int) int {
|
||||||
@ -93,3 +95,13 @@ func GetProgressReward(Scene, Lv int) []*item.Item {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取一键装饰的解锁等级
|
||||||
|
func GetOneKeyDecorateUnlockLv() int {
|
||||||
|
data, err := gamedata.GetDataByKey(DECORATE_CONST, "OneKey")
|
||||||
|
if err != nil {
|
||||||
|
log.Debug("GetOneKeyDecorateUnlockLv err:%v", err)
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return gamedata.GetIntValue(data, "Value")
|
||||||
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"server/GoUtil"
|
"server/GoUtil"
|
||||||
cardCfg "server/conf/card"
|
cardCfg "server/conf/card"
|
||||||
|
decorateCfg "server/conf/decorate"
|
||||||
mergeDataCfg "server/conf/mergeData"
|
mergeDataCfg "server/conf/mergeData"
|
||||||
miningCfg "server/conf/mining"
|
miningCfg "server/conf/mining"
|
||||||
playroomCfg "server/conf/playroom"
|
playroomCfg "server/conf/playroom"
|
||||||
@ -419,7 +420,14 @@ func ReqDecorateAll(args []interface{}) error {
|
|||||||
req := &msg.ReqDecorateAll{}
|
req := &msg.ReqDecorateAll{}
|
||||||
proto.Unmarshal(buf, req)
|
proto.Unmarshal(buf, req)
|
||||||
DecorateMod := player.PlayMod.getDecorateMod()
|
DecorateMod := player.PlayMod.getDecorateMod()
|
||||||
|
UnLockLv := decorateCfg.GetOneKeyDecorateUnlockLv()
|
||||||
|
if player.GetPlayerBaseMod().GetLevel() < UnLockLv {
|
||||||
|
player.SendErrClienRes(&msg.ResDecorateAll{
|
||||||
|
Code: msg.RES_CODE_FAIL,
|
||||||
|
Msg: fmt.Sprintf("等级不足%d级", UnLockLv),
|
||||||
|
})
|
||||||
|
return errors.New("等级不足")
|
||||||
|
}
|
||||||
PlayerBaseMod := player.GetPlayerBaseMod()
|
PlayerBaseMod := player.GetPlayerBaseMod()
|
||||||
CostItem, AddItem, DecorateNum, DecorateList := DecorateMod.DecorateAll(PlayerBaseMod.GetStar())
|
CostItem, AddItem, DecorateNum, DecorateList := DecorateMod.DecorateAll(PlayerBaseMod.GetStar())
|
||||||
err := player.HandleItem(CostItem, msg.ITEM_POP_LABEL_DecorateCost.String()) // 扣除道具
|
err := player.HandleItem(CostItem, msg.ITEM_POP_LABEL_DecorateCost.String()) // 扣除道具
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user