This commit is contained in:
wh_zcy 2023-07-04 17:57:29 +08:00
commit c5c35059d2
12 changed files with 336 additions and 309 deletions

View File

@ -33,15 +33,14 @@
"citytype": 1,
"citytypenum": 2,
"special": [
"1",
"2",
"4",
"6"
"21000001",
"21000002",
"21000003",
"21000004"
],
"specialnum": 500,
"exspecial": [
"21000002",
"21000001"
"21000009"
],
"exspecialnum": 1500,
"Orspecial": 1000,
@ -89,15 +88,14 @@
"citytype": 1,
"citytypenum": 3,
"special": [
"3",
"4",
"5",
"6"
"21000001",
"21000002",
"21000003",
"21000007"
],
"specialnum": 500,
"exspecial": [
"1",
"2"
"21000004"
],
"exspecialnum": 1600,
"Orspecial": 1000,
@ -146,15 +144,14 @@
"citytype": 1,
"citytypenum": 4,
"special": [
"2",
"3",
"4",
"6"
"21000001",
"21000002",
"21000003",
"21000004"
],
"specialnum": 500,
"exspecial": [
"1",
"5"
"21000005"
],
"exspecialnum": 1700,
"Orspecial": 1000,
@ -203,15 +200,14 @@
"citytype": 1,
"citytypenum": 3,
"special": [
"1",
"2",
"4",
"5"
"21000001",
"21000002",
"21000003",
"21000004"
],
"specialnum": 500,
"exspecial": [
"3",
"6"
"21000006"
],
"exspecialnum": 1800,
"Orspecial": 1000,
@ -259,15 +255,14 @@
"citytype": 1,
"citytypenum": 4,
"special": [
"1",
"3",
"4",
"6"
"21000001",
"21000002",
"21000003",
"21000009"
],
"specialnum": 500,
"exspecial": [
"2",
"5"
"21000007"
],
"exspecialnum": 1900,
"Orspecial": 1000,

View File

@ -25,7 +25,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000002",
@ -53,7 +54,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000003",
@ -81,7 +83,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000004",
@ -109,7 +112,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000005",
@ -137,7 +141,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000006",
@ -165,7 +170,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000007",
@ -193,7 +199,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000008",
@ -221,7 +228,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000009",
@ -249,7 +257,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000010",
@ -277,7 +286,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000011",
@ -305,7 +315,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000012",
@ -333,7 +344,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000013",
@ -361,7 +373,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000014",
@ -389,7 +402,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000015",
@ -417,7 +431,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000016",
@ -445,7 +460,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000017",
@ -473,7 +489,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000018",
@ -501,7 +518,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000019",
@ -529,7 +547,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000020",
@ -557,7 +576,8 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
},
{
"itemid": "21000021",
@ -585,6 +605,7 @@
],
"FluctuationRange": 500,
"pricemin": 200,
"pricemax": 3000
"pricemax": 3000,
"goodsnum": 80
}
]

View File

@ -1472,7 +1472,7 @@
"type": 1,
"ip": 6,
"sd": 1,
"handbook": 1,
"handbook": -1,
"prefab": "24001",
"rotation": "0|0|0",
"revolve": 0,

View File

@ -12685,7 +12685,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_mcs",
"intr": {
"key": "item_item_intr_356",
@ -12701,7 +12701,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12716,7 +12716,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "wp_icon_jjcq",
"intr": {
"key": "item_item_intr_357",
@ -12732,7 +12732,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12747,7 +12747,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_358",
@ -12763,7 +12763,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12778,7 +12778,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_359",
@ -12794,7 +12794,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12809,7 +12809,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_360",
@ -12825,7 +12825,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12840,7 +12840,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_361",
@ -12856,7 +12856,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12871,7 +12871,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_362",
@ -12887,7 +12887,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12902,7 +12902,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_363",
@ -12918,7 +12918,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12933,7 +12933,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_364",
@ -12949,7 +12949,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12964,7 +12964,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_365",
@ -12980,7 +12980,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -12995,7 +12995,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_366",
@ -13011,7 +13011,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13026,7 +13026,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_367",
@ -13042,7 +13042,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13057,7 +13057,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_368",
@ -13073,7 +13073,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13088,7 +13088,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_369",
@ -13104,7 +13104,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13119,7 +13119,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_370",
@ -13135,7 +13135,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13150,7 +13150,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_371",
@ -13166,7 +13166,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13181,7 +13181,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_372",
@ -13197,7 +13197,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13212,7 +13212,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_373",
@ -13228,7 +13228,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13243,7 +13243,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_374",
@ -13259,7 +13259,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13274,7 +13274,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_375",
@ -13290,7 +13290,7 @@
},
"usetype": 2,
"color": 4,
"bagtype": 1,
"bagtype": 0,
"index": 1,
"special_type": 0,
"time": 0,
@ -13305,7 +13305,7 @@
"decompose_get": [],
"access": [],
"use_skip": 11001,
"upper_limit": 80,
"upper_limit": 999,
"img": "icon_st03",
"intr": {
"key": "item_item_intr_376",

File diff suppressed because it is too large Load Diff

View File

@ -178,10 +178,9 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
caravan.Items[k].Price = totla / caravan.Items[k].Count
// 同步更新该城市的 出售货物信息
cityInfo.Count[k] += v
itemConf, err := this.module.configure.GetItemConfigureData(k)
if err == nil {
//if itemConf, err := this.configure.GetCaravanGoods(k); err == nil { // 更新商店库存
if cityInfo.Count[k] > itemConf.UpperLimit {
if itemConf, err := this.configure.GetCaravanGoods(k); err == nil { // 更新商店库存
if cityInfo.Count[k] > itemConf.Goodsnum {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_TrollBuyMax, // 商品数量不足
Title: pb.ErrorCode_TrollBuyMax.ToString(),

View File

@ -469,7 +469,7 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
maxLv = this.module.configure.GetHeroMaxLv(hero.Star)
// 校验玩家等级
if _user := this.module.ModuleUser.GetUser(session.GetUserId()); _user != nil {
if expConf := this.module.configure.GetPlayerlvConf(_user.Lv); expConf == nil {
if expConf := this.module.configure.GetPlayerlvConf(_user.Lv); expConf != nil {
if maxLv > expConf.HeroLv {
maxLv = expConf.HeroLv // 英雄最大等级限制
}

View File

@ -6,7 +6,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
)
//参数校验
// 参数校验
func (this *apiComp) DailyBuyCheck(session comm.IUserSession, req *pb.PayDailyBuyReq) (errdata *pb.ErrorData) {
if req.Id == 0 {
errdata = &pb.ErrorData{
@ -18,7 +18,7 @@ func (this *apiComp) DailyBuyCheck(session comm.IUserSession, req *pb.PayDailyBu
return
}
///获取系统公告
// /获取系统公告
func (this *apiComp) DailyBuy(session comm.IUserSession, req *pb.PayDailyBuyReq) (errdata *pb.ErrorData) {
var (
info *pb.DBPayDaily
@ -46,7 +46,7 @@ func (this *apiComp) DailyBuy(session comm.IUserSession, req *pb.PayDailyBuyReq)
return
}
if info.Items[conf.Id] != nil {
if info.Items[conf.Id].Buyunm <= 0 {
if conf.BuyNum >= 0 && info.Items[conf.Id].Buyunm >= conf.BuyNum {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PayBuyNumNotEnough,
Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(),

View File

@ -8,18 +8,18 @@ import (
"time"
)
//参数校验
// 参数校验
func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.PayInfoReq) (errdata *pb.ErrorData) {
return
}
///获取系统公告
// /获取系统公告
func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdata *pb.ErrorData) {
var (
info *pb.DBPayDaily
goods []*cfg.GamePayPackageData
conf *cfg.GamePayPackageData
// conf *cfg.GamePayPackageData
err error
)
if errdata = this.InfoCheck(session, req); errdata != nil {
@ -53,7 +53,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdat
for _, v := range info.Items {
if configure.Now().Sub(time.Unix(v.Lastrefresh, 0)).Hours() > 24 {
if conf, err = this.module.configure.getPayPackageData(v.Id); err != nil {
if _, err = this.module.configure.getPayPackageData(v.Id); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
@ -61,7 +61,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdat
}
return
}
v.Buyunm = conf.BuyNum
v.Buyunm = 0
v.Lastrefresh = configure.Now().Unix()
}
}

View File

@ -19,7 +19,7 @@ const (
game_playerinfor_overview = "game_playerinfor_overview.json" //皮肤配置表
)
///配置管理基础组件
// /配置管理基础组件
type configureComp struct {
modules.MCompConfigure
module *User
@ -29,7 +29,7 @@ type configureComp struct {
_pInforoverview map[string]*cfg.GamePlayerInfor_overviewData
}
//组件初始化接口
// 组件初始化接口
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*User)
@ -184,13 +184,11 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
key string
ok bool
)
sex += 1
key = fmt.Sprintf("%s%d", id, sex)
if configure, ok = this._pInforoverview[key]; !ok {
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
this.module.Errorf("err:%v", err)
return
}
return
}

View File

@ -453,14 +453,26 @@ func (this *Worldtask) AcceptCaravanTask(session comm.IUserSession, groupId int3
mytask.CurrentTasks = make(map[int32]*pb.Worldtasks)
}
if v, ok1 := mytask.CurrentTasks[curTaskConf.Group]; ok1 {
v.TaskMap[task.TaskId] = &pb.Worldtask{
if _, ok1 := mytask.CurrentTasks[curTaskConf.Group]; !ok1 {
mytask.CurrentTasks[curTaskConf.Group] = &pb.Worldtasks{
TaskMap: make(map[int32]*pb.Worldtask),
}
}
mytask.CurrentTasks[curTaskConf.Group].TaskMap[task.TaskId] = &pb.Worldtask{
TaskId: task.TaskId,
TaskType: curTaskConf.Des,
NpcStatus: 1,
}
if err = this.ModuleBuried.ActiveCondition(uid, curTaskConf.Completetask...); err != nil {
log.Errorf("调用接口错误:%s", err.Error())
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ExternalModule,
Title: pb.ErrorCode_ExternalModule.String(),
Message: fmt.Sprintf("ModuleBuried.ActiveCondition err:%s", err.Error()),
}
return
}
if task.Conds, err = this.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...); err != nil {
log.Errorf("调用接口错误:%s", err.Error())
errdata = &pb.ErrorData{

View File

@ -21,6 +21,7 @@ type GameCaravanThingData struct {
FluctuationRange int32
Pricemin int32
Pricemax int32
Goodsnum int32
}
const TypeId_GameCaravanThingData = 638455774
@ -105,6 +106,7 @@ func (_v *GameCaravanThingData)Deserialize(_buf map[string]interface{}) (err err
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["FluctuationRange"].(float64); !_ok_ { err = errors.New("FluctuationRange error"); return }; _v.FluctuationRange = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pricemin"].(float64); !_ok_ { err = errors.New("pricemin error"); return }; _v.Pricemin = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pricemax"].(float64); !_ok_ { err = errors.New("pricemax error"); return }; _v.Pricemax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["goodsnum"].(float64); !_ok_ { err = errors.New("goodsnum error"); return }; _v.Goodsnum = int32(_tempNum_) }
return
}