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,
|
||||
"rightend": 10008,
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"special_stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -32,9 +25,24 @@
|
||||
"n": 2000
|
||||
}
|
||||
],
|
||||
"endid1": 10009,
|
||||
"endid2": 10010,
|
||||
"endid3": 10011,
|
||||
"endid": [
|
||||
10009,
|
||||
10010,
|
||||
10011
|
||||
],
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"plot_unlock": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"fid": [
|
||||
102
|
||||
]
|
||||
@ -58,13 +66,6 @@
|
||||
],
|
||||
"startid": 10001,
|
||||
"rightend": 10008,
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"special_stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -72,9 +73,24 @@
|
||||
"n": 2000
|
||||
}
|
||||
],
|
||||
"endid1": 10009,
|
||||
"endid2": 10010,
|
||||
"endid3": 10011,
|
||||
"endid": [
|
||||
10009,
|
||||
10010,
|
||||
10011
|
||||
],
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"plot_unlock": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"fid": [
|
||||
101
|
||||
]
|
||||
@ -98,13 +114,6 @@
|
||||
],
|
||||
"startid": 10001,
|
||||
"rightend": 10008,
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"special_stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -112,9 +121,24 @@
|
||||
"n": 2000
|
||||
}
|
||||
],
|
||||
"endid1": 10009,
|
||||
"endid2": 10010,
|
||||
"endid3": 10011,
|
||||
"endid": [
|
||||
10009,
|
||||
10010,
|
||||
10011
|
||||
],
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"plot_unlock": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"fid": [
|
||||
101
|
||||
]
|
||||
@ -138,13 +162,6 @@
|
||||
],
|
||||
"startid": 10001,
|
||||
"rightend": 10008,
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"special_stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
@ -152,9 +169,24 @@
|
||||
"n": 2000
|
||||
}
|
||||
],
|
||||
"endid1": 10009,
|
||||
"endid2": 10010,
|
||||
"endid3": 10011,
|
||||
"endid": [
|
||||
10009,
|
||||
10010,
|
||||
10011
|
||||
],
|
||||
"stroyprize": [
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 1000
|
||||
}
|
||||
],
|
||||
"plot_unlock": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4
|
||||
],
|
||||
"fid": [
|
||||
102
|
||||
]
|
||||
|
@ -120,6 +120,8 @@ const (
|
||||
TablePagodaRecord = "pagodarecord"
|
||||
///有序的爬塔排行 (真正的排行榜 最多只有50条)
|
||||
TablePagodaRankList = "pagodaranklist"
|
||||
|
||||
TableSeasonRankList = "seasonranklist" // 赛季塔列表
|
||||
/// 美食馆
|
||||
TableSmithy = "smithy"
|
||||
/// 赛季塔数据表
|
||||
|
@ -142,7 +142,10 @@ func (this *apiComp) StrengthenUpStar(session comm.IUserSession, req *pb.HeroStr
|
||||
"sameCount": 1,
|
||||
"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)
|
||||
if err != nil {
|
||||
|
@ -60,36 +60,52 @@ func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGe
|
||||
}
|
||||
} else if req.Rightend != 0 { // 剧情奖励
|
||||
bRepeadGetReawrd := false
|
||||
if req.Rightend == conf.Rightend || req.Rightend == conf.Endid1 ||
|
||||
req.Rightend == conf.Endid2 || req.Rightend == conf.Endid3 {
|
||||
for _, v := range _heroFetter.Stroyprize {
|
||||
if v == req.Rightend {
|
||||
bRepeadGetReawrd = true
|
||||
break
|
||||
sz := conf.Endid
|
||||
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
|
||||
}
|
||||
}
|
||||
if bRepeadGetReawrd { // 重复领奖
|
||||
code = pb.ErrorCode_LibraryReward
|
||||
return
|
||||
}
|
||||
var res []*cfg.Gameatn //
|
||||
if req.Rightend == conf.Rightend {
|
||||
res = conf.Stroyprize
|
||||
} else {
|
||||
res = conf.SpecialStroyprize
|
||||
for _, v := range _heroFetter.Stroyprize {
|
||||
if v == req.Rightend {
|
||||
bRepeadGetReawrd = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if bRepeadGetReawrd { // 重复领奖
|
||||
code = pb.ErrorCode_LibraryReward
|
||||
return
|
||||
}
|
||||
var res []*cfg.Gameatn //
|
||||
if req.Rightend == conf.Rightend {
|
||||
res = conf.Stroyprize
|
||||
} else {
|
||||
res = conf.SpecialStroyprize
|
||||
}
|
||||
|
||||
_heroFetter.Stroyprize = append(_heroFetter.Stroyprize, req.Rightend)
|
||||
// 发奖
|
||||
code = this.module.DispenseRes(session, res, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
this.module.Errorf("GetStoryReward err:add item : %v", res)
|
||||
}
|
||||
mapData := make(map[string]interface{}, 0)
|
||||
mapData["stroyprize"] = _heroFetter.Stroyprize
|
||||
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
|
||||
resp.Data = _heroFetter
|
||||
break
|
||||
}
|
||||
|
||||
_heroFetter.Stroyprize = append(_heroFetter.Stroyprize, req.Rightend)
|
||||
// 发奖
|
||||
code = this.module.DispenseRes(session, res, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
this.module.Errorf("GetStoryReward err:add item : %v", res)
|
||||
}
|
||||
mapData := make(map[string]interface{}, 0)
|
||||
mapData["stroyprize"] = _heroFetter.Stroyprize
|
||||
this.module.modelFetter.modifyHeroFetterDataByObjId(session.GetUserId(), _heroFetter.Id, mapData)
|
||||
resp.Data = _heroFetter
|
||||
}
|
||||
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), LibraryGetStoryRewardResp, resp)
|
||||
return
|
||||
|
@ -194,6 +194,7 @@ const (
|
||||
ErrorCode_LibraryNoData ErrorCode = 2802 // 没找到羁绊数据
|
||||
ErrorCode_LibraryActivation ErrorCode = 2803 // 已经是激活状态
|
||||
ErrorCode_LibraryReward ErrorCode = 2804 // 已经领取奖励
|
||||
ErrorCode_LibraryLvReward ErrorCode = 2805 // 领奖等级没达到
|
||||
)
|
||||
|
||||
// Enum value maps for ErrorCode.
|
||||
@ -353,6 +354,7 @@ var (
|
||||
2802: "LibraryNoData",
|
||||
2803: "LibraryActivation",
|
||||
2804: "LibraryReward",
|
||||
2805: "LibraryLvReward",
|
||||
}
|
||||
ErrorCode_value = map[string]int32{
|
||||
"Success": 0,
|
||||
@ -509,6 +511,7 @@ var (
|
||||
"LibraryNoData": 2802,
|
||||
"LibraryActivation": 2803,
|
||||
"LibraryReward": 2804,
|
||||
"LibraryLvReward": 2805,
|
||||
}
|
||||
)
|
||||
|
||||
@ -543,7 +546,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_errorcode_proto_rawDesc = []byte{
|
||||
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,
|
||||
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,
|
||||
@ -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,
|
||||
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,
|
||||
0x77, 0x61, 0x72, 0x64, 0x10, 0xf4, 0x15, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x77, 0x61, 0x72, 0x64, 0x10, 0xf4, 0x15, 0x12, 0x14, 0x0a, 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61,
|
||||
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 (
|
||||
|
@ -18,11 +18,10 @@ type GameLibraryHeroData struct {
|
||||
Favorlv []int32
|
||||
Startid int32
|
||||
Rightend int32
|
||||
Stroyprize []*Gameatn
|
||||
SpecialStroyprize []*Gameatn
|
||||
Endid1 int32
|
||||
Endid2 int32
|
||||
Endid3 int32
|
||||
Endid []int32
|
||||
Stroyprize []*Gameatn
|
||||
PlotUnlock []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["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 _ok_ bool
|
||||
@ -83,20 +110,17 @@ func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err erro
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
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_ {
|
||||
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 _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.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 _ok_ bool
|
||||
|
Loading…
Reference in New Issue
Block a user