Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
4f64071522
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,10 @@
|
|||||||
"introduce": {
|
"introduce": {
|
||||||
"key": "hunting_boss_1005",
|
"key": "hunting_boss_1005",
|
||||||
"text": "传说中的巨型猩猩是一个非常恐怖的角色,它暴戾且狡猾,与它为敌一定要非常小心"
|
"text": "传说中的巨型猩猩是一个非常恐怖的角色,它暴戾且狡猾,与它为敌一定要非常小心"
|
||||||
|
},
|
||||||
|
"opentimetext": {
|
||||||
|
"key": "bossopening_time1",
|
||||||
|
"text": "开启时间:1、2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -27,6 +31,10 @@
|
|||||||
"introduce": {
|
"introduce": {
|
||||||
"key": "hunting_boss_1006",
|
"key": "hunting_boss_1006",
|
||||||
"text": "火龙可以从嘴里喷出猛烈的火焰,对地面造成毁灭性打击"
|
"text": "火龙可以从嘴里喷出猛烈的火焰,对地面造成毁灭性打击"
|
||||||
|
},
|
||||||
|
"opentimetext": {
|
||||||
|
"key": "bossopening_time2",
|
||||||
|
"text": "开启时间:3、4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -42,6 +50,10 @@
|
|||||||
"introduce": {
|
"introduce": {
|
||||||
"key": "hunting_boss_1007",
|
"key": "hunting_boss_1007",
|
||||||
"text": "一种变异的老虎,它有着锋利的爪子和牙齿"
|
"text": "一种变异的老虎,它有着锋利的爪子和牙齿"
|
||||||
|
},
|
||||||
|
"opentimetext": {
|
||||||
|
"key": "bossopening_time3",
|
||||||
|
"text": "开启时间:5、6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -57,6 +69,10 @@
|
|||||||
"introduce": {
|
"introduce": {
|
||||||
"key": "hunting_boss_1008",
|
"key": "hunting_boss_1008",
|
||||||
"text": "当黑夜来临时,梦魇露出了它的爪牙,会让无辜的人们陷入噩梦中无法自拔"
|
"text": "当黑夜来临时,梦魇露出了它的爪牙,会让无辜的人们陷入噩梦中无法自拔"
|
||||||
|
},
|
||||||
|
"opentimetext": {
|
||||||
|
"key": "bossopening_time4",
|
||||||
|
"text": "开启时间:1、7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -6,8 +6,8 @@
|
|||||||
"name": "师徒二人",
|
"name": "师徒二人",
|
||||||
"lv": 1,
|
"lv": 1,
|
||||||
"hid": [
|
"hid": [
|
||||||
25001,
|
"25001",
|
||||||
35001
|
"35001"
|
||||||
],
|
],
|
||||||
"favorlv": 1,
|
"favorlv": 1,
|
||||||
"prize": []
|
"prize": []
|
||||||
@ -19,8 +19,8 @@
|
|||||||
"name": "师徒二人",
|
"name": "师徒二人",
|
||||||
"lv": 2,
|
"lv": 2,
|
||||||
"hid": [
|
"hid": [
|
||||||
25001,
|
"25001",
|
||||||
35001
|
"35001"
|
||||||
],
|
],
|
||||||
"favorlv": 2,
|
"favorlv": 2,
|
||||||
"prize": [
|
"prize": [
|
||||||
@ -43,8 +43,8 @@
|
|||||||
"name": "师徒二人",
|
"name": "师徒二人",
|
||||||
"lv": 3,
|
"lv": 3,
|
||||||
"hid": [
|
"hid": [
|
||||||
25001,
|
"25001",
|
||||||
35001
|
"35001"
|
||||||
],
|
],
|
||||||
"favorlv": 3,
|
"favorlv": 3,
|
||||||
"prize": [
|
"prize": [
|
||||||
@ -67,9 +67,9 @@
|
|||||||
"name": "毫不相干",
|
"name": "毫不相干",
|
||||||
"lv": 1,
|
"lv": 1,
|
||||||
"hid": [
|
"hid": [
|
||||||
11003,
|
"11003",
|
||||||
11009,
|
"11009",
|
||||||
15004
|
"15004"
|
||||||
],
|
],
|
||||||
"favorlv": 1,
|
"favorlv": 1,
|
||||||
"prize": []
|
"prize": []
|
||||||
@ -81,9 +81,9 @@
|
|||||||
"name": "毫不相干",
|
"name": "毫不相干",
|
||||||
"lv": 2,
|
"lv": 2,
|
||||||
"hid": [
|
"hid": [
|
||||||
11003,
|
"11003",
|
||||||
11009,
|
"11009",
|
||||||
15004
|
"15004"
|
||||||
],
|
],
|
||||||
"favorlv": 2,
|
"favorlv": 2,
|
||||||
"prize": [
|
"prize": [
|
||||||
@ -106,9 +106,9 @@
|
|||||||
"name": "毫不相干",
|
"name": "毫不相干",
|
||||||
"lv": 3,
|
"lv": 3,
|
||||||
"hid": [
|
"hid": [
|
||||||
11003,
|
"11003",
|
||||||
11009,
|
"11009",
|
||||||
15004
|
"15004"
|
||||||
],
|
],
|
||||||
"favorlv": 3,
|
"favorlv": 3,
|
||||||
"prize": [
|
"prize": [
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"hid": 15004,
|
"hid": "15004",
|
||||||
"name": {
|
"name": {
|
||||||
"key": "hero_15004",
|
"key": "hero_15004",
|
||||||
"text": "小欧"
|
"text": "小欧"
|
||||||
},
|
},
|
||||||
"star": 5,
|
"star": 5,
|
||||||
"history": [
|
"history": [
|
||||||
150041,
|
"150041",
|
||||||
150042,
|
"150042",
|
||||||
150043
|
"150043"
|
||||||
],
|
],
|
||||||
"favorlv": [
|
"favorlv": [
|
||||||
1,
|
1,
|
||||||
@ -26,19 +26,22 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid1": 10009,
|
||||||
"endid2": 10010
|
"endid2": 10010,
|
||||||
|
"fid": [
|
||||||
|
102
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hid": 25001,
|
"hid": "25001",
|
||||||
"name": {
|
"name": {
|
||||||
"key": "hero_25001",
|
"key": "hero_25001",
|
||||||
"text": "阿宝"
|
"text": "阿宝"
|
||||||
},
|
},
|
||||||
"star": 5,
|
"star": 5,
|
||||||
"history": [
|
"history": [
|
||||||
250011,
|
"250011",
|
||||||
250012,
|
"250012",
|
||||||
250013
|
"250013"
|
||||||
],
|
],
|
||||||
"favorlv": [
|
"favorlv": [
|
||||||
1,
|
1,
|
||||||
@ -55,19 +58,22 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid1": 10009,
|
||||||
"endid2": 10010
|
"endid2": 10010,
|
||||||
|
"fid": [
|
||||||
|
101
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hid": 35001,
|
"hid": "35001",
|
||||||
"name": {
|
"name": {
|
||||||
"key": "hero_35001",
|
"key": "hero_35001",
|
||||||
"text": "师父"
|
"text": "师父"
|
||||||
},
|
},
|
||||||
"star": 4,
|
"star": 4,
|
||||||
"history": [
|
"history": [
|
||||||
350011,
|
"350011",
|
||||||
350012,
|
"350012",
|
||||||
350013
|
"350013"
|
||||||
],
|
],
|
||||||
"favorlv": [
|
"favorlv": [
|
||||||
1,
|
1,
|
||||||
@ -84,19 +90,22 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid1": 10009,
|
||||||
"endid2": 10010
|
"endid2": 10010,
|
||||||
|
"fid": [
|
||||||
|
101
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hid": 11009,
|
"hid": "11009",
|
||||||
"name": {
|
"name": {
|
||||||
"key": "hero_35002",
|
"key": "hero_35002",
|
||||||
"text": "希卡普"
|
"text": "希卡普"
|
||||||
},
|
},
|
||||||
"star": 4,
|
"star": 4,
|
||||||
"history": [
|
"history": [
|
||||||
110091,
|
"110091",
|
||||||
110092,
|
"110092",
|
||||||
110093
|
"110093"
|
||||||
],
|
],
|
||||||
"favorlv": [
|
"favorlv": [
|
||||||
1,
|
1,
|
||||||
@ -113,6 +122,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"endid1": 10009,
|
"endid1": 10009,
|
||||||
"endid2": 10010
|
"endid2": 10010,
|
||||||
|
"fid": [
|
||||||
|
102
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"histroy": 150041,
|
"histroy": "150041",
|
||||||
"txt": "小欧是个很乖巧的姑娘",
|
"txt": "小欧是个很乖巧的姑娘",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -11,7 +11,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 150042,
|
"histroy": "150042",
|
||||||
"txt": "小欧是个很潇洒的姑娘",
|
"txt": "小欧是个很潇洒的姑娘",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -22,7 +22,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 150043,
|
"histroy": "150043",
|
||||||
"txt": "小欧是个深情的姑娘",
|
"txt": "小欧是个深情的姑娘",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 250011,
|
"histroy": "250011",
|
||||||
"txt": "阿宝长得贼胖",
|
"txt": "阿宝长得贼胖",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -44,7 +44,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 250012,
|
"histroy": "250012",
|
||||||
"txt": "阿宝长得贼圆",
|
"txt": "阿宝长得贼圆",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 250013,
|
"histroy": "250013",
|
||||||
"txt": "阿宝长得贼可爱",
|
"txt": "阿宝长得贼可爱",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 350011,
|
"histroy": "350011",
|
||||||
"txt": "师父武功高强",
|
"txt": "师父武功高强",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 350012,
|
"histroy": "350012",
|
||||||
"txt": "师父很傲娇",
|
"txt": "师父很傲娇",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 350013,
|
"histroy": "350013",
|
||||||
"txt": "师父的武功来自于乌龟大师",
|
"txt": "师父的武功来自于乌龟大师",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 110091,
|
"histroy": "110091",
|
||||||
"txt": "希卡普很勇敢",
|
"txt": "希卡普很勇敢",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -110,7 +110,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 110092,
|
"histroy": "110092",
|
||||||
"txt": "希卡普很善良",
|
"txt": "希卡普很善良",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"histroy": 110093,
|
"histroy": "110093",
|
||||||
"txt": "希卡普很帅气",
|
"txt": "希卡普很帅气",
|
||||||
"prize": [
|
"prize": [
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -78,7 +78,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -123,7 +123,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -168,7 +168,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -213,7 +213,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -258,7 +258,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -303,7 +303,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -348,7 +348,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -393,7 +393,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -438,7 +438,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -483,7 +483,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
@ -528,7 +528,7 @@
|
|||||||
],
|
],
|
||||||
"award": [
|
"award": [
|
||||||
{
|
{
|
||||||
"a": "item",
|
"a": "attr",
|
||||||
"t": "diamond",
|
"t": "diamond",
|
||||||
"n": 50
|
"n": 50
|
||||||
},
|
},
|
||||||
|
File diff suppressed because it is too large
Load Diff
10
bin/stup.sh
10
bin/stup.sh
@ -9,13 +9,14 @@
|
|||||||
if [ $num -eq 0 ]
|
if [ $num -eq 0 ]
|
||||||
then
|
then
|
||||||
nohup $CMD > /dev/null 2>&1 &
|
nohup $CMD > /dev/null 2>&1 &
|
||||||
# nohup $CMD >output.log 2>&1 &
|
#nohup $CMD > $SERVICE.log 2>&1 &
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "start failed, please check the log!"
|
echo "start failed, please check the log!"
|
||||||
exit $?
|
exit $?
|
||||||
else
|
else
|
||||||
echo $! > $SERVICE.pid
|
|
||||||
|
# echo $! > $SERVICE.pid
|
||||||
echo "start success"
|
echo "start success"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -26,13 +27,14 @@
|
|||||||
}
|
}
|
||||||
stop(){
|
stop(){
|
||||||
echo "stopping $SERVICE..."
|
echo "stopping $SERVICE..."
|
||||||
kill -9 `cat $SERVICE.pid`
|
#kill -9 `cat $SERVICE.pid`
|
||||||
|
kill -9 `ps -ef | grep $SERVICE | grep conf | awk '{print $2}'`
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
echo "stop failed, may be $SERVICE isn't running"
|
echo "stop failed, may be $SERVICE isn't running"
|
||||||
exit $?
|
exit $?
|
||||||
else
|
else
|
||||||
rm -rf $SERVICE.pid
|
#rm -rf $SERVICE.pid
|
||||||
echo "stop success"
|
echo "stop success"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,10 @@ func (this *AgentMgrComp) SendMsgToAllAgent(ctx context.Context, args *pb.BroadC
|
|||||||
}
|
}
|
||||||
this.module.Debugf("SendMsgToAllAgent: msg:%v", msg)
|
this.module.Debugf("SendMsgToAllAgent: msg:%v", msg)
|
||||||
this.agents.Range(func(key, value any) bool {
|
this.agents.Range(func(key, value any) bool {
|
||||||
value.(IAgent).WriteMsg(msg)
|
agent := value.(IAgent)
|
||||||
|
if agent.UserId() != "" { //只发送登录用户
|
||||||
|
agent.WriteMsg(msg)
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
|
@ -63,11 +63,11 @@ func (this *Hero) CreateRepeatHero(session comm.IUserSession, heroCfgId string,
|
|||||||
initUpdate := map[string]interface{}{}
|
initUpdate := map[string]interface{}{}
|
||||||
sz := result.GetTujian()
|
sz := result.GetTujian()
|
||||||
if len(sz) == 0 {
|
if len(sz) == 0 {
|
||||||
sz = make(map[string]bool, 0)
|
sz = make(map[string]int32, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||||
sz[heroCfgId] = true
|
sz[heroCfgId] = 0
|
||||||
initUpdate["tujian"] = sz
|
initUpdate["tujian"] = sz
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,11 +253,11 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
|||||||
initUpdate := map[string]interface{}{}
|
initUpdate := map[string]interface{}{}
|
||||||
sz := result.GetTujian()
|
sz := result.GetTujian()
|
||||||
if len(sz) == 0 {
|
if len(sz) == 0 {
|
||||||
sz = make(map[string]bool, 0)
|
sz = make(map[string]int32, 0)
|
||||||
}
|
}
|
||||||
for k := range heros {
|
for k := range heros {
|
||||||
if _, ok := result.GetTujian()[k]; !ok {
|
if _, ok := result.GetTujian()[k]; !ok {
|
||||||
sz[k] = true
|
sz[k] = 0
|
||||||
initUpdate["tujian"] = sz
|
initUpdate["tujian"] = sz
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
48
modules/library/api_getstoryreward.go
Normal file
48
modules/library/api_getstoryreward.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package library
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
//参数校验
|
||||||
|
func (this *apiComp) GetStoryRewardCheck(session comm.IUserSession, req *pb.LibraryGetStoryRewardReq) (code pb.ErrorCode) {
|
||||||
|
if req.Hid == "" || req.StoryId == 0 {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *apiComp) GetStoryReward(session comm.IUserSession, req *pb.LibraryGetStoryRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
|
||||||
|
code = this.GetStoryRewardCheck(session, req)
|
||||||
|
if code != pb.ErrorCode_Success {
|
||||||
|
return // 参数校验失败直接返回
|
||||||
|
}
|
||||||
|
expand, err := this.module.ModuleUser.GetUserExpand(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
conf := this.module.configure.GetLibraryHero(req.Hid)
|
||||||
|
for k, v := range expand.Tujian {
|
||||||
|
if k == req.Hid && conf.Rightend == v {
|
||||||
|
code = this.module.DispenseRes(session, conf.Stroyprize, true)
|
||||||
|
// 修改storyID
|
||||||
|
|
||||||
|
sz := make(map[string]interface{}, 0)
|
||||||
|
for k, v := range expand.Tujian {
|
||||||
|
sz[k] = v
|
||||||
|
}
|
||||||
|
sz[req.Hid] = conf.Rightend
|
||||||
|
|
||||||
|
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), sz)
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
@ -6,49 +6,24 @@ import (
|
|||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/sys/configure"
|
"go_dreamfactory/sys/configure"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
game_huntingboss = "game_huntingboss.json"
|
game_libraryhero = "game_libraryhero.json"
|
||||||
game_challenge = "game_huntingchallenge.json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
///配置管理基础组件
|
///配置管理基础组件
|
||||||
type configureComp struct {
|
type configureComp struct {
|
||||||
hlock sync.RWMutex
|
|
||||||
modules.MCompConfigure
|
modules.MCompConfigure
|
||||||
_huntingMap map[int64]*cfg.GameHuntingBossData
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
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)
|
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||||
|
|
||||||
this._huntingMap = make(map[int64]*cfg.GameHuntingBossData, 0)
|
err = this.LoadConfigure(game_libraryhero, cfg.NewGameLibraryHero)
|
||||||
configure.RegisterConfigure(game_huntingboss, cfg.NewGameHuntingBoss, func() {
|
|
||||||
if v, err := this.GetConfigure(game_huntingboss); err == nil {
|
|
||||||
if configure, ok := v.(*cfg.GameHuntingBoss); ok {
|
|
||||||
this.hlock.Lock()
|
|
||||||
defer this.hlock.Unlock()
|
|
||||||
for _, value := range configure.GetDataList() {
|
|
||||||
this._huntingMap[int64(value.Type<<16)+int64(value.Difficulty)] = value
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
log.Errorf("get game_huntingboss conf err:%v", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
})
|
|
||||||
err = this.LoadConfigure(game_challenge, cfg.NewGameHuntingChallenge)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 参数: boss类型 难度
|
return
|
||||||
func (this *configureComp) GetHuntingBossConfigData(bossType int32, difficulty int32) (data *cfg.GameHuntingBossData) {
|
|
||||||
|
|
||||||
return this._huntingMap[int64(bossType<<16)+int64(difficulty)]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//加载多个配置文件
|
//加载多个配置文件
|
||||||
@ -68,29 +43,10 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
|
|||||||
return configure.GetConfigure(name)
|
return configure.GetConfigure(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// get boss Type
|
func (this *configureComp) GetLibraryHero(hid string) (data *cfg.GameLibraryHeroData) {
|
||||||
func (this *configureComp) GetHuntingBossTypeConfigData() (mapType map[int32]struct{}) {
|
if v, err := this.GetConfigure(game_libraryhero); err == nil {
|
||||||
|
if configure, ok := v.(*cfg.GameLibraryHero); ok {
|
||||||
mapType = make(map[int32]struct{}, 0)
|
data = configure.Get(hid)
|
||||||
if v, err := this.GetConfigure(game_huntingboss); err == nil {
|
|
||||||
if configure, ok := v.(*cfg.GameHuntingBoss); ok {
|
|
||||||
this.hlock.Lock()
|
|
||||||
defer this.hlock.Unlock()
|
|
||||||
for _, value := range configure.GetDataList() {
|
|
||||||
if _, ok := mapType[value.Type]; !ok {
|
|
||||||
mapType[value.Type] = struct{}{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *configureComp) GetBuyChallengeCount(index int32) (data *cfg.GameHuntingChallengeData) {
|
|
||||||
if v, err := this.GetConfigure(game_challenge); err == nil {
|
|
||||||
if configure, ok := v.(*cfg.GameHuntingChallenge); ok {
|
|
||||||
data = configure.Get(index)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,7 +3,6 @@ package library
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/mgo"
|
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
@ -32,13 +31,31 @@ func (this *modelLibrary) modifyLibraryDataByObjId(uid string, data map[string]i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取列表信息
|
// 获取列表信息
|
||||||
func (this *modelLibrary) getLibraryList(uid string) (result *pb.DBHero, err error) {
|
func (this *modelLibrary) getLibraryList(uid string) []*pb.DBLibrary {
|
||||||
result = &pb.DBHero{}
|
libs := make([]*pb.DBLibrary, 0)
|
||||||
if err = this.Get(uid, result); err != nil && mgo.MongodbNil != err {
|
err := this.GetList(uid, &libs)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return libs
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建一条信息
|
||||||
|
func (this *modelLibrary) createLibrary(uid string, fetter *pb.DBLibrary) (err error) {
|
||||||
|
|
||||||
|
if err = this.AddList(uid, fetter.Id, fetter); err != nil {
|
||||||
|
this.module.Errorf("%v", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nil
|
// 通过objid 找对应的数据
|
||||||
return result, err
|
func (this *modelLibrary) getOneLibrary(uid, oid string) *pb.DBLibrary {
|
||||||
|
fetter := &pb.DBLibrary{}
|
||||||
|
err := this.GetListObj(uid, oid, fetter)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return fetter
|
||||||
}
|
}
|
@ -12,6 +12,7 @@ import (
|
|||||||
|
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/cron"
|
"go_dreamfactory/lego/sys/cron"
|
||||||
|
"go_dreamfactory/lego/sys/log"
|
||||||
|
|
||||||
"google.golang.org/protobuf/types/known/anypb"
|
"google.golang.org/protobuf/types/known/anypb"
|
||||||
)
|
)
|
||||||
@ -52,51 +53,49 @@ func (this *ChatComp) Start() (err error) {
|
|||||||
} else {
|
} else {
|
||||||
var id cron.EntryID
|
var id cron.EntryID
|
||||||
this.takes = make([]cron.EntryID, 0)
|
this.takes = make([]cron.EntryID, 0)
|
||||||
for _, v := range v.(*cfg.GameChatSystem).GetDataList() {
|
confs := v.(*cfg.GameChatSystem)
|
||||||
if v.Type == int32(comm.TimedNotice) { //处理定时任务
|
|
||||||
|
for _, v1 := range confs.GetDataMap() {
|
||||||
|
if v1.Type == int32(comm.TimedNotice) { //处理定时任务
|
||||||
weekStr := ""
|
weekStr := ""
|
||||||
for _, w := range v.Week {
|
for _, w := range v1.Week {
|
||||||
weekStr += fmt.Sprintf("%d,", w)
|
weekStr += fmt.Sprintf("%d,", w)
|
||||||
}
|
}
|
||||||
if len(weekStr) > 0 && len(weekStr) < 7 {
|
if len(v1.Week) > 0 && len(v1.Week) < 7 {
|
||||||
weekStr = weekStr[0 : len(weekStr)-1]
|
weekStr = weekStr[0 : len(weekStr)-1]
|
||||||
} else {
|
} else {
|
||||||
weekStr = "*"
|
weekStr = "*"
|
||||||
}
|
}
|
||||||
cronStr := fmt.Sprintf("* %d %d * * %s", v.TimeM, v.TimeH, weekStr)
|
cronStr := fmt.Sprintf("0 %d %d ? * %s", v1.TimeM, v1.TimeH, weekStr)
|
||||||
if id, err = cron.AddFunc(cronStr, this.chatNoticen(v)); err != nil {
|
this.module.Debug("注册Chat广播公告消息", log.Field{Key: "cronStr", Value: cronStr}, log.Field{Key: "text", Value: v1.Text})
|
||||||
|
if id, err = cron.AddFunc(cronStr, this.chatNoticen(v1.Text)); err != nil {
|
||||||
this.module.Errorf("cron.AddFunc:%s err:%v", cronStr, err)
|
this.module.Errorf("cron.AddFunc:%s err:%v", cronStr, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
this.takes = append(this.takes, id)
|
this.takes = append(this.takes, id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//测试代码
|
|
||||||
// if id, err = cron.AddFunc("0 */1 * * * ?", this.chatNoticen(&cfg.GameChatSystemData{Text: "测试公告系统"})); err != nil {
|
|
||||||
// this.module.Errorf("cron.AddFunc:%s err:%v", "0 */1 * * * ?", err)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ChatComp) chatNoticen(n *cfg.GameChatSystemData) func() {
|
func (this *ChatComp) chatNoticen(content string) func() {
|
||||||
return func() {
|
return func() {
|
||||||
msg := &pb.DBChat{
|
msg := &pb.DBChat{
|
||||||
Channel: pb.ChatChannel_System,
|
Channel: pb.ChatChannel_System,
|
||||||
Stag: this.service.GetTag(),
|
Stag: this.service.GetTag(),
|
||||||
Ctime: time.Now().Unix(),
|
Ctime: time.Now().Unix(),
|
||||||
Content: n.Text,
|
Content: content,
|
||||||
}
|
}
|
||||||
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
|
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
|
||||||
|
this.module.Debug("广播公告消息", log.Field{Key: "chat", Value: content})
|
||||||
if err := this.module.service.AcrossClusterBroadcast(context.Background(), msg.Stag, comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{
|
if err := this.module.service.AcrossClusterBroadcast(context.Background(), msg.Stag, comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{
|
||||||
MainType: string(comm.ModuleChat),
|
MainType: string(comm.ModuleChat),
|
||||||
SubType: "message",
|
SubType: "message",
|
||||||
Data: data,
|
Data: data,
|
||||||
}, nil); err != nil {
|
}, nil); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
} else {
|
|
||||||
this.module.Debugf("chatNoticen:%s", n.Text)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ type DBLibrary struct {
|
|||||||
|
|
||||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||||
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"`
|
Fid int32 `protobuf:"varint,3,opt,name=fid,proto3" json:"fid"` // 配置表id 羁绊id
|
||||||
Hero map[int32]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv
|
Hero map[int32]int32 `protobuf:"bytes,4,rep,name=hero,proto3" json:"hero" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key: hid value: favorlv
|
||||||
Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖
|
Prize bool `protobuf:"varint,5,opt,name=prize,proto3" json:"prize"` //是否领奖
|
||||||
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级
|
Fetterlv int32 `protobuf:"varint,6,opt,name=fetterlv,proto3" json:"fetterlv"` // 当前羁绊等级
|
||||||
|
@ -201,6 +201,109 @@ func (x *LibraryGetRewardResp) GetData() *DBLibrary {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 领取剧情奖励
|
||||||
|
type LibraryGetStoryRewardReq struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Hid string `protobuf:"bytes,1,opt,name=hid,proto3" json:"hid"` // 英雄ID
|
||||||
|
StoryId int32 `protobuf:"varint,2,opt,name=storyId,proto3" json:"storyId"` // 故事剧情id
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardReq) Reset() {
|
||||||
|
*x = LibraryGetStoryRewardReq{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_library_library_msg_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardReq) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LibraryGetStoryRewardReq) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardReq) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_library_library_msg_proto_msgTypes[4]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LibraryGetStoryRewardReq.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LibraryGetStoryRewardReq) Descriptor() ([]byte, []int) {
|
||||||
|
return file_library_library_msg_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardReq) GetHid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Hid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardReq) GetStoryId() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.StoryId
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type LibraryGetStoryRewardResp struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Data *DBLibrary `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardResp) Reset() {
|
||||||
|
*x = LibraryGetStoryRewardResp{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_library_library_msg_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardResp) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*LibraryGetStoryRewardResp) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardResp) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_library_library_msg_proto_msgTypes[5]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use LibraryGetStoryRewardResp.ProtoReflect.Descriptor instead.
|
||||||
|
func (*LibraryGetStoryRewardResp) Descriptor() ([]byte, []int) {
|
||||||
|
return file_library_library_msg_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *LibraryGetStoryRewardResp) GetData() *DBLibrary {
|
||||||
|
if x != nil {
|
||||||
|
return x.Data
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_library_library_msg_proto protoreflect.FileDescriptor
|
var File_library_library_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_library_library_msg_proto_rawDesc = []byte{
|
var file_library_library_msg_proto_rawDesc = []byte{
|
||||||
@ -218,8 +321,16 @@ var file_library_library_msg_proto_rawDesc = []byte{
|
|||||||
0x14, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
|
0x14, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
|
||||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52,
|
0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52,
|
||||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
|
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x46, 0x0a, 0x18, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
|
||||||
|
0x71, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||||
|
0x68, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x3b, 0x0a,
|
||||||
|
0x19, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x79,
|
||||||
|
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61,
|
||||||
|
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x4c, 0x69, 0x62,
|
||||||
|
0x72, 0x61, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||||
|
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -234,22 +345,25 @@ func file_library_library_msg_proto_rawDescGZIP() []byte {
|
|||||||
return file_library_library_msg_proto_rawDescData
|
return file_library_library_msg_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_library_library_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
var file_library_library_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_library_library_msg_proto_goTypes = []interface{}{
|
var file_library_library_msg_proto_goTypes = []interface{}{
|
||||||
(*LibraryGetListReq)(nil), // 0: LibraryGetListReq
|
(*LibraryGetListReq)(nil), // 0: LibraryGetListReq
|
||||||
(*LibraryGetListResp)(nil), // 1: LibraryGetListResp
|
(*LibraryGetListResp)(nil), // 1: LibraryGetListResp
|
||||||
(*LibraryGetRewardReq)(nil), // 2: LibraryGetRewardReq
|
(*LibraryGetRewardReq)(nil), // 2: LibraryGetRewardReq
|
||||||
(*LibraryGetRewardResp)(nil), // 3: LibraryGetRewardResp
|
(*LibraryGetRewardResp)(nil), // 3: LibraryGetRewardResp
|
||||||
(*DBLibrary)(nil), // 4: DBLibrary
|
(*LibraryGetStoryRewardReq)(nil), // 4: LibraryGetStoryRewardReq
|
||||||
|
(*LibraryGetStoryRewardResp)(nil), // 5: LibraryGetStoryRewardResp
|
||||||
|
(*DBLibrary)(nil), // 6: DBLibrary
|
||||||
}
|
}
|
||||||
var file_library_library_msg_proto_depIdxs = []int32{
|
var file_library_library_msg_proto_depIdxs = []int32{
|
||||||
4, // 0: LibraryGetListResp.data:type_name -> DBLibrary
|
6, // 0: LibraryGetListResp.data:type_name -> DBLibrary
|
||||||
4, // 1: LibraryGetRewardResp.data:type_name -> DBLibrary
|
6, // 1: LibraryGetRewardResp.data:type_name -> DBLibrary
|
||||||
2, // [2:2] is the sub-list for method output_type
|
6, // 2: LibraryGetStoryRewardResp.data:type_name -> DBLibrary
|
||||||
2, // [2:2] is the sub-list for method input_type
|
3, // [3:3] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
0, // [0:2] is the sub-list for field type_name
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
|
0, // [0:3] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_library_library_msg_proto_init() }
|
func init() { file_library_library_msg_proto_init() }
|
||||||
@ -307,6 +421,30 @@ func file_library_library_msg_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_library_library_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LibraryGetStoryRewardReq); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_library_library_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*LibraryGetStoryRewardResp); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@ -314,7 +452,7 @@ func file_library_library_msg_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_library_library_msg_proto_rawDesc,
|
RawDescriptor: file_library_library_msg_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 4,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -377,7 +377,7 @@ type DBUserExpand struct {
|
|||||||
InitdataCount uint32 `protobuf:"varint,5,opt,name=initdataCount,proto3" json:"initdataCount"` //今日初始累计次数
|
InitdataCount uint32 `protobuf:"varint,5,opt,name=initdataCount,proto3" json:"initdataCount"` //今日初始累计次数
|
||||||
Chatchannel int32 `protobuf:"varint,6,opt,name=chatchannel,proto3" json:"chatchannel"` //跨服聊天频道
|
Chatchannel int32 `protobuf:"varint,6,opt,name=chatchannel,proto3" json:"chatchannel"` //跨服聊天频道
|
||||||
ModifynameCount int32 `protobuf:"varint,7,opt,name=modifynameCount,proto3" json:"modifynameCount"` //修改昵称次数
|
ModifynameCount int32 `protobuf:"varint,7,opt,name=modifynameCount,proto3" json:"modifynameCount"` //修改昵称次数
|
||||||
Tujian map[string]bool `protobuf:"bytes,8,rep,name=tujian,proto3" json:"tujian" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //图鉴
|
Tujian map[string]int32 `protobuf:"bytes,8,rep,name=tujian,proto3" json:"tujian" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //图鉴
|
||||||
CurFigure int32 `protobuf:"varint,9,opt,name=curFigure,proto3" json:"curFigure"` //当前形象
|
CurFigure int32 `protobuf:"varint,9,opt,name=curFigure,proto3" json:"curFigure"` //当前形象
|
||||||
Preinstall map[int32]*Figure `protobuf:"bytes,10,rep,name=preinstall,proto3" json:"preinstall" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //形象预设
|
Preinstall map[int32]*Figure `protobuf:"bytes,10,rep,name=preinstall,proto3" json:"preinstall" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //形象预设
|
||||||
Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度
|
Activeday int32 `protobuf:"varint,11,opt,name=activeday,proto3" json:"activeday"` //日活跃度
|
||||||
@ -474,7 +474,7 @@ func (x *DBUserExpand) GetModifynameCount() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DBUserExpand) GetTujian() map[string]bool {
|
func (x *DBUserExpand) GetTujian() map[string]int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Tujian
|
return x.Tujian
|
||||||
}
|
}
|
||||||
@ -655,7 +655,7 @@ var file_userexpand_proto_rawDesc = []byte{
|
|||||||
0x61, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x61, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0f,
|
0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x46, 0x0a, 0x0f,
|
||||||
0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
0x50, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
||||||
0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
@ -47,7 +47,6 @@ type Configure struct {
|
|||||||
|
|
||||||
func (this *Configure) Start() (err error) {
|
func (this *Configure) Start() (err error) {
|
||||||
timer := time.NewTicker(time.Second * time.Duration(this.options.CheckInterval))
|
timer := time.NewTicker(time.Second * time.Duration(this.options.CheckInterval))
|
||||||
defer timer.Stop()
|
|
||||||
go func() {
|
go func() {
|
||||||
locp:
|
locp:
|
||||||
for {
|
for {
|
||||||
@ -58,6 +57,7 @@ func (this *Configure) Start() (err error) {
|
|||||||
this.checkConfigure()
|
this.checkConfigure()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
timer.Stop()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return
|
return
|
||||||
@ -177,6 +177,7 @@ func (this *Configure) loaderConfigure(name string, handle *configurehandle) (er
|
|||||||
|
|
||||||
//检查配置文件是否有更新
|
//检查配置文件是否有更新
|
||||||
func (this *Configure) checkConfigure() {
|
func (this *Configure) checkConfigure() {
|
||||||
|
// log.Debug("Check Configure Update")
|
||||||
if dir, err := ioutil.ReadDir(this.options.ConfigurePath); err != nil {
|
if dir, err := ioutil.ReadDir(this.options.ConfigurePath); err != nil {
|
||||||
log.Errorf("[Configure Sys] checkConfigure err:%v", err)
|
log.Errorf("[Configure Sys] checkConfigure err:%v", err)
|
||||||
} else {
|
} else {
|
||||||
@ -190,8 +191,10 @@ func (this *Configure) checkConfigure() {
|
|||||||
handle := this.configurehandles[v.Name]
|
handle := this.configurehandles[v.Name]
|
||||||
this.hlock.RUnlock()
|
this.hlock.RUnlock()
|
||||||
if err = this.loaderConfigure(v.Name, handle); err != nil {
|
if err = this.loaderConfigure(v.Name, handle); err != nil {
|
||||||
|
log.Errorln(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
log.Debug("UpDate Configure", log.Field{Key: "table", Value: v.Name})
|
||||||
for _, v := range handle.events {
|
for _, v := range handle.events {
|
||||||
if v != nil {
|
if v != nil {
|
||||||
go func(f func()) {
|
go func(f func()) {
|
||||||
|
@ -15,6 +15,7 @@ type GameHuntingOpenTimeData struct {
|
|||||||
Opentime []int32
|
Opentime []int32
|
||||||
Name string
|
Name string
|
||||||
Introduce string
|
Introduce string
|
||||||
|
Opentimetext string
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameHuntingOpenTimeData = 1854578068
|
const TypeId_GameHuntingOpenTimeData = 1854578068
|
||||||
@ -41,6 +42,7 @@ func (_v *GameHuntingOpenTimeData)Deserialize(_buf map[string]interface{}) (err
|
|||||||
|
|
||||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _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["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _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["introduce"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Introduce error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Introduce, _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["introduce"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Introduce error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Introduce, _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["opentimetext"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Opentimetext error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Opentimetext, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ type GameLibraryFetterData struct {
|
|||||||
Ftype int32
|
Ftype int32
|
||||||
Name string
|
Name string
|
||||||
Lv int32
|
Lv int32
|
||||||
Hid []int32
|
Hid []string
|
||||||
Favorlv int32
|
Favorlv int32
|
||||||
Prize []*Gameatn
|
Prize []*Gameatn
|
||||||
}
|
}
|
||||||
@ -38,11 +38,11 @@ func (_v *GameLibraryFetterData)Deserialize(_buf map[string]interface{}) (err er
|
|||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
if _arr_, _ok_ = _buf["hid"].([]interface{}); !_ok_ { err = errors.New("hid error"); return }
|
if _arr_, _ok_ = _buf["hid"].([]interface{}); !_ok_ { err = errors.New("hid error"); return }
|
||||||
|
|
||||||
_v.Hid = make([]int32, 0, len(_arr_))
|
_v.Hid = make([]string, 0, len(_arr_))
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
for _, _e_ := range _arr_ {
|
||||||
var _list_v_ int32
|
var _list_v_ string
|
||||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
||||||
_v.Hid = append(_v.Hid, _list_v_)
|
_v.Hid = append(_v.Hid, _list_v_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
package cfg
|
package cfg
|
||||||
|
|
||||||
type GameLibraryHero struct {
|
type GameLibraryHero struct {
|
||||||
_dataMap map[int32]*GameLibraryHeroData
|
_dataMap map[string]*GameLibraryHeroData
|
||||||
_dataList []*GameLibraryHeroData
|
_dataList []*GameLibraryHeroData
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGameLibraryHero(_buf []map[string]interface{}) (*GameLibraryHero, error) {
|
func NewGameLibraryHero(_buf []map[string]interface{}) (*GameLibraryHero, error) {
|
||||||
_dataList := make([]*GameLibraryHeroData, 0, len(_buf))
|
_dataList := make([]*GameLibraryHeroData, 0, len(_buf))
|
||||||
dataMap := make(map[int32]*GameLibraryHeroData)
|
dataMap := make(map[string]*GameLibraryHeroData)
|
||||||
for _, _ele_ := range _buf {
|
for _, _ele_ := range _buf {
|
||||||
if _v, err2 := DeserializeGameLibraryHeroData(_ele_); err2 != nil {
|
if _v, err2 := DeserializeGameLibraryHeroData(_ele_); err2 != nil {
|
||||||
return nil, err2
|
return nil, err2
|
||||||
@ -27,7 +27,7 @@ func NewGameLibraryHero(_buf []map[string]interface{}) (*GameLibraryHero, error)
|
|||||||
return &GameLibraryHero{_dataList:_dataList, _dataMap:dataMap}, nil
|
return &GameLibraryHero{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameLibraryHero) GetDataMap() map[int32]*GameLibraryHeroData {
|
func (table *GameLibraryHero) GetDataMap() map[string]*GameLibraryHeroData {
|
||||||
return table._dataMap
|
return table._dataMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ func (table *GameLibraryHero) GetDataList() []*GameLibraryHeroData {
|
|||||||
return table._dataList
|
return table._dataList
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameLibraryHero) Get(key int32) *GameLibraryHeroData {
|
func (table *GameLibraryHero) Get(key string) *GameLibraryHeroData {
|
||||||
return table._dataMap[key]
|
return table._dataMap[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,16 +11,17 @@ package cfg
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type GameLibraryHeroData struct {
|
type GameLibraryHeroData struct {
|
||||||
Hid int32
|
Hid string
|
||||||
Name string
|
Name string
|
||||||
Star int32
|
Star int32
|
||||||
History []int32
|
History []string
|
||||||
Favorlv []int32
|
Favorlv []int32
|
||||||
Startid int32
|
Startid int32
|
||||||
Rightend int32
|
Rightend int32
|
||||||
Stroyprize []*Gameatn
|
Stroyprize []*Gameatn
|
||||||
Endid1 int32
|
Endid1 int32
|
||||||
Endid2 int32
|
Endid2 int32
|
||||||
|
Fid []int32
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameLibraryHeroData = 1808545443
|
const TypeId_GameLibraryHeroData = 1808545443
|
||||||
@ -30,7 +31,7 @@ func (*GameLibraryHeroData) GetTypeId() int32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err error) {
|
func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hid"].(float64); !_ok_ { err = errors.New("hid error"); return }; _v.Hid = int32(_tempNum_) }
|
{ var _ok_ bool; if _v.Hid, _ok_ = _buf["hid"].(string); !_ok_ { err = errors.New("hid error"); return } }
|
||||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _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["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
|
||||||
{
|
{
|
||||||
@ -38,11 +39,11 @@ func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err erro
|
|||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
if _arr_, _ok_ = _buf["history"].([]interface{}); !_ok_ { err = errors.New("history error"); return }
|
if _arr_, _ok_ = _buf["history"].([]interface{}); !_ok_ { err = errors.New("history error"); return }
|
||||||
|
|
||||||
_v.History = make([]int32, 0, len(_arr_))
|
_v.History = make([]string, 0, len(_arr_))
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
for _, _e_ := range _arr_ {
|
||||||
var _list_v_ int32
|
var _list_v_ string
|
||||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
||||||
_v.History = append(_v.History, _list_v_)
|
_v.History = append(_v.History, _list_v_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,6 +80,20 @@ func (_v *GameLibraryHeroData)Deserialize(_buf map[string]interface{}) (err erro
|
|||||||
|
|
||||||
{ 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["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["endid2"].(float64); !_ok_ { err = errors.New("endid2 error"); return }; _v.Endid2 = int32(_tempNum_) }
|
||||||
|
{
|
||||||
|
var _arr_ []interface{}
|
||||||
|
var _ok_ bool
|
||||||
|
if _arr_, _ok_ = _buf["fid"].([]interface{}); !_ok_ { err = errors.New("fid error"); return }
|
||||||
|
|
||||||
|
_v.Fid = 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.Fid = append(_v.Fid, _list_v_)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
package cfg
|
package cfg
|
||||||
|
|
||||||
type GameLibraryHistory struct {
|
type GameLibraryHistory struct {
|
||||||
_dataMap map[int32]*GameLibraryHistoryData
|
_dataMap map[string]*GameLibraryHistoryData
|
||||||
_dataList []*GameLibraryHistoryData
|
_dataList []*GameLibraryHistoryData
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGameLibraryHistory(_buf []map[string]interface{}) (*GameLibraryHistory, error) {
|
func NewGameLibraryHistory(_buf []map[string]interface{}) (*GameLibraryHistory, error) {
|
||||||
_dataList := make([]*GameLibraryHistoryData, 0, len(_buf))
|
_dataList := make([]*GameLibraryHistoryData, 0, len(_buf))
|
||||||
dataMap := make(map[int32]*GameLibraryHistoryData)
|
dataMap := make(map[string]*GameLibraryHistoryData)
|
||||||
for _, _ele_ := range _buf {
|
for _, _ele_ := range _buf {
|
||||||
if _v, err2 := DeserializeGameLibraryHistoryData(_ele_); err2 != nil {
|
if _v, err2 := DeserializeGameLibraryHistoryData(_ele_); err2 != nil {
|
||||||
return nil, err2
|
return nil, err2
|
||||||
@ -27,7 +27,7 @@ func NewGameLibraryHistory(_buf []map[string]interface{}) (*GameLibraryHistory,
|
|||||||
return &GameLibraryHistory{_dataList:_dataList, _dataMap:dataMap}, nil
|
return &GameLibraryHistory{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameLibraryHistory) GetDataMap() map[int32]*GameLibraryHistoryData {
|
func (table *GameLibraryHistory) GetDataMap() map[string]*GameLibraryHistoryData {
|
||||||
return table._dataMap
|
return table._dataMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ func (table *GameLibraryHistory) GetDataList() []*GameLibraryHistoryData {
|
|||||||
return table._dataList
|
return table._dataList
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameLibraryHistory) Get(key int32) *GameLibraryHistoryData {
|
func (table *GameLibraryHistory) Get(key string) *GameLibraryHistoryData {
|
||||||
return table._dataMap[key]
|
return table._dataMap[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ package cfg
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
type GameLibraryHistoryData struct {
|
type GameLibraryHistoryData struct {
|
||||||
Histroy int32
|
Histroy string
|
||||||
Txt string
|
Txt string
|
||||||
Prize []*Gameatn
|
Prize []*Gameatn
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ func (*GameLibraryHistoryData) GetTypeId() int32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (_v *GameLibraryHistoryData)Deserialize(_buf map[string]interface{}) (err error) {
|
func (_v *GameLibraryHistoryData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["histroy"].(float64); !_ok_ { err = errors.New("histroy error"); return }; _v.Histroy = int32(_tempNum_) }
|
{ var _ok_ bool; if _v.Histroy, _ok_ = _buf["histroy"].(string); !_ok_ { err = errors.New("histroy error"); return } }
|
||||||
{ var _ok_ bool; if _v.Txt, _ok_ = _buf["txt"].(string); !_ok_ { err = errors.New("txt error"); return } }
|
{ var _ok_ bool; if _v.Txt, _ok_ = _buf["txt"].(string); !_ok_ { err = errors.New("txt error"); return } }
|
||||||
{
|
{
|
||||||
var _arr_ []interface{}
|
var _arr_ []interface{}
|
||||||
|
@ -33,9 +33,12 @@ type GameStroyData struct {
|
|||||||
Move string
|
Move string
|
||||||
Action string
|
Action string
|
||||||
Sound string
|
Sound string
|
||||||
Position serialization.Vector3
|
PositionR serialization.Vector3
|
||||||
Revolve serialization.Vector3
|
PositionL serialization.Vector3
|
||||||
Size serialization.Vector3
|
RevolveR serialization.Vector3
|
||||||
|
RevolveL serialization.Vector3
|
||||||
|
SizeR serialization.Vector3
|
||||||
|
SizeL serialization.Vector3
|
||||||
Perf string
|
Perf string
|
||||||
Cg string
|
Cg string
|
||||||
Skip bool
|
Skip bool
|
||||||
@ -82,28 +85,52 @@ func (_v *GameStroyData)Deserialize(_buf map[string]interface{}) (err error) {
|
|||||||
{ var _ok_ bool; if _v.Move, _ok_ = _buf["move"].(string); !_ok_ { err = errors.New("move error"); return } }
|
{ var _ok_ bool; if _v.Move, _ok_ = _buf["move"].(string); !_ok_ { err = errors.New("move error"); return } }
|
||||||
{ var _ok_ bool; if _v.Action, _ok_ = _buf["action"].(string); !_ok_ { err = errors.New("action error"); return } }
|
{ var _ok_ bool; if _v.Action, _ok_ = _buf["action"].(string); !_ok_ { err = errors.New("action error"); return } }
|
||||||
{ var _ok_ bool; if _v.Sound, _ok_ = _buf["sound"].(string); !_ok_ { err = errors.New("sound error"); return } }
|
{ var _ok_ bool; if _v.Sound, _ok_ = _buf["sound"].(string); !_ok_ { err = errors.New("sound error"); return } }
|
||||||
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["position"].(map[string]interface{}); !_ok_ { err = errors.New("position error"); return }
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["positionR"].(map[string]interface{}); !_ok_ { err = errors.New("positionR error"); return }
|
||||||
var _x_, _y_, _z_ float32;
|
var _x_, _y_, _z_ float32;
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
_v.Position = serialization.NewVector3(_x_, _y_, _z_)
|
_v.PositionR = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
}
|
}
|
||||||
|
|
||||||
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["revolve"].(map[string]interface{}); !_ok_ { err = errors.New("revolve error"); return }
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["positionL"].(map[string]interface{}); !_ok_ { err = errors.New("positionL error"); return }
|
||||||
var _x_, _y_, _z_ float32;
|
var _x_, _y_, _z_ float32;
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
_v.Revolve = serialization.NewVector3(_x_, _y_, _z_)
|
_v.PositionL = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
}
|
}
|
||||||
|
|
||||||
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["size"].(map[string]interface{}); !_ok_ { err = errors.New("size error"); return }
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["revolveR"].(map[string]interface{}); !_ok_ { err = errors.New("revolveR error"); return }
|
||||||
var _x_, _y_, _z_ float32;
|
var _x_, _y_, _z_ float32;
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
_v.Size = serialization.NewVector3(_x_, _y_, _z_)
|
_v.RevolveR = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
|
}
|
||||||
|
|
||||||
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["revolveL"].(map[string]interface{}); !_ok_ { err = errors.New("revolveL error"); return }
|
||||||
|
var _x_, _y_, _z_ float32;
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
|
_v.RevolveL = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
|
}
|
||||||
|
|
||||||
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["sizeR"].(map[string]interface{}); !_ok_ { err = errors.New("sizeR error"); return }
|
||||||
|
var _x_, _y_, _z_ float32;
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
|
_v.SizeR = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
|
}
|
||||||
|
|
||||||
|
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["sizeL"].(map[string]interface{}); !_ok_ { err = errors.New("sizeL error"); return }
|
||||||
|
var _x_, _y_, _z_ float32;
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["z"].(float64); !_ok_ { err = errors.New("z error"); return }; _z_ = float32(_tempNum_) }
|
||||||
|
_v.SizeL = serialization.NewVector3(_x_, _y_, _z_)
|
||||||
}
|
}
|
||||||
|
|
||||||
{ var _ok_ bool; if _v.Perf, _ok_ = _buf["perf"].(string); !_ok_ { err = errors.New("perf error"); return } }
|
{ var _ok_ bool; if _v.Perf, _ok_ = _buf["perf"].(string); !_ok_ { err = errors.New("perf error"); return } }
|
||||||
|
@ -40,6 +40,7 @@ type GameHeroData struct {
|
|||||||
Enteranivalue int32
|
Enteranivalue int32
|
||||||
Camerainterval float32
|
Camerainterval float32
|
||||||
Equiprcom []string
|
Equiprcom []string
|
||||||
|
Angle int32
|
||||||
}
|
}
|
||||||
|
|
||||||
const TypeId_GameHeroData = 1513828672
|
const TypeId_GameHeroData = 1513828672
|
||||||
@ -123,6 +124,7 @@ func (_v *GameHeroData)Deserialize(_buf map[string]interface{}) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["angle"].(float64); !_ok_ { err = errors.New("angle error"); return }; _v.Angle = int32(_tempNum_) }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user