Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2023-02-17 11:58:48 +08:00
commit 817ecef637
7 changed files with 2004 additions and 587 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
"customer_id": 1,
"customer_type": 1,
"customer_speak": {
"key": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。",
"text": ""
"key": "1",
"text": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。"
},
"goods": [],
"reword": [],
@ -14,8 +14,8 @@
"customer_id": 2,
"customer_type": 2,
"customer_speak": {
"key": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。",
"text": ""
"key": "2",
"text": "我需要{0}件【{1}】,如果你暂时没有备货的话我可以在这等一段时间,但不会太久。"
},
"goods": [],
"reword": [],
@ -25,7 +25,7 @@
"customer_id": 3,
"customer_type": 3,
"customer_speak": {
"key": "",
"key": "3",
"text": ""
},
"goods": [],
@ -36,8 +36,8 @@
"customer_id": 4,
"customer_type": 4,
"customer_speak": {
"key": "我有个宝贝,你要是喜欢的话便宜你点卖你。",
"text": ""
"key": "4",
"text": "我有个宝贝,你要是喜欢的话便宜你点卖你。"
},
"goods": [],
"reword": [],

View File

@ -2,27 +2,27 @@
{
"id": 1,
"proficiency": 20,
"reelId": 1,
"proficiency_lv": 1,
"reelId": 1,
"title_text": {
"key": "1",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "1",
"text": "炉温消耗-{0}%"
"text": "炉温消耗-{0}"
},
"type": 1,
"value1": 100,
"value1": 5,
"value2": 0
},
{
"id": 2,
"proficiency": 40,
"reelId": 1,
"proficiency_lv": 2,
"reelId": 1,
"title_text": {
"key": "1",
"key": "2",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
@ -31,15 +31,15 @@
},
"type": 2,
"value1": 10001,
"value2": -275
"value2": -125
},
{
"id": 3,
"proficiency": 60,
"reelId": 1,
"proficiency_lv": 3,
"reelId": 1,
"title_text": {
"key": "1",
"key": "3",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
@ -53,324 +53,120 @@
{
"id": 4,
"proficiency": 80,
"reelId": 1,
"proficiency_lv": 4,
"reelId": 1,
"title_text": {
"key": "1",
"key": "4",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "4",
"text": "解锁套装"
"text": "炉温消耗-{0}℃"
},
"type": 4,
"type": 1,
"value1": 5,
"value2": 0
},
{
"id": 5,
"proficiency": 100,
"reelId": 1,
"proficiency_lv": 5,
"reelId": 1,
"title_text": {
"key": "1",
"key": "5",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "5",
"text": "{0}级装备售价提高{1}%"
"text": "{0}%概率制造两件装备"
},
"type": 5,
"value1": 1,
"value2": 10
"value1": 5,
"value2": 0
},
{
"id": 6,
"proficiency": 120,
"reelId": 0,
"proficiency_lv": 0,
"proficiency": 25,
"proficiency_lv": 1,
"reelId": 2,
"title_text": {
"key": "",
"text": ""
"key": "6",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "",
"text": ""
"key": "6",
"text": "炉温消耗-{0}℃"
},
"type": 1,
"value1": 0,
"value1": 5,
"value2": 0
},
{
"id": 7,
"proficiency": 140,
"reelId": 0,
"proficiency_lv": 0,
"proficiency": 50,
"proficiency_lv": 2,
"reelId": 2,
"title_text": {
"key": "",
"text": ""
"key": "7",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "",
"text": ""
"key": "7",
"text": "材料消耗减少"
},
"type": 0,
"value1": 0,
"value2": 0
"type": 2,
"value1": 10001,
"value2": -125
},
{
"id": 8,
"proficiency": 160,
"reelId": 0,
"proficiency_lv": 0,
"proficiency": 75,
"proficiency_lv": 3,
"reelId": 2,
"title_text": {
"key": "",
"text": ""
"key": "8",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "",
"text": ""
"key": "8",
"text": "解锁图纸【紫金雷神锤】"
},
"type": 0,
"value1": 0,
"type": 3,
"value1": 2,
"value2": 0
},
{
"id": 9,
"proficiency": 180,
"reelId": 0,
"proficiency_lv": 0,
"proficiency": 100,
"proficiency_lv": 4,
"reelId": 2,
"title_text": {
"key": "",
"text": ""
"key": "9",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "",
"text": ""
"key": "9",
"text": "解锁套装"
},
"type": 0,
"type": 4,
"value1": 0,
"value2": 0
},
{
"id": 10,
"proficiency": 200,
"reelId": 0,
"proficiency_lv": 0,
"proficiency": 125,
"proficiency_lv": 5,
"reelId": 2,
"title_text": {
"key": "",
"text": ""
"key": "10",
"text": "lv.{0}:熟练度{1}"
},
"content_text": {
"key": "",
"text": ""
"key": "10",
"text": "{0}%概率制造两件装备"
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 11,
"proficiency": 220,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 12,
"proficiency": 240,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 13,
"proficiency": 260,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 14,
"proficiency": 280,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 15,
"proficiency": 300,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 16,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 17,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 18,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 19,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 20,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 21,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"value2": 0
},
{
"id": 22,
"proficiency": 0,
"reelId": 0,
"proficiency_lv": 0,
"title_text": {
"key": "",
"text": ""
},
"content_text": {
"key": "",
"text": ""
},
"type": 0,
"value1": 0,
"type": 5,
"value1": 5,
"value2": 0
}
]

View File

@ -323,7 +323,7 @@
"id": 11,
"skill_type": 2,
"skill_lv": 1,
"preconditions": 5,
"preconditions": 15,
"up_material": [],
"name_text": {
"key": "",

View File

@ -57,9 +57,9 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
stove.Data[req.ReelId].Value += 1
// 是否是精益打造
if req.Quality > 0 {
costRes = append(costRes, reelcfg.Quality)
costRes = append(costRes, reelcfg.RefineCos)
}
costRes = append(costRes, reelcfg.Consume...)
costRes = append(costRes, reelcfg.BasicCos...)
subAtn := this.module.modelStove.CheckForgeConsume(req.ReelId, stove.Data[req.ReelId].Lv)
costRes = append(costRes, subAtn...)
if code = this.module.CheckRes(session, costRes); code != pb.ErrorCode_Success {
@ -68,7 +68,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
// 熟练度减少的温度
t := this.module.modelStove.CheckTemperature(req.ReelId, stove.Data[req.ReelId].Lv)
// 检查炉温 是否够
if stove.Temperature < reelcfg.Temperature-t {
if stove.Temperature < reelcfg.TemperatureCos-t {
code = pb.ErrorCode_SmithyNoTemperature // 炉温不够 直接返回
return
}
@ -89,7 +89,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq
if code = this.module.ConsumeRes(session, costRes, true); code != pb.ErrorCode_Success {
return
}
stove.Temperature -= (reelcfg.Temperature - t) // 消耗温度
stove.Temperature -= (reelcfg.TemperatureCos - t) // 消耗温度
stove.RecoveTime = configure.Now().Unix()
update["data"] = stove.Data
update["recoveTime"] = stove.RecoveTime

View File

@ -14,9 +14,16 @@ type GameNewSmithyData struct {
Id int32
ItemId int32
Type int32
Consume []*Gameatn
Temperature int32
Quality *Gameatn
DrawingName string
QualityText string
BasicDrop int32
BasicCos []*Gameatn
TemperatureCos int32
RefineCos *Gameatn
CustomizedCos1 *Gameatn
CustomizedCos2 *Gameatn
CustomizedLv []int32
CustomizedLvDistribution []int32
}
const TypeId_GameNewSmithyData = -1249020316
@ -29,22 +36,55 @@ func (_v *GameNewSmithyData)Deserialize(_buf map[string]interface{}) (err error)
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["item_id"].(float64); !_ok_ { err = errors.New("item_id error"); return }; _v.ItemId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["drawing_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.DrawingName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.DrawingName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["quality_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.QualityText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.QualityText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["basic_drop"].(float64); !_ok_ { err = errors.New("basic_drop error"); return }; _v.BasicDrop = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["consume"].([]interface{}); !_ok_ { err = errors.New("consume error"); return }
if _arr_, _ok_ = _buf["basic_cos"].([]interface{}); !_ok_ { err = errors.New("basic_cos error"); return }
_v.Consume = make([]*Gameatn, 0, len(_arr_))
_v.BasicCos = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
_v.Consume = append(_v.Consume, _list_v_)
_v.BasicCos = append(_v.BasicCos, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["temperature_cos"].(float64); !_ok_ { err = errors.New("temperature_cos error"); return }; _v.TemperatureCos = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["refine_cos"].(map[string]interface{}); !_ok_ { err = errors.New("refine_cos error"); return }; if _v.RefineCos, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["customized_cos1"].(map[string]interface{}); !_ok_ { err = errors.New("customized_cos1 error"); return }; if _v.CustomizedCos1, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["customized_cos2"].(map[string]interface{}); !_ok_ { err = errors.New("customized_cos2 error"); return }; if _v.CustomizedCos2, err = DeserializeGameatn(_x_); err != nil { return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["customized_lv"].([]interface{}); !_ok_ { err = errors.New("customized_lv error"); return }
_v.CustomizedLv = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.CustomizedLv = append(_v.CustomizedLv, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["customized_lv_distribution"].([]interface{}); !_ok_ { err = errors.New("customized_lv_distribution error"); return }
_v.CustomizedLvDistribution = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.CustomizedLvDistribution = append(_v.CustomizedLvDistribution, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["temperature"].(float64); !_ok_ { err = errors.New("temperature error"); return }; _v.Temperature = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["quality"].(map[string]interface{}); !_ok_ { err = errors.New("quality error"); return }; if _v.Quality, err = DeserializeGameatn(_x_); err != nil { return } }
return
}

View File

@ -13,8 +13,8 @@ import "errors"
type GameSmithyProficiencyData struct {
Id int32
Proficiency int32
ReelId int32
ProficiencyLv int32
ReelId int32
TitleText string
ContentText string
Type int32
@ -31,8 +31,8 @@ func (*GameSmithyProficiencyData) GetTypeId() int32 {
func (_v *GameSmithyProficiencyData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["proficiency"].(float64); !_ok_ { err = errors.New("proficiency error"); return }; _v.Proficiency = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["reelId"].(float64); !_ok_ { err = errors.New("reelId error"); return }; _v.ReelId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["proficiency_lv"].(float64); !_ok_ { err = errors.New("proficiency_lv error"); return }; _v.ProficiencyLv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["reelId"].(float64); !_ok_ { err = errors.New("reelId error"); return }; _v.ReelId = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TitleText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TitleText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["content_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.ContentText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.ContentText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }