Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
313927637d
@ -18,13 +18,6 @@
|
|||||||
],
|
],
|
||||||
"startid": 10001,
|
"startid": 10001,
|
||||||
"rightend": 10008,
|
"rightend": 10008,
|
||||||
"stroyprize": [
|
|
||||||
{
|
|
||||||
"a": "attr",
|
|
||||||
"t": "gold",
|
|
||||||
"n": 1000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"special_stroyprize": [
|
"special_stroyprize": [
|
||||||
{
|
{
|
||||||
"a": "attr",
|
"a": "attr",
|
||||||
@ -32,9 +25,24 @@
|
|||||||
"n": 2000
|
"n": 2000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid": [
|
||||||
"endid2": 10010,
|
10009,
|
||||||
"endid3": 10011,
|
10010,
|
||||||
|
10011
|
||||||
|
],
|
||||||
|
"stroyprize": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plot_unlock": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
"fid": [
|
"fid": [
|
||||||
102
|
102
|
||||||
]
|
]
|
||||||
@ -58,13 +66,6 @@
|
|||||||
],
|
],
|
||||||
"startid": 10001,
|
"startid": 10001,
|
||||||
"rightend": 10008,
|
"rightend": 10008,
|
||||||
"stroyprize": [
|
|
||||||
{
|
|
||||||
"a": "attr",
|
|
||||||
"t": "gold",
|
|
||||||
"n": 1000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"special_stroyprize": [
|
"special_stroyprize": [
|
||||||
{
|
{
|
||||||
"a": "attr",
|
"a": "attr",
|
||||||
@ -72,9 +73,24 @@
|
|||||||
"n": 2000
|
"n": 2000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid": [
|
||||||
"endid2": 10010,
|
10009,
|
||||||
"endid3": 10011,
|
10010,
|
||||||
|
10011
|
||||||
|
],
|
||||||
|
"stroyprize": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plot_unlock": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
"fid": [
|
"fid": [
|
||||||
101
|
101
|
||||||
]
|
]
|
||||||
@ -98,13 +114,6 @@
|
|||||||
],
|
],
|
||||||
"startid": 10001,
|
"startid": 10001,
|
||||||
"rightend": 10008,
|
"rightend": 10008,
|
||||||
"stroyprize": [
|
|
||||||
{
|
|
||||||
"a": "attr",
|
|
||||||
"t": "gold",
|
|
||||||
"n": 1000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"special_stroyprize": [
|
"special_stroyprize": [
|
||||||
{
|
{
|
||||||
"a": "attr",
|
"a": "attr",
|
||||||
@ -112,9 +121,24 @@
|
|||||||
"n": 2000
|
"n": 2000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid": [
|
||||||
"endid2": 10010,
|
10009,
|
||||||
"endid3": 10011,
|
10010,
|
||||||
|
10011
|
||||||
|
],
|
||||||
|
"stroyprize": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plot_unlock": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
"fid": [
|
"fid": [
|
||||||
101
|
101
|
||||||
]
|
]
|
||||||
@ -138,13 +162,6 @@
|
|||||||
],
|
],
|
||||||
"startid": 10001,
|
"startid": 10001,
|
||||||
"rightend": 10008,
|
"rightend": 10008,
|
||||||
"stroyprize": [
|
|
||||||
{
|
|
||||||
"a": "attr",
|
|
||||||
"t": "gold",
|
|
||||||
"n": 1000
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"special_stroyprize": [
|
"special_stroyprize": [
|
||||||
{
|
{
|
||||||
"a": "attr",
|
"a": "attr",
|
||||||
@ -152,9 +169,24 @@
|
|||||||
"n": 2000
|
"n": 2000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid": [
|
||||||
"endid2": 10010,
|
10009,
|
||||||
"endid3": 10011,
|
10010,
|
||||||
|
10011
|
||||||
|
],
|
||||||
|
"stroyprize": [
|
||||||
|
{
|
||||||
|
"a": "attr",
|
||||||
|
"t": "gold",
|
||||||
|
"n": 1000
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"plot_unlock": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
4
|
||||||
|
],
|
||||||
"fid": [
|
"fid": [
|
||||||
102
|
102
|
||||||
]
|
]
|
||||||
|
@ -120,6 +120,8 @@ const (
|
|||||||
TablePagodaRecord = "pagodarecord"
|
TablePagodaRecord = "pagodarecord"
|
||||||
///有序的爬塔排行 (真正的排行榜 最多只有50条)
|
///有序的爬塔排行 (真正的排行榜 最多只有50条)
|
||||||
TablePagodaRankList = "pagodaranklist"
|
TablePagodaRankList = "pagodaranklist"
|
||||||
|
|
||||||
|
TableSeasonRankList = "seasonranklist" // 赛季塔列表
|
||||||
/// 美食馆
|
/// 美食馆
|
||||||
TableSmithy = "smithy"
|
TableSmithy = "smithy"
|
||||||
/// 赛季塔数据表
|
/// 赛季塔数据表
|
||||||
|
@ -142,7 +142,10 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
|||||||
"sameCount": 1,
|
"sameCount": 1,
|
||||||
"isOverlying": false,
|
"isOverlying": false,
|
||||||
}
|
}
|
||||||
|
heroConf := this.module.configure.GetHeroConfig(_hero.HeroID)
|
||||||
|
if heroConf != nil && heroConf.Type == comm.CardTypeStar {
|
||||||
|
_heroMap["heroID"] = _hero.HeroID
|
||||||
|
}
|
||||||
// 保存数据
|
// 保存数据
|
||||||
err := this.module.modelHero.ChangeList(session.GetUserId(), _hero.Id, _heroMap)
|
err := this.module.modelHero.ChangeList(session.GetUserId(), _hero.Id, _heroMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -60,8 +60,20 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
|
|||||||
}
|
}
|
||||||
} else if req.Rightend != 0 { // 剧情奖励
|
} else if req.Rightend != 0 { // 剧情奖励
|
||||||
bRepeadGetReawrd := false
|
bRepeadGetReawrd := false
|
||||||
if req.Rightend == conf.Rightend || req.Rightend == conf.Endid1 ||
|
sz := conf.Endid
|
||||||
req.Rightend == conf.Endid2 || req.Rightend == conf.Endid3 {
|
for _, id := range sz {
|
||||||
|
if req.Rightend == conf.Rightend || req.Rightend == id {
|
||||||
|
if len(conf.PlotUnlock) >= len(_heroFetter.Stroyprize)+1 {
|
||||||
|
// 校验等级
|
||||||
|
lv := conf.PlotUnlock[len(_heroFetter.Stroyprize)]
|
||||||
|
if _heroFetter.Favorlv < lv {
|
||||||
|
code = pb.ErrorCode_LibraryLvReward
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
code = pb.ErrorCode_LibraryLvReward
|
||||||
|
return
|
||||||
|
}
|
||||||
for _, v := range _heroFetter.Stroyprize {
|
for _, v := range _heroFetter.Stroyprize {
|
||||||
if v == req.Rightend {
|
if v == req.Rightend {
|
||||||
bRepeadGetReawrd = true
|
bRepeadGetReawrd = true
|
||||||
@ -89,7 +101,11 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
|
|||||||
mapData["stroyprize"] = _heroFetter.Stroyprize
|
mapData["stroyprize"] = _heroFetter.Stroyprize
|
||||||
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
|
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
|
||||||
resp.Data = _heroFetter
|
resp.Data = _heroFetter
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), LibraryGetStoryRewardResp, resp)
|
session.SendMsg(string(this.module.GetType()), LibraryGetStoryRewardResp, resp)
|
||||||
return
|
return
|
||||||
|
@ -194,6 +194,7 @@ const (
|
|||||||
ErrorCode_LibraryNoData ErrorCode = 2802 // 没找到羁绊数据
|
ErrorCode_LibraryNoData ErrorCode = 2802 // 没找到羁绊数据
|
||||||
ErrorCode_LibraryActivation ErrorCode = 2803 // 已经是激活状态
|
ErrorCode_LibraryActivation ErrorCode = 2803 // 已经是激活状态
|
||||||
ErrorCode_LibraryReward ErrorCode = 2804 // 已经领取奖励
|
ErrorCode_LibraryReward ErrorCode = 2804 // 已经领取奖励
|
||||||
|
ErrorCode_LibraryLvReward ErrorCode = 2805 // 领奖等级没达到
|
||||||
)
|
)
|
||||||
|
|
||||||
// Enum value maps for ErrorCode.
|
// Enum value maps for ErrorCode.
|
||||||
@ -353,6 +354,7 @@ var (
|
|||||||
2802: "LibraryNoData",
|
2802: "LibraryNoData",
|
||||||
2803: "LibraryActivation",
|
2803: "LibraryActivation",
|
||||||
2804: "LibraryReward",
|
2804: "LibraryReward",
|
||||||
|
2805: "LibraryLvReward",
|
||||||
}
|
}
|
||||||
ErrorCode_value = map[string]int32{
|
ErrorCode_value = map[string]int32{
|
||||||
"Success": 0,
|
"Success": 0,
|
||||||
@ -509,6 +511,7 @@ var (
|
|||||||
"LibraryNoData": 2802,
|
"LibraryNoData": 2802,
|
||||||
"LibraryActivation": 2803,
|
"LibraryActivation": 2803,
|
||||||
"LibraryReward": 2804,
|
"LibraryReward": 2804,
|
||||||
|
"LibraryLvReward": 2805,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -543,7 +546,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_errorcode_proto_rawDesc = []byte{
|
var file_errorcode_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x2a, 0xe3, 0x1a, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
0x6f, 0x2a, 0xf9, 0x1a, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
|
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
|
||||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
||||||
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
@ -757,8 +760,9 @@ var file_errorcode_proto_rawDesc = []byte{
|
|||||||
0x72, 0x79, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf2, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x4c,
|
0x72, 0x79, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x10, 0xf2, 0x15, 0x12, 0x16, 0x0a, 0x11, 0x4c,
|
||||||
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x10, 0xf3, 0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65,
|
0x10, 0xf3, 0x15, 0x12, 0x12, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65,
|
||||||
0x77, 0x61, 0x72, 0x64, 0x10, 0xf4, 0x15, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
0x77, 0x61, 0x72, 0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61,
|
||||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x79, 0x4c, 0x76, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xf5, 0x15, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -18,11 +18,10 @@ type GameLibraryHeroData struct {
|
|||||||
Favorlv []int32
|
Favorlv []int32
|
||||||
Startid int32
|
Startid int32
|
||||||
Rightend int32
|
Rightend int32
|
||||||
Stroyprize []*Gameatn
|
|
||||||
SpecialStroyprize []*Gameatn
|
SpecialStroyprize []*Gameatn
|
||||||
Endid1 int32
|
Endid []int32
|
||||||
Endid2 int32
|
Stroyprize []*Gameatn
|
||||||
Endid3 int32
|
PlotUnlock []int32
|
||||||
Fid []int32
|
Fid []int32
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +65,34 @@ func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err erro
|
|||||||
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["startid"].(float64); !_ok_ { err = errors.New("startid error"); return }; _v.Startid = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["startid"].(float64); !_ok_ { err = errors.New("startid error"); return }; _v.Startid = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rightend"].(float64); !_ok_ { err = errors.New("rightend error"); return }; _v.Rightend = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rightend"].(float64); !_ok_ { err = errors.New("rightend error"); return }; _v.Rightend = int32(_tempNum_) }
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["special_stroyprize"].([]interface{}); !_ok_ { err = errors.New("special_stroyprize error"); return }
|
||||||
|
|
||||||
|
_v.SpecialStroyprize = 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.SpecialStroyprize = append(_v.SpecialStroyprize, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["endid"].([]interface{}); !_ok_ { err = errors.New("endid error"); return }
|
||||||
|
|
||||||
|
_v.Endid = 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.Endid = append(_v.Endid, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
var _arr_ []interface{}
|
var _arr_ []interface{}
|
||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
@ -83,20 +110,17 @@ func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err erro
|
|||||||
{
|
{
|
||||||
var _arr_ []interface{}
|
var _arr_ []interface{}
|
||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
if _arr_, _ok_ = _buf["special_stroyprize"].([]interface{}); !_ok_ { err = errors.New("special_stroyprize error"); return }
|
if _arr_, _ok_ = _buf["plot_unlock"].([]interface{}); !_ok_ { err = errors.New("plot_unlock error"); return }
|
||||||
|
|
||||||
_v.SpecialStroyprize = make([]*Gameatn, 0, len(_arr_))
|
_v.PlotUnlock = make([]int32, 0, len(_arr_))
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
for _, _e_ := range _arr_ {
|
||||||
var _list_v_ *Gameatn
|
var _list_v_ int32
|
||||||
{ 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 } }
|
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||||
_v.SpecialStroyprize = append(_v.SpecialStroyprize, _list_v_)
|
_v.PlotUnlock = append(_v.PlotUnlock, _list_v_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endid1"].(float64); !_ok_ { err = errors.New("endid1 error"); return }; _v.Endid1 = int32(_tempNum_) }
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endid2"].(float64); !_ok_ { err = errors.New("endid2 error"); return }; _v.Endid2 = int32(_tempNum_) }
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endid3"].(float64); !_ok_ { err = errors.New("endid3 error"); return }; _v.Endid3 = int32(_tempNum_) }
|
|
||||||
{
|
{
|
||||||
var _arr_ []interface{}
|
var _arr_ []interface{}
|
||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
|
Loading…
Reference in New Issue
Block a user