Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into meixiongfeng
This commit is contained in:
commit
834c6b106d
@ -533,11 +533,15 @@
|
||||
"GuildBoss_troop3": 60,
|
||||
"zhayantime": 5,
|
||||
"rotateAngle": 360,
|
||||
<<<<<<< HEAD
|
||||
"rotateDizzyTime": 1,
|
||||
"moonshopmoney": [
|
||||
10,
|
||||
20,
|
||||
30
|
||||
]
|
||||
=======
|
||||
"rotateDizzyTime": 1
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -6376,6 +6376,7 @@
|
||||
"key": "itemtipstxt_625001",
|
||||
"text": "阿宝的天赋点不足"
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
},
|
||||
{
|
||||
"id": "625002",
|
||||
@ -6420,5 +6421,7 @@
|
||||
"key": "itemtipstxt_625002",
|
||||
"text": "阿宝的天赋点不足"
|
||||
}
|
||||
=======
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
}
|
||||
]
|
@ -9,10 +9,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -35,10 +31,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -61,10 +53,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -87,10 +75,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -113,10 +97,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -139,10 +119,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -165,10 +141,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -191,10 +163,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -217,10 +185,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -243,10 +207,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -269,10 +229,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -295,10 +251,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -321,10 +273,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -347,10 +295,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -373,10 +317,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -399,10 +339,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -425,10 +361,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -451,10 +383,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -477,10 +405,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -503,10 +427,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -529,10 +449,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -555,10 +471,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -581,10 +493,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -607,10 +515,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -633,10 +537,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -659,10 +559,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -685,10 +581,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -711,10 +603,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -759,10 +647,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -785,10 +669,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -811,10 +691,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -837,10 +713,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -863,10 +735,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -889,10 +757,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -915,10 +779,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -941,10 +801,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -967,10 +823,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -993,10 +845,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1019,10 +867,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1045,10 +889,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1071,10 +911,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1097,10 +933,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1123,10 +955,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1149,10 +977,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1175,10 +999,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1201,10 +1021,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1293,10 +1109,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1319,10 +1131,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1345,10 +1153,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1371,10 +1175,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1397,10 +1197,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1423,10 +1219,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1449,10 +1241,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1475,10 +1263,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1501,10 +1285,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1527,10 +1307,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1553,10 +1329,6 @@
|
||||
{
|
||||
"key": 1,
|
||||
"param": 1
|
||||
},
|
||||
{
|
||||
"key": 2,
|
||||
"param": 1100101
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
|
@ -4,5 +4,5 @@ Website = "http://legu.cc"
|
||||
Icon = "app.png"
|
||||
Name = "RobotGUI"
|
||||
ID = "cc.legu.app"
|
||||
Version = "1.2.7"
|
||||
Build = 37
|
||||
Version = "1.2.8"
|
||||
Build = 38
|
||||
|
@ -97,6 +97,7 @@ const (
|
||||
TOOLBAR_PB = "protobuf"
|
||||
TOOLBAR_AUTO = "自动化"
|
||||
TOOLBAR_PING = "端口扫描"
|
||||
TOOLBAR_MGODB = "MongoDB"
|
||||
|
||||
TOOLBAR_PERF_TIP = "开始"
|
||||
TOOLBAR_PERF_CONF = "配置"
|
||||
|
@ -1,5 +1,7 @@
|
||||
package storage
|
||||
|
||||
import "go_dreamfactory/pb"
|
||||
|
||||
//默认配置
|
||||
func NewDefaultConfig() *Config {
|
||||
return &Config{
|
||||
@ -36,6 +38,17 @@ type Config struct {
|
||||
SyncConf *SyncConfig `json:"syncConf,omitempty"` //同步配置
|
||||
UpgradeUrl string `json:"upgradeUrl,omitempty"` //升级服务
|
||||
Servers []*ServerConfig `json:"servers,omitempty"` //区服配置
|
||||
MgoDB *MgoDB `json:"mgoDB,omitempty"` //MongoDB配置
|
||||
ServiceDBInfo *pb.ServiceDBInfo `json:"serviceDBInfo,omitempty"` //
|
||||
}
|
||||
|
||||
type MgoDB struct {
|
||||
Name string `json:"name,omitempty"` //
|
||||
Host string `json:"host,omitempty"`
|
||||
Port int32 `json:"port,omitempty"`
|
||||
User string `json:"user,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
Database string `json:"database,omitempty"`
|
||||
}
|
||||
|
||||
//压测配置
|
||||
|
@ -33,6 +33,7 @@ var (
|
||||
&appLock{},
|
||||
&appTerm{},
|
||||
&appPing{},
|
||||
&appMgo{},
|
||||
}
|
||||
|
||||
perfRegister = []appInterface{
|
||||
|
@ -103,12 +103,7 @@ var (
|
||||
ff(comm.ModulePagoda, "getlist"): &formview.PagodaListView{},
|
||||
// rtask
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeList): &formview.RtaskListView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeApply): &formview.RtaskDoitView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeChoose): &formview.RtaskChooseView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeReward): &formview.RtaskRewardView{},
|
||||
ff(comm.ModuleRtask, "rtest"): &formview.RtaskTestView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleStart): &formview.RtaskBattlestartView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish): &formview.RtaskBattleFinishView{},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord): &formview.RtaskRecordView{},
|
||||
// linestory
|
||||
ff(comm.ModuleLinestory, linestory.LinestorySubTypeChapter): &formview.LinestoryMineView{},
|
||||
@ -227,12 +222,6 @@ var (
|
||||
},
|
||||
"rtask": {
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeList),
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeApply),
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeChoose),
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeReward),
|
||||
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleStart),
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish),
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord),
|
||||
ff(comm.ModuleRtask, "rtest"),
|
||||
},
|
||||
@ -770,41 +759,6 @@ var (
|
||||
return ""
|
||||
},
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeApply): {
|
||||
NavLabel: "做任务",
|
||||
Desc: "执行随机任务",
|
||||
MainType: string(comm.ModuleRtask),
|
||||
SubType: rtask.RtaskSubTypeApply,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeChoose): {
|
||||
NavLabel: "情景对答",
|
||||
Desc: "情景对答",
|
||||
MainType: string(comm.ModuleRtask),
|
||||
SubType: rtask.RtaskSubTypeChoose,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeReward): {
|
||||
NavLabel: "领奖",
|
||||
Desc: "领奖",
|
||||
MainType: string(comm.ModuleRtask),
|
||||
SubType: rtask.RtaskSubTypeReward,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleStart): {
|
||||
NavLabel: "战斗开始",
|
||||
Desc: "战斗开始",
|
||||
MainType: string(comm.ModuleRtask),
|
||||
SubType: rtask.RtaskSubTypeBattleStart,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish): {
|
||||
NavLabel: "战斗结束",
|
||||
Desc: "战斗结束",
|
||||
MainType: string(comm.ModuleRtask),
|
||||
SubType: rtask.RtaskSubTypeBattleFinish,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord): {
|
||||
NavLabel: "任务数据",
|
||||
Desc: "任务数据",
|
||||
|
246
cmd/v2/ui/tool_mgo.go
Normal file
246
cmd/v2/ui/tool_mgo.go
Normal file
@ -0,0 +1,246 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"go_dreamfactory/cmd/v2/lib/common"
|
||||
os_storage "go_dreamfactory/cmd/v2/lib/storage"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/cmd/v2/service/observer"
|
||||
"go_dreamfactory/pb"
|
||||
"strings"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/layout"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
)
|
||||
|
||||
type appMgo struct {
|
||||
appAdapter
|
||||
conf *os_storage.Config
|
||||
storage os_storage.Storage
|
||||
db *mongo.Database
|
||||
client *mongo.Client
|
||||
scriptEntry *widget.Entry
|
||||
}
|
||||
|
||||
func (this *appMgo) LazyInit(ptService service.PttService, obs observer.Observer) error {
|
||||
this.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_MGODB, theme.DownloadIcon(), nil)
|
||||
content := container.NewMax()
|
||||
content.Objects = []fyne.CanvasObject{}
|
||||
|
||||
this.scriptEntry = widget.NewMultiLineEntry()
|
||||
|
||||
connWinBtn := widget.NewButton("连接设置", this.showConWin)
|
||||
openConnBtn := widget.NewButton("打开连接", this.openConn)
|
||||
closeConnBtn := widget.NewButton("关闭连接", this.closeConn)
|
||||
createServerConfBtn := widget.NewButton("创建服务配置", this.createServerConf)
|
||||
btns := container.NewHBox(connWinBtn, openConnBtn, createServerConfBtn, layout.NewSpacer(), closeConnBtn)
|
||||
content.Objects = append(content.Objects, container.NewBorder(btns, nil, nil, nil, this.scriptEntry))
|
||||
this.tabItem.Content = content
|
||||
this.storage, _ = os_storage.NewOSStorage()
|
||||
var err error
|
||||
this.conf, err = this.storage.LoadConfig()
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *appMgo) openConn() {
|
||||
if this.conf.MgoDB == nil {
|
||||
dialog.ShowError(errors.New("MgoDB没有配置"), toolWin.w)
|
||||
return
|
||||
}
|
||||
var option *options.ClientOptions
|
||||
if (this.conf.MgoDB.User == "" && this.conf.MgoDB.Password == "") &&
|
||||
this.conf.MgoDB.Host != "" && this.conf.MgoDB.Port != 0 && this.conf.MgoDB.Database != "" {
|
||||
option = options.Client().ApplyURI(fmt.Sprintf("mongodb://%s:%d", this.conf.MgoDB.Host, this.conf.MgoDB.Port))
|
||||
} else {
|
||||
option = options.Client().ApplyURI(fmt.Sprintf("mongodb://%s:%s@%s:%d", this.conf.MgoDB.User, this.conf.MgoDB.Password,
|
||||
this.conf.MgoDB.Host, this.conf.MgoDB.Port))
|
||||
}
|
||||
client, err := mongo.Connect(context.TODO(), option)
|
||||
if err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
if err2 := client.Ping(context.TODO(), nil); err2 != nil {
|
||||
logrus.Error("Mongo连接失败", err2)
|
||||
return
|
||||
}
|
||||
this.db = client.Database(this.conf.MgoDB.Database)
|
||||
|
||||
this.scriptEntry.Text = this.db.Name() + " 连接成功"
|
||||
this.scriptEntry.Refresh()
|
||||
}
|
||||
|
||||
func (this *appMgo) closeConn() {
|
||||
if this.db != nil {
|
||||
if err := this.db.Client().Disconnect(context.TODO()); err != nil {
|
||||
this.scriptEntry.Text = "连接关闭失败"
|
||||
} else {
|
||||
this.scriptEntry.Text = "连接关闭成功"
|
||||
}
|
||||
this.scriptEntry.Refresh()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *appMgo) createServerConf() {
|
||||
serverId := widget.NewEntry()
|
||||
serverName := widget.NewEntry()
|
||||
owner := widget.NewEntry()
|
||||
cross := widget.NewEntry()
|
||||
crossId := widget.NewEntry()
|
||||
singleserver := widget.NewEntry()
|
||||
opentime := widget.NewEntry()
|
||||
redisIsCluster := widget.NewEntry()
|
||||
redisAddr := widget.NewEntry()
|
||||
redisPassword := widget.NewEntry()
|
||||
redisDb := widget.NewEntry()
|
||||
mongoUrl := widget.NewEntry()
|
||||
mongoDatabase := widget.NewEntry()
|
||||
|
||||
form := widget.NewForm(
|
||||
widget.NewFormItem("serverid", serverId),
|
||||
widget.NewFormItem("serverName", serverName),
|
||||
widget.NewFormItem("owner", owner),
|
||||
widget.NewFormItem("cross", cross),
|
||||
widget.NewFormItem("crossId", crossId),
|
||||
widget.NewFormItem("singleserver", singleserver),
|
||||
widget.NewFormItem("opentime", opentime),
|
||||
widget.NewFormItem("redisIsCluster", redisIsCluster),
|
||||
widget.NewFormItem("redisAddr", redisAddr),
|
||||
widget.NewFormItem("redisPassword", redisPassword),
|
||||
widget.NewFormItem("redisDb", redisDb),
|
||||
widget.NewFormItem("mongoUrl", mongoUrl),
|
||||
widget.NewFormItem("mongoDatabase", mongoDatabase),
|
||||
)
|
||||
|
||||
if this.conf.ServiceDBInfo != nil {
|
||||
serverId.Text = this.conf.ServiceDBInfo.Serverid
|
||||
serverName.Text = this.conf.ServiceDBInfo.ServerName
|
||||
owner.Text = this.conf.ServiceDBInfo.Owner
|
||||
cross.Text = this.conf.ServiceDBInfo.Cross
|
||||
crossId.Text = this.conf.ServiceDBInfo.CrossId
|
||||
singleserver.Text = this.conf.ServiceDBInfo.Singleserver
|
||||
opentime.Text = cast.ToString(this.conf.ServiceDBInfo.Opentime)
|
||||
redisIsCluster.Text = cast.ToString(this.conf.ServiceDBInfo.RedisIsCluster)
|
||||
redisAddr.Text = strings.Join(this.conf.ServiceDBInfo.RedisAddr, ",")
|
||||
redisPassword.Text = this.conf.ServiceDBInfo.RedisPassword
|
||||
redisDb.Text = cast.ToString(this.conf.ServiceDBInfo.RedisDb)
|
||||
mongoUrl.Text = this.conf.ServiceDBInfo.MongodbUrl
|
||||
mongoDatabase.Text = this.conf.ServiceDBInfo.MongodbDatabase
|
||||
}
|
||||
|
||||
subBtn := widget.NewButton("保存", func() {
|
||||
this.conf.ServiceDBInfo = &pb.ServiceDBInfo{
|
||||
Serverid: serverId.Text,
|
||||
ServerName: serverName.Text,
|
||||
Owner: owner.Text,
|
||||
Cross: cross.Text,
|
||||
CrossId: crossId.Text,
|
||||
Singleserver: singleserver.Text,
|
||||
Opentime: cast.ToInt64(opentime.Text),
|
||||
RedisIsCluster: cast.ToBool(redisIsCluster.Text),
|
||||
RedisAddr: strings.Split(redisAddr.Text, ","),
|
||||
RedisPassword: redisPassword.Text,
|
||||
RedisDb: cast.ToInt32(redisDb.Text),
|
||||
MongodbUrl: mongoUrl.Text,
|
||||
MongodbDatabase: mongoDatabase.Text,
|
||||
}
|
||||
if err := this.storage.StoreConfig(this.conf); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
})
|
||||
subBtn.Importance = widget.HighImportance
|
||||
|
||||
execBtn := widget.NewButton("插入", func() {
|
||||
if this.db == nil {
|
||||
common.ShowTip("请先打开连接")
|
||||
return
|
||||
}
|
||||
c := this.db.Collection("serverdata")
|
||||
if _, err := c.InsertOne(context.TODO(), this.conf.ServiceDBInfo); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.scriptEntry.Text = "插入成功"
|
||||
this.scriptEntry.Refresh()
|
||||
})
|
||||
dconf := dialog.NewCustom("配置", "关闭", container.NewVBox(form, container.NewHBox(layout.NewSpacer(), subBtn, execBtn)), toolWin.w)
|
||||
dconf.Resize(fyne.NewSize(400, 600))
|
||||
dconf.Show()
|
||||
|
||||
}
|
||||
|
||||
func (this *appMgo) showConWin() {
|
||||
|
||||
connName := widget.NewEntry()
|
||||
|
||||
address := widget.NewEntry()
|
||||
|
||||
port := widget.NewEntry()
|
||||
|
||||
user := widget.NewEntry()
|
||||
password := widget.NewPasswordEntry()
|
||||
|
||||
database := widget.NewEntry()
|
||||
|
||||
form := widget.NewForm(
|
||||
widget.NewFormItem("Name", connName),
|
||||
widget.NewFormItem("Address", container.NewBorder(nil, nil, nil, port, address)),
|
||||
widget.NewFormItem("User", user),
|
||||
widget.NewFormItem("Password", password),
|
||||
widget.NewFormItem("Database", database),
|
||||
)
|
||||
|
||||
if this.conf.MgoDB != nil {
|
||||
connName.Text = this.conf.MgoDB.Name
|
||||
address.Text = this.conf.MgoDB.Host
|
||||
port.Text = cast.ToString(this.conf.MgoDB.Port)
|
||||
user.Text = this.conf.MgoDB.User
|
||||
password.Text = this.conf.MgoDB.Password
|
||||
database.Text = this.conf.MgoDB.Database
|
||||
}
|
||||
form.OnSubmit = func() {
|
||||
this.conf.MgoDB = &os_storage.MgoDB{
|
||||
Name: connName.Text,
|
||||
Host: address.Text,
|
||||
Port: cast.ToInt32(port.Text),
|
||||
User: user.Text,
|
||||
Password: password.Text,
|
||||
Database: database.Text,
|
||||
}
|
||||
|
||||
if connName.Text == "" || address.Text == "" || port.Text == "" {
|
||||
common.ShowTip("请填写完整")
|
||||
return
|
||||
}
|
||||
if err := this.storage.StoreConfig(this.conf); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
}
|
||||
dialog.ShowInformation("提示", "保存成功", toolWin.w)
|
||||
}
|
||||
form.SubmitText = "保存"
|
||||
|
||||
dconf := dialog.NewCustom("设置链接", "关闭", form, toolWin.w)
|
||||
dconf.Resize(fyne.NewSize(400, 200))
|
||||
dconf.Show()
|
||||
}
|
||||
|
||||
func (a *appMgo) GetAppName() string {
|
||||
return common.TOOLBAR_MGODB
|
||||
}
|
@ -56,6 +56,9 @@ func NewToolWindow(ui *UIImpl, parent fyne.Window) ToolWindow {
|
||||
widget.NewToolbarAction(theme.ComputerIcon(), func() {
|
||||
openApp2(mw.at, common.TOOLBAR_PING)
|
||||
}),
|
||||
widget.NewToolbarAction(theme.SettingsIcon(), func() {
|
||||
openApp2(mw.at, common.TOOLBAR_MGODB)
|
||||
}),
|
||||
|
||||
widget.NewToolbarSpacer(),
|
||||
widget.NewToolbarAction(theme.HelpIcon(), func() {
|
||||
|
@ -1,44 +0,0 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type RtaskDoitView struct {
|
||||
BaseformView
|
||||
}
|
||||
|
||||
func (this *RtaskDoitView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
taskId := widget.NewEntry()
|
||||
taskId.PlaceHolder = "任务ID"
|
||||
|
||||
subTaskId := widget.NewEntry()
|
||||
subTaskId.PlaceHolder = "支线任务ID"
|
||||
|
||||
this.form.AppendItem(widget.NewFormItem("任务ID", taskId))
|
||||
this.form.AppendItem(widget.NewFormItem("支线任务ID", subTaskId))
|
||||
|
||||
this.form.OnSubmit = func() {
|
||||
if taskId.Text == "" {
|
||||
dialog.ShowError(errors.New("请填写任务ID"), this.w)
|
||||
return
|
||||
}
|
||||
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.RtaskApplyReq{
|
||||
RtaskId: cast.ToInt32(taskId.Text),
|
||||
RtaskSubId: cast.ToInt32(subTaskId.Text),
|
||||
}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
return this.form
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type RtaskBattleFinishView struct {
|
||||
BaseformView
|
||||
}
|
||||
|
||||
func (this *RtaskBattleFinishView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
taskId := widget.NewEntry()
|
||||
|
||||
this.form.AppendItem(widget.NewFormItem("任务ID", taskId))
|
||||
|
||||
this.form.OnSubmit = func() {
|
||||
if err := service.GetPttService().SendToClient(t.MainType, t.SubType,
|
||||
&pb.RtaskBattleFinishReq{
|
||||
RtaskId: cast.ToInt32(taskId.Text),
|
||||
}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
return this.form
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/pb"
|
||||
"strings"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type RtaskBattlestartView struct {
|
||||
BaseformView
|
||||
}
|
||||
|
||||
func (this *RtaskBattlestartView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
confId := widget.NewEntry()
|
||||
|
||||
leadpos := widget.NewEntry()
|
||||
|
||||
teamIds := widget.NewEntry()
|
||||
teamIds.PlaceHolder = ",号分隔"
|
||||
|
||||
this.form.AppendItem(widget.NewFormItem("关卡ID", confId))
|
||||
this.form.AppendItem(widget.NewFormItem("队长位置", leadpos))
|
||||
this.form.AppendItem(widget.NewFormItem("阵容信息", teamIds))
|
||||
|
||||
this.form.OnSubmit = func() {
|
||||
if err := service.GetPttService().SendToClient(t.MainType, t.SubType,
|
||||
|
||||
&pb.RtaskBattleStartReq{
|
||||
BattleConfId: cast.ToInt32(confId.Text),
|
||||
Leadpos: cast.ToInt32(leadpos.Text),
|
||||
Teamids: strings.Split(teamIds.Text, ","),
|
||||
}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
return this.form
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type RtaskChooseView struct {
|
||||
BaseformView
|
||||
}
|
||||
|
||||
func (this *RtaskChooseView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
taskId := widget.NewEntry()
|
||||
taskId.PlaceHolder = "任务ID"
|
||||
|
||||
subTaskId := widget.NewEntry()
|
||||
subTaskId.PlaceHolder = "支线任务ID"
|
||||
|
||||
chooseId := widget.NewEntry()
|
||||
chooseId.PlaceHolder = "选项ID"
|
||||
|
||||
this.form.AppendItem(widget.NewFormItem("任务ID", taskId))
|
||||
this.form.AppendItem(widget.NewFormItem("支线任务ID", subTaskId))
|
||||
this.form.AppendItem(widget.NewFormItem("选项ID", chooseId))
|
||||
|
||||
this.form.OnSubmit = func() {
|
||||
if taskId.Text == "" {
|
||||
dialog.ShowError(errors.New("请填写任务ID"), this.w)
|
||||
return
|
||||
}
|
||||
if chooseId.Text == "" {
|
||||
dialog.ShowError(errors.New("请填写选项ID"), this.w)
|
||||
return
|
||||
}
|
||||
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.RtaskChooseReq{
|
||||
RtaskId: cast.ToInt32(taskId.Text),
|
||||
RtaskSubId: cast.ToInt32(subTaskId.Text),
|
||||
ChooseId: cast.ToInt32(chooseId.Text),
|
||||
}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
return this.form
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package formview
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"go_dreamfactory/cmd/v2/model"
|
||||
"go_dreamfactory/cmd/v2/service"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cast"
|
||||
)
|
||||
|
||||
type RtaskRewardView struct {
|
||||
BaseformView
|
||||
}
|
||||
|
||||
func (this *RtaskRewardView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
taskId := widget.NewEntry()
|
||||
taskId.PlaceHolder = "任务ID"
|
||||
|
||||
this.form.AppendItem(widget.NewFormItem("任务ID", taskId))
|
||||
this.form.OnSubmit = func() {
|
||||
if taskId.Text == "" {
|
||||
dialog.ShowError(errors.New("请填写任务ID"), this.w)
|
||||
return
|
||||
}
|
||||
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.RtaskGetRewardReq{
|
||||
RtaskId: cast.ToInt32(taskId.Text),
|
||||
}); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
}
|
||||
return this.form
|
||||
}
|
@ -78,7 +78,6 @@ const (
|
||||
ModuleEnchant core.M_Modules = "enchant" //附魔
|
||||
ModuleAutoBattle core.M_Modules = "autobattle" //自动战斗
|
||||
ModuleMline core.M_Modules = "mline" //主线模块
|
||||
ModuleRTimePVP core.M_Modules = "rtimepvp" //实时pvp
|
||||
)
|
||||
|
||||
//数据表名定义处
|
||||
@ -562,6 +561,10 @@ const (
|
||||
Rtype155 TaskType = 155 //调整助战英雄n次
|
||||
Rtype156 TaskType = 156 //完成工会任务n次
|
||||
Rtype157 TaskType = 157 //战斗在xx系统中完成xx事件
|
||||
Rtype158 TaskType = 158 //主线第X章关卡总星数达到N星
|
||||
Rtype159 TaskType = 159 //主线第X章关卡全部达到三星
|
||||
Rtype160 TaskType = 160 //主线总星数达到X星
|
||||
Rtype161 TaskType = 161 //在自动战斗过程中完成另一场战斗
|
||||
)
|
||||
|
||||
const (
|
||||
|
12
go.mod
12
go.mod
@ -9,7 +9,6 @@ require (
|
||||
github.com/Pallinder/go-randomdata v1.2.0
|
||||
github.com/atotto/clipboard v0.1.4
|
||||
github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394
|
||||
github.com/boltdb/bolt v1.3.1
|
||||
github.com/gin-gonic/gin v1.8.1
|
||||
github.com/go-playground/validator/v10 v10.10.1
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
@ -30,13 +29,11 @@ require (
|
||||
github.com/spf13/cast v1.5.0
|
||||
github.com/spf13/cobra v1.5.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.12.0
|
||||
github.com/tidwall/gjson v1.14.1
|
||||
github.com/ugorji/go/codec v1.2.7
|
||||
github.com/valyala/fastrand v1.1.0
|
||||
go.mongodb.org/mongo-driver v1.5.1
|
||||
go.uber.org/multierr v1.6.0
|
||||
golang.design/x/hotkey v0.4.0
|
||||
golang.org/x/net v0.2.0
|
||||
google.golang.org/grpc v1.46.2
|
||||
google.golang.org/protobuf v1.28.0
|
||||
@ -85,7 +82,7 @@ require (
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/go-ping/ping v0.0.0-20211130115550-779d1e919534 // indirect
|
||||
github.com/go-ping/ping v0.0.0-20211130115550-779d1e919534
|
||||
github.com/go-playground/locales v0.14.0 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.0 // indirect
|
||||
github.com/go-redis/redis_rate/v9 v9.1.2 // indirect
|
||||
@ -107,7 +104,6 @@ require (
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/serf v0.9.7 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
|
||||
@ -122,7 +118,6 @@ require (
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/lucas-clemente/quic-go v0.27.0 // indirect
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
|
||||
github.com/marten-seemann/qtls-go1-17 v0.1.1 // indirect
|
||||
github.com/marten-seemann/qtls-go1-18 v0.1.1 // indirect
|
||||
@ -135,7 +130,6 @@ require (
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/philhofer/fwd v1.1.1 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
@ -150,12 +144,9 @@ require (
|
||||
github.com/smallnest/quick v0.0.0-20220103065406-780def6371e6 // indirect
|
||||
github.com/smartystreets/goconvey v1.7.2
|
||||
github.com/soheilhy/cmux v0.1.5 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 // indirect
|
||||
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 // indirect
|
||||
github.com/stretchr/testify v1.8.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.0 // indirect
|
||||
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
|
||||
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
|
||||
github.com/tevino/abool v1.2.0 // indirect
|
||||
@ -187,7 +178,6 @@ require (
|
||||
golang.org/x/sys v0.2.0 // indirect
|
||||
golang.org/x/text v0.4.0
|
||||
golang.org/x/tools v0.3.0 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
|
33
go.sum
33
go.sum
@ -5,7 +5,6 @@ cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgo
|
||||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
@ -18,7 +17,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
||||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
||||
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
|
||||
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
|
||||
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
|
||||
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
|
||||
@ -40,7 +38,6 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
|
||||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
|
||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
|
||||
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
|
||||
@ -98,8 +95,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
|
||||
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
|
||||
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
@ -330,7 +325,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
@ -343,7 +337,6 @@ github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk
|
||||
github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20211219123610-ec9572f70e60/go.mod h1:cz9oNYuRUWGdHmLF2IodMLkAhcPtXeULvcBNagUrxTI=
|
||||
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
|
||||
@ -401,7 +394,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
|
||||
@ -490,8 +482,6 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
|
||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
@ -590,8 +580,6 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
|
||||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw=
|
||||
github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI=
|
||||
github.com/peterbourgon/g2s v0.0.0-20140925154142-ec76db4c1ac1 h1:5Dl+ADmsGerAqHwWzyLqkNaUBQ+48DQwfDCaW1gHAQM=
|
||||
@ -604,7 +592,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
|
||||
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
|
||||
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
@ -713,8 +700,6 @@ github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
@ -722,14 +707,11 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3
|
||||
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
|
||||
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
|
||||
github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
|
||||
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
|
||||
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
|
||||
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 h1:HunZiaEKNGVdhTRQOVpMmj5MQnGnv+e8uZNu3xFLgyM=
|
||||
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564/go.mod h1:afMbS0qvv1m5tfENCwnOdZGOF8RGR/FsZ7bvBxQGZG4=
|
||||
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 h1:m59mIOBO4kfcNCEzJNy71UkeF4XIx2EVmL9KLwDQdmM=
|
||||
@ -750,8 +732,6 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs=
|
||||
github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo=
|
||||
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
|
||||
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 h1:89CEmDvlq/F7SJEOqkIdNDGJXrQIhuIx9D2DBXjavSU=
|
||||
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161/go.mod h1:wM7WEvslTq+iOEAMDLSzhVuOt5BRZ05WirO+b09GHQU=
|
||||
@ -845,9 +825,6 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
golang.design/x/hotkey v0.4.0 h1:jmY6QJdakEdYn0KBm48IZRw3emBpDXRhIWUHqPVsWBY=
|
||||
golang.design/x/hotkey v0.4.0/go.mod h1:M8SGcwFYHnKRa83FpTFQoZvPO5vVT+kWPztFqTQKmXA=
|
||||
golang.design/x/mainthread v0.3.0 h1:UwFus0lcPodNpMOGoQMe87jSFwbSsEY//CA7yVmu4j8=
|
||||
golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
@ -865,10 +842,8 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220408190544-5352b0902921/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
|
||||
@ -960,7 +935,6 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
@ -1062,7 +1036,6 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -1071,7 +1044,6 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@ -1167,7 +1139,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
@ -1255,9 +1226,7 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D
|
||||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
@ -1318,8 +1287,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI=
|
||||
gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
|
@ -35,6 +35,7 @@ type LogFileOut struct {
|
||||
MaxBackups int `json:"maxbackups" yaml:"maxbackups"` //备份日志的最大数量
|
||||
LocalTime bool `json:"localtime" yaml:"localtime"` //是使用本地时间还是使用世界标准时间
|
||||
Compress bool `json:"compress" yaml:"compress"` //是否压缩备份日志
|
||||
UniqueLog bool `json:"uniquelog" yaml:"uniquelog"` //是否唯一日志文件
|
||||
size int64
|
||||
ctime time.Time
|
||||
file *os.File
|
||||
@ -79,31 +80,42 @@ func (l *LogFileOut) Write(p []byte) (n int, err error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
func (l *LogFileOut) openExistingOrNew(writeLen int) error {
|
||||
l.mill()
|
||||
func (this *LogFileOut) openExistingOrNew(writeLen int) error {
|
||||
this.mill()
|
||||
|
||||
filename := l.filename()
|
||||
filename := this.filename()
|
||||
info, err := osStat(filename)
|
||||
if os.IsNotExist(err) {
|
||||
return l.openNew()
|
||||
return this.openNew()
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("error getting log file info: %s", err)
|
||||
}
|
||||
|
||||
//校验是否需要切割日志
|
||||
if info.Size()+int64(writeLen) >= l.max() || (!l.ctime.IsZero() && time.Since(l.ctime) > l.CupTime) {
|
||||
return l.rotate()
|
||||
if !this.UniqueLog && (info.Size()+int64(writeLen) >= this.max() || (!this.ctime.IsZero() && time.Since(this.ctime) > this.CupTime)) {
|
||||
return this.rotate()
|
||||
}
|
||||
|
||||
file, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
|
||||
mode := os.FileMode(0666)
|
||||
if !this.UniqueLog {
|
||||
file, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, mode)
|
||||
if err != nil {
|
||||
// if we fail to open the old log file for some reason, just ignore
|
||||
// it and open a new log file.
|
||||
return l.openNew()
|
||||
return this.openNew()
|
||||
}
|
||||
this.file = file
|
||||
this.size = info.Size()
|
||||
} else {
|
||||
//最佳写入
|
||||
f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, mode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't open new logfile: %s", err)
|
||||
}
|
||||
this.file = f
|
||||
this.size = 0
|
||||
this.ctime = currentTime()
|
||||
}
|
||||
l.file = file
|
||||
l.size = info.Size()
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -210,21 +222,21 @@ func (l *LogFileOut) mill() {
|
||||
}
|
||||
|
||||
//备份老的日志文件创建新的日志文件
|
||||
func (l *LogFileOut) openNew() error {
|
||||
err := os.MkdirAll(l.dir(), 0755)
|
||||
func (this *LogFileOut) openNew() error {
|
||||
err := os.MkdirAll(this.dir(), 0755)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't make directories for new logfile: %s", err)
|
||||
}
|
||||
|
||||
name := l.filename()
|
||||
name := this.filename()
|
||||
mode := os.FileMode(0666)
|
||||
info, err := osStat(name)
|
||||
//备份老的日志文件
|
||||
if err == nil {
|
||||
if !this.UniqueLog && err == nil {
|
||||
// Copy the mode off the old logfile.
|
||||
mode = info.Mode()
|
||||
// move the existing file
|
||||
newname := backupName(name, l.LocalTime)
|
||||
newname := backupName(name, this.LocalTime)
|
||||
if err := os.Rename(name, newname); err != nil {
|
||||
return fmt.Errorf("can't rename log file: %s", err)
|
||||
}
|
||||
@ -235,14 +247,25 @@ func (l *LogFileOut) openNew() error {
|
||||
}
|
||||
}
|
||||
|
||||
if !this.UniqueLog {
|
||||
//创建新的日志文件
|
||||
f, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, mode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't open new logfile: %s", err)
|
||||
}
|
||||
l.file = f
|
||||
l.size = 0
|
||||
l.ctime = currentTime()
|
||||
this.file = f
|
||||
this.size = 0
|
||||
this.ctime = currentTime()
|
||||
} else {
|
||||
//最佳写入
|
||||
f, err := os.OpenFile(name, os.O_APPEND|os.O_CREATE|os.O_WRONLY, mode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't open new logfile: %s", err)
|
||||
}
|
||||
this.file = f
|
||||
this.size = 0
|
||||
this.ctime = currentTime()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ func newSys(options *Options) (sys *Logger, err error) {
|
||||
MaxBackups: options.MaxBackups, //最大备份数
|
||||
MaxSize: options.MaxSize, //最大日志文件大小
|
||||
LocalTime: true, //使用本地时间
|
||||
UniqueLog: options.UniqueLog, //是否唯一文件
|
||||
}
|
||||
if !options.IsDebug {
|
||||
if err = hook.openNew(); err != nil {
|
||||
|
@ -22,6 +22,7 @@ type Options struct {
|
||||
ReportCaller Loglevel //是否输出堆栈信息
|
||||
CallerSkip int //堆栈深度
|
||||
Encoder LogEncoder //日志输出样式
|
||||
UniqueLog bool //唯一日志文件(文件不分割 不备份,一直追加日志)
|
||||
CupTimeTime int //日志分割时间 单位 小时
|
||||
MaxAgeTime int //日志最大保存时间 单位天
|
||||
MaxBackups int //最大备份日志个数
|
||||
@ -75,6 +76,13 @@ func SetEncoder(v LogEncoder) Option {
|
||||
}
|
||||
}
|
||||
|
||||
///设置唯一日志
|
||||
func SetUniqueLog(v bool) Option {
|
||||
return func(o *Options) {
|
||||
o.UniqueLog = v
|
||||
}
|
||||
}
|
||||
|
||||
///日志分割时间 单位 小时
|
||||
func SetRotationTime(v int) Option {
|
||||
return func(o *Options) {
|
||||
|
@ -482,7 +482,9 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt
|
||||
NormalSkill: hero.NormalSkill,
|
||||
Property: hero.Property,
|
||||
Isboos: v.IsBoss,
|
||||
Monsterid: v.Monster,
|
||||
}
|
||||
|
||||
for i, v := range roles[i].NormalSkill {
|
||||
if i == 0 {
|
||||
v.SkillLv = monst.Skill1
|
||||
|
@ -313,6 +313,9 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) {
|
||||
return
|
||||
}
|
||||
} else { //跨集群调用
|
||||
if msg.ServicePath != "" { //客户端是否制定目标服务器 /wroker/woker0
|
||||
servicePath = msg.ServicePath
|
||||
}
|
||||
if err = this.gateway.Service().AcrossClusterRpcCall(context.Background(), serviceTag, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil {
|
||||
this.gateway.Error("[UserResponse]",
|
||||
log.Field{Key: "uid", Value: this.uId},
|
||||
|
@ -29,7 +29,7 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
cfgDraw *cfg.GameGlobalData
|
||||
costAtn *cfg.Gameatn
|
||||
heroRecord *pb.DBHeroRecord
|
||||
pool string
|
||||
pool string // 当前抽对应的卡池
|
||||
_mapAddHero map[string]int32
|
||||
strPool []string // 10连跨多个卡池情况
|
||||
update map[string]interface{}
|
||||
@ -65,8 +65,9 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
}
|
||||
|
||||
for i := 0; i < int(req.DrawCount); i++ {
|
||||
pool = this.module.modelHero.CheckPool(drawCount, cfgDraw)
|
||||
drawCount += 1
|
||||
pool = this.module.modelHero.CheckPool(drawCount, cfgDraw)
|
||||
|
||||
strPool = append(strPool, pool)
|
||||
ret := this.module.CheckCondition(session.GetUserId())
|
||||
if ret == true { // 命中插入5星英雄
|
||||
@ -128,7 +129,56 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inRangeConf1 := this.module.configure.GetGlobalConf().DrawCard5StarsInRange1
|
||||
if len(inRangeConf1) == 3 {
|
||||
iStart := inRangeConf1[0] // 抽卡开始
|
||||
iEnd := inRangeConf1[1] // 抽卡结束
|
||||
star := inRangeConf1[2]
|
||||
if star >= 3 { // 保底必须三星+
|
||||
if heroRecord.Inevitable == 0 && heroRecord.Drawcount > iStart && heroRecord.Drawcount < iEnd && iEnd >= iStart {
|
||||
n, _ := rand.Int(rand.Reader, big.NewInt(int64(iEnd-iStart)))
|
||||
if n.Int64() < 1 { // 抽中
|
||||
starIndex = star
|
||||
heroRecord.Inevitable = heroRecord.Drawcount
|
||||
update["inevitable1"] = heroRecord.Drawcount
|
||||
szStar = append(szStar, star)
|
||||
if star == 4 {
|
||||
heroRecord.Star4 = 0
|
||||
star4Max++
|
||||
} else if star == 5 {
|
||||
star5Max++
|
||||
heroRecord.Star5 = 0
|
||||
}
|
||||
// 修改卡池
|
||||
newPoll := this.module.configure.GetGlobalConf().DrawCard5StarsInRange1Pool
|
||||
if newPoll != "" {
|
||||
strPool[len(strPool)-1] = newPoll
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
// 保底情况
|
||||
if heroRecord.Drawcount == iEnd && heroRecord.Inevitable == 0 {
|
||||
starIndex = star
|
||||
heroRecord.Inevitable1 = heroRecord.Drawcount
|
||||
update["inevitable1"] = heroRecord.Drawcount
|
||||
szStar = append(szStar, star)
|
||||
if star == 4 {
|
||||
heroRecord.Star4 = 0
|
||||
star4Max++
|
||||
} else if star == 5 {
|
||||
star5Max++
|
||||
heroRecord.Star5 = 0
|
||||
}
|
||||
// 修改卡池
|
||||
newPoll := this.module.configure.GetGlobalConf().DrawCard5StarsInRange1Pool
|
||||
if newPoll != "" {
|
||||
strPool[len(strPool)-1] = newPoll
|
||||
}
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
heroRecord.Star4++ // 4星保底数量+1
|
||||
heroRecord.Star5++ // 5星保底数量+1
|
||||
if starIndex == 1 {
|
||||
|
@ -25,7 +25,7 @@ func (this *apiComp) GetSpecified(session comm.IUserSession, req *pb.HeroGetSpec
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
hero, err := this.module.modelHero.createOneHero(session.GetUserId(), req.HeroCoinfigID)
|
||||
hero, err := this.module.modelHero.createSpecialHero(session.GetUserId(), req.HeroCoinfigID)
|
||||
if err == nil {
|
||||
code = pb.ErrorCode_HeroNoExist
|
||||
}
|
||||
|
@ -18,7 +18,9 @@ import (
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/sys/db"
|
||||
"go_dreamfactory/utils"
|
||||
"os"
|
||||
"reflect"
|
||||
"runtime/trace"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@ -71,6 +73,26 @@ func GetMonthStartEnd() (int64, int64) {
|
||||
}
|
||||
func Test_Main(t *testing.T) {
|
||||
|
||||
sz := make([]string, 0)
|
||||
for i := 0; i < 10; i++ {
|
||||
sz = append(sz, "1")
|
||||
}
|
||||
sz[len(sz)-1] = "xxxx"
|
||||
//创建trace文件
|
||||
f, err := os.Create("trace.out")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
defer f.Close()
|
||||
|
||||
//启动trace goroutine
|
||||
err = trace.Start(f)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer trace.Stop()
|
||||
|
||||
var star1, star2, star3 int32
|
||||
var rst int32
|
||||
star1 = 1 << 0
|
||||
|
@ -96,7 +96,14 @@ func (this *ModelHero) initHeroSkill(hero *pb.DBHero) []*pb.SkillData {
|
||||
}
|
||||
|
||||
//创建一个指定的英雄
|
||||
func (this *ModelHero) createOneHero(uid string, heroCfgId string) (hero *pb.DBHero, err error) {
|
||||
func (this *ModelHero) createSpecialHero(uid string, heroCfgId string) (hero *pb.DBHero, err error) {
|
||||
list := this.getHeroList(uid)
|
||||
for _, v := range list {
|
||||
if v.HeroID == heroCfgId {
|
||||
hero = v
|
||||
return
|
||||
}
|
||||
}
|
||||
hero = this.InitHero(uid, heroCfgId)
|
||||
if hero != nil {
|
||||
if err = this.AddList(uid, hero.Id, hero); err != nil {
|
||||
@ -135,7 +142,7 @@ func (this *ModelHero) initHeroOverlying(uid string, heroCfgId string, count int
|
||||
)
|
||||
hero = this.InitHero(uid, heroCfgId)
|
||||
if hero != nil {
|
||||
hero.SameCount = count
|
||||
hero.SameCount = 1 // 新需求 不需要判断叠加
|
||||
if this.moduleHero.IsCross() {
|
||||
if model, err = this.moduleHero.GetDBModuleByUid(uid, this.TableName, this.Expired); err != nil {
|
||||
this.moduleHero.Errorln(err)
|
||||
@ -171,8 +178,11 @@ func (this *ModelHero) createHeroOverlying(uid string, heroCfgId string, count i
|
||||
this.moduleHero.Errorf("err:%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if len(heros) >= 0 {
|
||||
for _, obj := range heros {
|
||||
if obj.HeroID == heroCfgId { // z
|
||||
return
|
||||
}
|
||||
}
|
||||
for _, h := range heros {
|
||||
if h.HeroID == heroCfgId &&
|
||||
h.IsOverlying {
|
||||
@ -199,7 +209,7 @@ func (this *ModelHero) createHeroOverlying(uid string, heroCfgId string, count i
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this.initHeroOverlying(uid, heroCfgId, count)
|
||||
}
|
||||
|
||||
@ -881,3 +891,52 @@ func (this *ModelHero) resetTalentProperty(hero *pb.DBHero) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 创建一条英雄信息,如果有这个英雄 则转换成对应的碎片
|
||||
func (this *ModelHero) createHero(session comm.IUserSession, heroCfgId string, count int32) (hero *pb.DBHero, bFirst bool, err error) {
|
||||
heros := make([]*pb.DBHero, 0)
|
||||
uid := session.GetUserId()
|
||||
if this.moduleHero.IsCross() {
|
||||
if dbModel, err := this.moduleHero.GetDBModuleByUid(uid, this.TableName, this.Expired); err != nil {
|
||||
this.moduleHero.Errorln(err)
|
||||
|
||||
} else {
|
||||
if err = dbModel.GetList(uid, &heros); err != nil {
|
||||
this.moduleHero.Errorf("err:%v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err = this.GetList(uid, &heros); err != nil {
|
||||
this.moduleHero.Errorf("err:%v", err)
|
||||
}
|
||||
}
|
||||
bFirst = true
|
||||
for _, obj := range heros {
|
||||
if obj.HeroID == heroCfgId {
|
||||
hero = obj
|
||||
bFirst = false
|
||||
break
|
||||
}
|
||||
}
|
||||
if bFirst { // 没有当前英雄
|
||||
count -= 1
|
||||
hero, err = this.initHeroOverlying(uid, heroCfgId, 1)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// 转碎片处理
|
||||
if count > 0 {
|
||||
heroCfg := this.moduleHero.configure.GetHeroConfig(heroCfgId)
|
||||
if heroCfg != nil {
|
||||
res := make([]*cfg.Gameatn, 0)
|
||||
for i := 0; i < int(count); i++ {
|
||||
res = append(res, heroCfg.Herofrag...)
|
||||
}
|
||||
this.moduleHero.DispenseRes(session, res, true)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -76,10 +76,12 @@ func (this *Hero) Start() (err error) {
|
||||
}
|
||||
|
||||
//创建单个叠加英雄
|
||||
func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string, num int32) (hero *pb.DBHero, code pb.ErrorCode) {
|
||||
var err error
|
||||
hero, err = this.modelHero.createHeroOverlying(session.GetUserId(), heroCfgId, num)
|
||||
if err == nil {
|
||||
func (this *Hero) createRepeatHero(session comm.IUserSession, heroCfgId string, num int32) (hero *pb.DBHero, bFirst bool, code pb.ErrorCode) {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
hero, bFirst, err = this.modelHero.createHero(session, heroCfgId, num)
|
||||
if err == nil && bFirst {
|
||||
//go func(uid string, heroCfgId string) { // 携程处理 图鉴数据
|
||||
if db.IsCross() {
|
||||
this.moduleFetter.SendRpcAddHero(session, heroCfgId)
|
||||
@ -232,7 +234,7 @@ func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string,
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
hero, err := this.modelHero.createOneHero(session.GetUserId(), heroConfId)
|
||||
hero, err := this.modelHero.createSpecialHero(session.GetUserId(), heroConfId)
|
||||
if err != nil {
|
||||
return pb.ErrorCode_HeroCreate
|
||||
}
|
||||
@ -267,48 +269,34 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
||||
var (
|
||||
changeList []*pb.DBHero
|
||||
firstGet []string
|
||||
bFirst bool
|
||||
)
|
||||
for heroCfgId, num := range heros {
|
||||
if num == 0 { // 数量为0 不做处理
|
||||
continue
|
||||
}
|
||||
if hero, code = this.createRepeatHero(session, heroCfgId, num); code != pb.ErrorCode_Success {
|
||||
if hero, bFirst, code = this.createRepeatHero(session, heroCfgId, num); code != pb.ErrorCode_Success {
|
||||
this.Errorf("create hero %s failed", heroCfgId)
|
||||
return
|
||||
continue
|
||||
}
|
||||
if result, err1 := this.ModuleUser.GetUserExpand(session.GetUserId()); err1 == nil {
|
||||
initUpdate := map[string]interface{}{}
|
||||
sz := result.GetTujian()
|
||||
if len(sz) == 0 {
|
||||
sz = make(map[string]int32, 0)
|
||||
}
|
||||
|
||||
if _, ok := result.GetTujian()[heroCfgId]; !ok {
|
||||
heroConf := this.modelHero.moduleHero.configure.GetHeroConfig(heroCfgId)
|
||||
if heroConf != nil {
|
||||
if heroConf.Handbook == -1 {
|
||||
sz[heroCfgId] = 0
|
||||
} else {
|
||||
sz[heroCfgId] = 1
|
||||
}
|
||||
initUpdate["tujian"] = sz
|
||||
this.ModuleUser.ChangeUserExpand(session.GetUserId(), initUpdate)
|
||||
if bFirst {
|
||||
firstGet = append(firstGet, heroCfgId)
|
||||
}
|
||||
}
|
||||
}
|
||||
changeList = append(changeList, hero)
|
||||
}
|
||||
}
|
||||
|
||||
if bPush && len(changeList) > 0 { //推送
|
||||
if bPush { //推送
|
||||
if len(changeList) > 0 {
|
||||
session.SendMsg("hero", "change", &pb.HeroChangePush{List: changeList})
|
||||
}
|
||||
|
||||
// 首次获得英雄 则推送
|
||||
if len(firstGet) > 0 {
|
||||
session.SendMsg("hero", "firstget", &pb.HeroFirstGetPush{
|
||||
HeroId: firstGet,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
@ -628,11 +616,7 @@ func (this *Hero) CheckLvNum(uid string, lv int32) int32 {
|
||||
}
|
||||
|
||||
func (this *Hero) GetTujianHeroNum(uid string) int32 {
|
||||
if result, err1 := this.ModuleUser.GetUserExpand(uid); err1 == nil {
|
||||
tujian := result.GetTujian()
|
||||
return int32(len(tujian))
|
||||
}
|
||||
return 0
|
||||
return int32(len(this.modelHero.getHeroList(uid)))
|
||||
}
|
||||
|
||||
////拥有觉醒至A级的B星英雄N个
|
||||
@ -695,7 +679,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
}
|
||||
|
||||
// 开始创建英雄
|
||||
hero, err := this.modelHero.createOneHero(session.GetUserId(), v.Hid)
|
||||
hero, err := this.modelHero.createSpecialHero(session.GetUserId(), v.Hid)
|
||||
if err != nil {
|
||||
return pb.ErrorCode_HeroCreate
|
||||
}
|
||||
@ -786,3 +770,34 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
|
||||
}
|
||||
this.ModuleRtask.SendToRtask(session, comm.Rtype89, drawCount)
|
||||
}
|
||||
|
||||
func (this Hero) newCondition(heroRecord *pb.DBHeroRecord) (get bool, starIndex int32) {
|
||||
inRangeConf := this.configure.GetGlobalConf().DrawCard5StarsInRange
|
||||
if len(inRangeConf) == 3 {
|
||||
iStart := inRangeConf[0] // 抽卡开始
|
||||
iEnd := inRangeConf[1] // 抽卡结束
|
||||
star := inRangeConf[2]
|
||||
if star >= 3 { // 保底必须三星+
|
||||
if heroRecord.Inevitable == 0 && heroRecord.Drawcount > iStart && heroRecord.Drawcount < iEnd && iEnd >= iStart {
|
||||
n, _ := rand.Int(rand.Reader, big.NewInt(int64(iEnd-iStart)))
|
||||
if n.Int64() < 1 { // 抽中
|
||||
starIndex = star
|
||||
heroRecord.Inevitable = heroRecord.Drawcount
|
||||
update := make(map[string]interface{})
|
||||
update["inevitable"] = heroRecord.Drawcount
|
||||
|
||||
get = true
|
||||
}
|
||||
}
|
||||
// 保底情况
|
||||
if heroRecord.Drawcount == iEnd && heroRecord.Inevitable == 0 {
|
||||
starIndex = star
|
||||
heroRecord.Inevitable = heroRecord.Drawcount
|
||||
|
||||
get = true
|
||||
}
|
||||
}
|
||||
}
|
||||
get = false
|
||||
return
|
||||
}
|
||||
|
@ -175,18 +175,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
})
|
||||
}
|
||||
}
|
||||
// 加主角经验
|
||||
// if stageConf.Exp > 0 {
|
||||
// res := make([]*cfg.Gameatn, 0)
|
||||
// res = append(res, &cfg.Gameatn{
|
||||
// A: "attr",
|
||||
// T: "exp",
|
||||
// N: stageConf.Exp,
|
||||
// })
|
||||
// if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
|
||||
// this.module.Debugf("Mline Commonaward DispenseRes err:+%v", res)
|
||||
// }
|
||||
// }
|
||||
|
||||
// 加英雄经验
|
||||
if stageConf.HeroExp > 0 {
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||
@ -203,5 +192,38 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
|
||||
// 主线任务统计 Rtype60
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId))
|
||||
var (
|
||||
ChapterStar int32
|
||||
bAll3Star bool
|
||||
allStar int32
|
||||
)
|
||||
bAll3Star = true
|
||||
for _, v1 := range curChapter.Star {
|
||||
star := 0
|
||||
for _, v := range szStar {
|
||||
if v1&v == v {
|
||||
ChapterStar++
|
||||
star++
|
||||
}
|
||||
}
|
||||
if star != 3 && bAll3Star {
|
||||
bAll3Star = false
|
||||
}
|
||||
}
|
||||
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype158, curChapter.ChapterId, ChapterStar)
|
||||
if bAll3Star {
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype159, curChapter.ChapterId)
|
||||
}
|
||||
for _, v2 := range list {
|
||||
for _, v1 := range v2.Star {
|
||||
for _, v := range szStar {
|
||||
if v1&v == v {
|
||||
allStar++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype160, allStar)
|
||||
return
|
||||
}
|
||||
|
@ -6,13 +6,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
RtaskSubTypeChoose = "choose" //选择
|
||||
RtaskSubTypeList = "list" //随机任务列表
|
||||
RtaskSubTypeApply = "apply" //做任务
|
||||
RtaskSubTypeReward = "getreward" //奖励
|
||||
RtaskSubTypeBattleStart = "battlestart" //战斗开始
|
||||
RtaskSubTypeBattleFinish = "battlefinish" //战斗完成
|
||||
RtaskSubTypeGetrecord = "getrecord" //任务数据
|
||||
RtaskSubTypeSend = "send" //触发任务
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
|
29
modules/rtask/api_send.go
Normal file
29
modules/rtask/api_send.go
Normal file
@ -0,0 +1,29 @@
|
||||
package rtask
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
func (this *apiComp) SendCheck(session comm.IUserSession, req *pb.RtaskSendReq) (code pb.ErrorCode) {
|
||||
if len(req.Params) == 0 || req.TaskType == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Send(session comm.IUserSession, req *pb.RtaskSendReq) (code pb.ErrorCode, data proto.Message) {
|
||||
if code = this.moduleRtask.SendToRtask(session, comm.TaskType(req.TaskType), req.Params...); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.RtaskSendResp{
|
||||
IsSucc: true,
|
||||
}
|
||||
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeSend, rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
return
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package rtimepvp
|
||||
|
||||
import (
|
||||
"go_dreamfactory/modules"
|
||||
|
||||
"go_dreamfactory/lego/core"
|
||||
)
|
||||
|
||||
/*
|
||||
装备模块 API
|
||||
*/
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *RTimePVP
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*RTimePVP)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
return
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package rtimepvp
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
/*
|
||||
模块名:实时PVP
|
||||
描述:同步战斗模块
|
||||
开发:李伟
|
||||
*/
|
||||
func NewModule() core.IModule {
|
||||
m := new(RTimePVP)
|
||||
return m
|
||||
}
|
||||
|
||||
type RTimePVP struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
}
|
||||
|
||||
//模块名
|
||||
func (this *RTimePVP) GetType() core.M_Modules {
|
||||
return comm.ModuleRTimePVP
|
||||
}
|
@ -2,7 +2,6 @@ package user
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -17,21 +16,12 @@ func (this *apiComp) GetTujian(session comm.IUserSession, req *pb.UserGetTujianR
|
||||
return
|
||||
}
|
||||
|
||||
uid := session.GetUserId()
|
||||
rsp := &pb.UserGetTujianResp{}
|
||||
if result, err := this.module.modelExpand.GetUserExpand(uid); err != nil {
|
||||
this.module.Error("玩家扩展数据",
|
||||
log.Field{Key: "uid", Value: uid},
|
||||
log.Field{Key: "err", Value: err.Error()},
|
||||
)
|
||||
return
|
||||
} else {
|
||||
for k, v := range result.Tujian {
|
||||
if v == 0 {
|
||||
rsp.Heroids = append(rsp.Heroids, k)
|
||||
}
|
||||
}
|
||||
list := this.module.ModuleHero.GetHeroList(session.GetUserId())
|
||||
for _, v := range list {
|
||||
rsp.Heroids = append(rsp.Heroids, v.HeroID)
|
||||
}
|
||||
|
||||
err := session.SendMsg(string(this.module.GetType()), UserGetTujianResp, rsp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
|
@ -628,16 +628,18 @@ func (this *User) RpcQueryUser(ctx context.Context, req *pb.NameReq, reply *pb.U
|
||||
}
|
||||
func (this *User) CheckTujianHero(session comm.IUserSession, heros []string) []bool {
|
||||
sz := make([]bool, len(heros))
|
||||
index := 0
|
||||
list := this.ModuleHero.GetHeroList(session.GetUserId())
|
||||
for _, v1 := range heros {
|
||||
for _, h := range list {
|
||||
if v1 == h.HeroID {
|
||||
sz[index] = true
|
||||
index++
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
userEx, err := this.GetUserExpand(session.GetUserId())
|
||||
if err != nil {
|
||||
return sz
|
||||
}
|
||||
for i, heroid := range heros {
|
||||
if _, ok := userEx.Tujian[heroid]; ok {
|
||||
sz[i] = true
|
||||
}
|
||||
}
|
||||
return sz
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,8 @@ func main() {
|
||||
if err := log.OnInit(nil,
|
||||
log.SetFileName("./s.log"),
|
||||
log.SetLoglevel(log.DebugLevel),
|
||||
log.SetIsDebug(true)); err != nil {
|
||||
log.SetUniqueLog(true),
|
||||
log.SetIsDebug(false)); err != nil {
|
||||
panic(fmt.Sprintf("Sys log Init err:%v", err))
|
||||
} else {
|
||||
log.Infof("Sys log Init success !")
|
||||
@ -341,6 +342,7 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str
|
||||
"IsDebug": false,
|
||||
"Loglevel": log.InfoLevel,
|
||||
"MaxAgeTime": 7,
|
||||
"UniqueLog": true,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.Notice
|
||||
"serviceTag": args.ServiceTag,
|
||||
"gatewayServiceId": args.GatewayServiceId,
|
||||
"ip": args.Ip,
|
||||
})
|
||||
}, db.SetDBMgoLog(false))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,10 @@ type GameGlobalData struct {
|
||||
Zhayantime float32
|
||||
RotateAngle float32
|
||||
RotateDizzyTime float32
|
||||
<<<<<<< HEAD
|
||||
Moonshopmoney []int32
|
||||
=======
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
}
|
||||
|
||||
const TypeId_GameGlobalData = 477542761
|
||||
@ -722,6 +725,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["zhayantime"].(float64); !_ok_ { err = errors.New("zhayantime error"); return }; _v.Zhayantime = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rotateAngle"].(float64); !_ok_ { err = errors.New("rotateAngle error"); return }; _v.RotateAngle = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rotateDizzyTime"].(float64); !_ok_ { err = errors.New("rotateDizzyTime error"); return }; _v.RotateDizzyTime = float32(_tempNum_) }
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
@ -736,6 +740,8 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,11 @@ type GameHeroData struct {
|
||||
Show int32
|
||||
Herofrag []*Gameatn
|
||||
Heroskillup []*Gameatn
|
||||
<<<<<<< HEAD
|
||||
Expitem []*Gameatn
|
||||
Expitemnum int32
|
||||
=======
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
}
|
||||
|
||||
const TypeId_GameHeroData = 1513828672
|
||||
@ -161,6 +164,7 @@ func (_v *GameHeroData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
@ -176,6 +180,8 @@ func (_v *GameHeroData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["expitemnum"].(float64); !_ok_ { err = errors.New("expitemnum error"); return }; _v.Expitemnum = int32(_tempNum_) }
|
||||
=======
|
||||
>>>>>>> aa91ee0b32cdb0b335aa055f6492ca110aaa507d
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user