diff --git a/bin/json/game_guildactivity.json b/bin/json/game_guildactivity.json
new file mode 100644
index 000000000..6da3f01a9
--- /dev/null
+++ b/bin/json/game_guildactivity.json
@@ -0,0 +1,57 @@
+[
+ {
+ "id": 1,
+ "activity": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 50
+ }
+ ]
+ },
+ {
+ "id": 2,
+ "activity": 2000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 60
+ }
+ ]
+ },
+ {
+ "id": 3,
+ "activity": 3000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 70
+ }
+ ]
+ },
+ {
+ "id": 4,
+ "activity": 4000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 80
+ }
+ ]
+ },
+ {
+ "id": 5,
+ "activity": 5000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 100
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_guildlv.json b/bin/json/game_guildlv.json
new file mode 100644
index 000000000..a51e48a22
--- /dev/null
+++ b/bin/json/game_guildlv.json
@@ -0,0 +1,102 @@
+[
+ {
+ "lv": 1,
+ "exp": 0,
+ "member_max": 20
+ },
+ {
+ "lv": 2,
+ "exp": 1000,
+ "member_max": 22
+ },
+ {
+ "lv": 3,
+ "exp": 2000,
+ "member_max": 24
+ },
+ {
+ "lv": 4,
+ "exp": 3000,
+ "member_max": 26
+ },
+ {
+ "lv": 5,
+ "exp": 4000,
+ "member_max": 28
+ },
+ {
+ "lv": 6,
+ "exp": 5000,
+ "member_max": 30
+ },
+ {
+ "lv": 7,
+ "exp": 6000,
+ "member_max": 32
+ },
+ {
+ "lv": 8,
+ "exp": 7000,
+ "member_max": 34
+ },
+ {
+ "lv": 9,
+ "exp": 8000,
+ "member_max": 36
+ },
+ {
+ "lv": 10,
+ "exp": 9000,
+ "member_max": 38
+ },
+ {
+ "lv": 11,
+ "exp": 10000,
+ "member_max": 40
+ },
+ {
+ "lv": 12,
+ "exp": 11000,
+ "member_max": 42
+ },
+ {
+ "lv": 13,
+ "exp": 12000,
+ "member_max": 44
+ },
+ {
+ "lv": 14,
+ "exp": 13000,
+ "member_max": 46
+ },
+ {
+ "lv": 15,
+ "exp": 14000,
+ "member_max": 48
+ },
+ {
+ "lv": 16,
+ "exp": 15000,
+ "member_max": 50
+ },
+ {
+ "lv": 17,
+ "exp": 16000,
+ "member_max": 52
+ },
+ {
+ "lv": 18,
+ "exp": 17000,
+ "member_max": 54
+ },
+ {
+ "lv": 19,
+ "exp": 18000,
+ "member_max": 56
+ },
+ {
+ "lv": 20,
+ "exp": 19000,
+ "member_max": 58
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_guildpng.json b/bin/json/game_guildpng.json
new file mode 100644
index 000000000..8344f195a
--- /dev/null
+++ b/bin/json/game_guildpng.json
@@ -0,0 +1,46 @@
+[
+ {
+ "id": 1,
+ "png": "wp_icon_10013"
+ },
+ {
+ "id": 2,
+ "png": "wp_icon_10014"
+ },
+ {
+ "id": 3,
+ "png": "wp_icon_10015"
+ },
+ {
+ "id": 4,
+ "png": "wp_icon_10016"
+ },
+ {
+ "id": 5,
+ "png": "wp_icon_10017"
+ },
+ {
+ "id": 6,
+ "png": "wp_icon_10018"
+ },
+ {
+ "id": 7,
+ "png": "wp_icon_10019"
+ },
+ {
+ "id": 8,
+ "png": "wp_icon_10020"
+ },
+ {
+ "id": 9,
+ "png": "wp_icon_10021"
+ },
+ {
+ "id": 10,
+ "png": "wp_icon_10022"
+ },
+ {
+ "id": 11,
+ "png": "wp_icon_10023"
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_guildsign.json b/bin/json/game_guildsign.json
new file mode 100644
index 000000000..97c6c1d2f
--- /dev/null
+++ b/bin/json/game_guildsign.json
@@ -0,0 +1,132 @@
+[
+ {
+ "id": 1,
+ "down": 0,
+ "up": 4,
+ "SignIn_text": {
+ "key": "signin1",
+ "text": "昨日0人签到"
+ },
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 10
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 10
+ }
+ ],
+ "exp": {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 10
+ }
+ },
+ {
+ "id": 2,
+ "down": 5,
+ "up": 9,
+ "SignIn_text": {
+ "key": "signin2",
+ "text": "昨日5人签到"
+ },
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 50
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "exp": {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 50
+ }
+ },
+ {
+ "id": 3,
+ "down": 10,
+ "up": 14,
+ "SignIn_text": {
+ "key": "signin3",
+ "text": "昨日10人签到"
+ },
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 100
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 100
+ }
+ ],
+ "exp": {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 100
+ }
+ },
+ {
+ "id": 4,
+ "down": 15,
+ "up": 19,
+ "SignIn_text": {
+ "key": "signin4",
+ "text": "昨日15人签到"
+ },
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 150
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 150
+ }
+ ],
+ "exp": {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 150
+ }
+ },
+ {
+ "id": 5,
+ "down": 20,
+ "up": 99,
+ "SignIn_text": {
+ "key": "signin5",
+ "text": "昨日20人签到"
+ },
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 200
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 200
+ }
+ ],
+ "exp": {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 200
+ }
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_guildtask.json b/bin/json/game_guildtask.json
new file mode 100644
index 000000000..7ead90a6d
--- /dev/null
+++ b/bin/json/game_guildtask.json
@@ -0,0 +1,292 @@
+[
+ {
+ "id": 10001,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 50
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10002,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 60
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10003,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 70
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10004,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 80
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10005,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 100
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10006,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 50
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10007,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 60
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10008,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 70
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10009,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 80
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 20
+ }
+ ],
+ "contribution": 50
+ },
+ {
+ "id": 10010,
+ "weight": 1000,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "diamond",
+ "n": 100
+ },
+ {
+ "a": "attr",
+ "t": "guildcoin",
+ "n": 50
+ }
+ ],
+ "sociaty_reward": [
+ {
+ "a": "attr",
+ "t": "guildactive",
+ "n": 20
+ },
+ {
+ "a": "attr",
+ "t": "guildexp",
+ "n": 40
+ }
+ ],
+ "contribution": 50
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_sociatytask.json b/bin/json/game_sociatytask.json
index 6a2268e5e..2d6319555 100644
--- a/bin/json/game_sociatytask.json
+++ b/bin/json/game_sociatytask.json
@@ -14,7 +14,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -43,7 +43,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -72,7 +72,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -101,7 +101,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -130,7 +130,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -159,7 +159,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -188,7 +188,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -217,7 +217,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -246,7 +246,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
@@ -275,7 +275,7 @@
"n": 50
}
],
- "sociaty_reword": [
+ "sociaty_reward": [
{
"a": "attr",
"t": "guildexp",
diff --git a/cmd/v2/lib/common/itemlist.go b/cmd/v2/lib/common/itemlist.go
index 0daef40c7..1d6950cfa 100644
--- a/cmd/v2/lib/common/itemlist.go
+++ b/cmd/v2/lib/common/itemlist.go
@@ -35,7 +35,9 @@ func NewItemList() *ItemList {
func (f *ItemList) Reset() {
f.ItemTotal = 0
f.SelItemIds = []string{}
+ f.SelItemId = ""
f.CachedList = NewList("")
+ f.ItemList.Refresh()
}
func (f *ItemList) CreateList() *widget.List {
diff --git a/cmd/v2/lib/common/tip.go b/cmd/v2/lib/common/tip.go
index fb1a12958..7d5403d7d 100644
--- a/cmd/v2/lib/common/tip.go
+++ b/cmd/v2/lib/common/tip.go
@@ -37,4 +37,4 @@ func ShowCanvasTip(content string) {
w.Close()
}()
}
-}
+}
\ No newline at end of file
diff --git a/cmd/v2/ui/app_testcase.go b/cmd/v2/ui/app_testcase.go
index 4c2642d02..6c1432f34 100644
--- a/cmd/v2/ui/app_testcase.go
+++ b/cmd/v2/ui/app_testcase.go
@@ -19,6 +19,7 @@ import (
type appTester struct {
appAdapter
+ progress *widget.ProgressBarInfinite
}
func (a *appTester) GetAppName() string {
@@ -32,6 +33,9 @@ func (a *appTester) disEnabled(t *model.TestCase) bool {
func (a *appTester) LazyInit(service service.PttService, obs observer.Observer) error {
a.tabItem = container.NewTabItemWithIcon(common.TOOLBAR_TESTER, theme.DocumentIcon(), nil)
+ a.progress = widget.NewProgressBarInfinite()
+ a.progress.Hide()
+
content := container.NewMax()
title := widget.NewLabel(common.APP_TESTCASE_TITLE)
intro := widget.NewLabel("")
@@ -40,6 +44,7 @@ func (a *appTester) LazyInit(service service.PttService, obs observer.Observer)
container.NewVBox(title, widget.NewSeparator(), intro), nil, nil, nil, content)
setNav := func(t *model.TestCase) {
+ defer a.progress.Hide()
viewKey := fmt.Sprintf("%s.%s", t.MainType, t.SubType)
title.SetText(fmt.Sprintf("> %s", viewKey))
intro.SetText(t.Desc)
@@ -101,7 +106,7 @@ func (a *appTester) LazyInit(service service.PttService, obs observer.Observer)
}
split := container.NewHSplit(a.makeNav(setNav), caseContent)
split.Offset = 0.2
- a.tabItem.Content = split
+ a.tabItem.Content = container.NewBorder(nil, a.progress, nil, nil, split)
return nil
}
@@ -157,8 +162,9 @@ func (a *appTester) makeNav(setNav func(testCase *model.TestCase)) fyne.CanvasOb
if t.SubType == "" {
return
}
-
- setNav(t)
+ a.progress.Start()
+ a.progress.Show()
+ go setNav(t)
}
},
}
diff --git a/cmd/v2/ui/protocol.go b/cmd/v2/ui/protocol.go
index 56810e65d..56bfe61b1 100644
--- a/cmd/v2/ui/protocol.go
+++ b/cmd/v2/ui/protocol.go
@@ -110,9 +110,11 @@ var (
// gourmet
ff(comm.ModuleGourmet, "getranduser"): &formview.GourmentGetRandView{},
// sociaty
- ff(comm.ModuleSociaty, sociaty.SociatySubTypeList): &formview.SociatyListView{},
- ff(comm.ModuleSociaty, sociaty.SociatySubTypeCreate): &formview.SociatyCreateView{},
- ff(comm.ModuleSociaty, sociaty.SociatySubTypeMine): &formview.SociatyMineView{},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeList): &formview.SociatyListView{},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeCreate): &formview.SociatyCreateView{},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeMine): &formview.SociatyMineView{},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist): &formview.SociatyTasklistView{},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeRank): &formview.SociatyRankView{},
}
)
@@ -227,6 +229,8 @@ var (
ff(comm.ModuleSociaty, sociaty.SociatySubTypeList),
ff(comm.ModuleSociaty, sociaty.SociatySubTypeCreate),
ff(comm.ModuleSociaty, sociaty.SociatySubTypeMine),
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist),
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeRank),
},
}
)
@@ -827,6 +831,9 @@ var (
MainType: string(comm.ModuleSociaty),
SubType: sociaty.SociatySubTypeList,
Enabled: true,
+ Print: func(rsp proto.Message) string {
+ return "不打印"
+ },
},
ff(comm.ModuleSociaty, sociaty.SociatySubTypeMine): {
NavLabel: "我的公会",
@@ -835,6 +842,20 @@ var (
SubType: sociaty.SociatySubTypeMine,
Enabled: true,
},
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeTasklist): {
+ NavLabel: "任务列表",
+ Desc: "任务列表",
+ MainType: string(comm.ModuleSociaty),
+ SubType: sociaty.SociatySubTypeTasklist,
+ Enabled: true,
+ },
+ ff(comm.ModuleSociaty, sociaty.SociatySubTypeRank): {
+ NavLabel: "排行榜",
+ Desc: "排行榜",
+ MainType: string(comm.ModuleSociaty),
+ SubType: sociaty.SociatySubTypeRank,
+ Enabled: true,
+ },
}
)
diff --git a/cmd/v2/ui/toy_datetime.go b/cmd/v2/ui/toy_datetime.go
index bf02a25ce..e46c1325f 100644
--- a/cmd/v2/ui/toy_datetime.go
+++ b/cmd/v2/ui/toy_datetime.go
@@ -36,7 +36,7 @@ func (tdt *toyDateTime) Init(obs observer.Observer) error {
),
)
- tdt.widget.Resize(fyne.NewSize(ToyWidth, 100))
+ tdt.widget.Resize(fyne.NewSize(ToyWidth, 150))
// for init
tdt.Run()
diff --git a/cmd/v2/ui/views/sociaty_create.go b/cmd/v2/ui/views/sociaty_create.go
index b0321d35e..40a453a90 100644
--- a/cmd/v2/ui/views/sociaty_create.go
+++ b/cmd/v2/ui/views/sociaty_create.go
@@ -40,11 +40,12 @@ func (this *SociatyCreateView) CreateView(t *model.TestCase) fyne.CanvasObject {
Name: sociatyName.Text,
Icon: icon.Text,
Notice: notice.Text,
- IsApplyCheck: cast.ToBool(isApplyCheck.Text),
+ IsApplyCheck: isApplyCheck.Checked,
ApplyLv: cast.ToInt32(applyLv.Text),
}); err != nil {
logrus.Error(err)
}
}
+ this.form.SubmitText = "创建"
return this.form
}
diff --git a/cmd/v2/ui/views/sociaty_list.go b/cmd/v2/ui/views/sociaty_list.go
index 36a6aea8b..eebf25b45 100644
--- a/cmd/v2/ui/views/sociaty_list.go
+++ b/cmd/v2/ui/views/sociaty_list.go
@@ -30,6 +30,7 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.itemList.ItemList = this.itemList.CreateList()
this.sociatyList = func() {
+ this.itemList.Reset()
if err := service.GetPttService().SendToClient(
string(comm.ModuleSociaty),
sociaty.SociatySubTypeList,
@@ -46,6 +47,9 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
// 申请
applyBtn := widget.NewButton("申请", func() {
+ defer func() {
+ common.ShowTip("已申请")
+ }()
selId := this.itemList.SelItemId
if selId == "" {
common.ShowTip("请选择项目")
@@ -64,15 +68,72 @@ func (this *SociatyListView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
})
//取消申请
- cancalApplyBtn := widget.NewButton("取消申请", nil)
+ cancalApplyBtn := widget.NewButton("取消申请", func() {
+ selId := this.itemList.SelItemId
+ if selId == "" {
+ common.ShowTip("请选择项目")
+ return
+ }
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeApplyCanel,
+ &pb.SociatyApplyCancelReq{
+ SociatyId: selId,
+ }); err != nil {
+ logrus.Error(err)
+ }
+ })
- // 设置
- settingBtn := widget.NewButton("设置", nil)
+ // 明细
+ detailBtn := widget.NewButton("明细", nil)
- buttonBar := container.NewHBox(refreshBtn, applyBtn, cancalApplyBtn, settingBtn)
+ //过滤
+ filter := widget.NewSelect([]string{"全部", "满足条件", "无需审批", "申请中"}, func(s string) {
+ this.itemList.Reset()
+ var filter pb.SociatyListFilter
+ if s == "全部" {
+ filter = pb.SociatyListFilter_ALL
+ } else if s == "满足条件" {
+ filter = pb.SociatyListFilter_CONDI
+ } else if s == "无需审批" {
+ filter = pb.SociatyListFilter_NOAPPLY
+ } else if s == "申请中" {
+ filter = pb.SociatyListFilter_APPLYING
+ }
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeList,
+ &pb.SociatyListReq{
+ Filter: filter,
+ }); err != nil {
+ logrus.Error(err)
+ }
+ })
+ filter.Selected = "全部"
+ //搜索
+ searchEntry := widget.NewEntry()
+ searchEntry.PlaceHolder = "输入公会名称"
+ searchBtn := widget.NewButtonWithIcon("", theme.SearchIcon(), func() {
+ if searchEntry.Text == "" {
+ common.ShowTip("请输入公会名称")
+ return
+ }
+ this.itemList.Reset()
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeSearch,
+ &pb.SociatySearchReq{
+ Name: searchEntry.Text,
+ }); err != nil {
+ logrus.Error(err)
+ }
+ })
+
+ buttonBar := container.NewHBox(refreshBtn, applyBtn, cancalApplyBtn, detailBtn, filter)
+ cBar := container.NewBorder(nil, nil, buttonBar, searchBtn, searchEntry)
// layout
- c := container.NewBorder(buttonBar, nil, nil, nil, this.itemList.ItemList)
+ c := container.NewBorder(cBar, nil, nil, nil, this.itemList.ItemList)
//data listener for
this.dataListener()
return c
@@ -85,23 +146,49 @@ func (this *SociatyListView) dataListener() {
this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
OnNotify: func(d interface{}, args ...interface{}) {
data := d.(*pb.UserMessage)
- if !(data.MainType == string(comm.ModuleSociaty) &&
- data.SubType == sociaty.SociatySubTypeList) {
- return
- }
- rsp := &pb.SociatyListResp{}
+ if data.MainType == string(comm.ModuleSociaty) &&
+ data.SubType == sociaty.SociatySubTypeList {
+ rsp := &pb.SociatyListResp{}
- if !comm.ProtoUnmarshal(data, rsp) {
- logrus.Error("unmarshal err")
- return
- }
-
- for i, v := range rsp.List {
- item := common.Item{
- Id: v.Id,
- Text: fmt.Sprintf("%d - %s lv:%d", i+1, v.Name, v.Lv),
+ if !comm.ProtoUnmarshal(data, rsp) {
+ logrus.Error("unmarshal err")
+ return
+ }
+
+ for i, v := range rsp.List {
+ memberCount := len(v.Members)
+
+ var isApplyCheckLbl string
+ if v.IsApplyCheck {
+ isApplyCheckLbl = "需要审核"
+ } else {
+ isApplyCheckLbl = "无需审核"
+ }
+ lbl := fmt.Sprintf("%d - %-15s 等级:%-5d 等级限制:%-5d (%d) %10v", i+1, v.Name, v.Lv, v.ApplyLv, memberCount, isApplyCheckLbl)
+ item := common.Item{
+ Id: v.Id,
+ Text: lbl,
+ }
+ this.itemList.AddItem(item)
+ }
+ } else if data.MainType == string(comm.ModuleSociaty) &&
+ data.SubType == sociaty.SociatySubTypeSearch {
+ rsp := &pb.SociatySearchResp{}
+
+ if !comm.ProtoUnmarshal(data, rsp) {
+ logrus.Error("unmarshal err")
+ return
+ }
+
+ for i, v := range rsp.List {
+ memberCount := len(v.Members)
+
+ item := common.Item{
+ Id: v.Id,
+ Text: fmt.Sprintf("%d - %s 等级:%d 等级限制:%d %d人", i+1, v.Name, v.Lv, v.ApplyLv, memberCount),
+ }
+ this.itemList.AddItem(item)
}
- this.itemList.AddItem(item)
}
},
diff --git a/cmd/v2/ui/views/sociaty_mine.go b/cmd/v2/ui/views/sociaty_mine.go
index 0d7336af1..2a3dd24f3 100644
--- a/cmd/v2/ui/views/sociaty_mine.go
+++ b/cmd/v2/ui/views/sociaty_mine.go
@@ -9,9 +9,11 @@ import (
"go_dreamfactory/comm"
"go_dreamfactory/modules/sociaty"
"go_dreamfactory/pb"
+ "go_dreamfactory/utils"
"time"
"fyne.io/fyne/v2"
+ "fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/theme"
@@ -80,17 +82,65 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.sociatyRender(item)
this.form.Refresh()
})
+ // 签到
+ signBtn := widget.NewButton("签到", this.showSignWin)
- btns := container.NewHBox(refreshBtn)
+ // 退出
+ quitBtn := widget.NewButton("退出", func() {
+ dialog.ShowConfirm("提示", "确定退出公会?", func(b bool) {
+ if !b {
+ return
+ }
+ if err := service.GetPttService().SendToClient(
+ t.MainType,
+ sociaty.SociatySubTypeQuit,
+ &pb.SociatyQuitReq{},
+ ); err != nil {
+ logrus.Error(err)
+ return
+ }
+
+ item = &entryItem{}
+ }, this.w)
+
+ })
+
+ btns := container.NewHBox(refreshBtn, signBtn)
+
+ //解散公会
+ jiesanBtn := widget.NewButton("解散", func() {
+ dialog.ShowConfirm("提示", "确定解散公会?", func(b bool) {
+ if !b {
+ return
+ }
+ if err := service.GetPttService().SendToClient(
+ t.MainType,
+ sociaty.SociatySubTypeDismiss,
+ &pb.SociatyDismissReq{},
+ ); err != nil {
+ logrus.Error(err)
+ return
+ }
+
+ item = &entryItem{}
+ }, this.w)
+ })
// 转让
zhuanrangBtn := widget.NewButton("转让", nil)
//申请列表
applyListBtn := widget.NewButton("申请审批", this.showSociatyApplyListWin)
-
+
+ // 任务列表
+ taskListBtn := widget.NewButton("任务列表", this.showTaskListWin)
+
defer func() {
this.loadSociaty()
- time.Sleep(time.Millisecond * 50) //必须要延迟,否则职位获取不到
+ time.Sleep(time.Millisecond * 30) //必须要延迟,否则职位获取不到
+ if this.sociaty == nil {
+ dialog.ShowInformation("提示", "还没有加入任何公会", this.w)
+ return
+ }
if this.job == pb.SociatyJob_ADMIN ||
this.job == pb.SociatyJob_VICEPRESIDENT {
@@ -100,15 +150,42 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
if this.job == pb.SociatyJob_PRESIDENT {
btns.Add(applyListBtn)
btns.Add(zhuanrangBtn)
+ btns.Add(jiesanBtn)
+ } else {
+ btns.Add(quitBtn)
}
+ btns.Add(taskListBtn)
+
this.sociatyRender(item)
this.form.Refresh()
}()
//成员列表
- membersBtn := widget.NewButton("成员", this.showSociatyMemberWin)
+ membersBtn := widget.NewButton("成员列表", this.showSociatyMemberWin)
btns.Add(membersBtn)
+ // 保存修改
+ this.form.OnSubmit = func() {
+ defer func() {
+ common.ShowTip("公告已更新")
+ }()
+ if err := service.GetPttService().SendToClient(
+ t.MainType,
+ sociaty.SociatySubTypeSetting,
+ &pb.SociatySettingReq{
+ SociatyId: this.sociaty.Id,
+ Icon: item.icon.Text,
+ Notice: item.notice.Text,
+ ApplyLv: cast.ToInt32(item.applyLv.Text),
+ IsApplyCheck: item.isApplyCheck.Checked,
+ },
+ ); err != nil {
+ logrus.Error(err)
+ return
+ }
+ }
+ this.form.SubmitText = "保存修改"
+
c := container.NewBorder(btns, nil, nil, nil, this.form)
this.dataListener(item)
@@ -116,11 +193,18 @@ func (this *SociatyMineView) CreateView(t *model.TestCase) fyne.CanvasObject {
}
func (this *SociatyMineView) sociatyRender(item *entryItem) {
- item.sociatyName.Text = this.sociaty.Name
- item.notice.Text = this.sociaty.Notice
- item.icon.Text = this.sociaty.Icon
- item.isApplyCheck.Checked = this.sociaty.IsApplyCheck
- item.applyLv.Text = cast.ToString(this.sociaty.ApplyLv)
+ if this.sociaty == nil {
+ dialog.ShowInformation("提示", "还没有加入任何公会", this.w)
+ return
+ }
+ if item != nil {
+ item.sociatyName.Text = this.sociaty.Name
+ item.notice.Text = this.sociaty.Notice
+ item.icon.Text = this.sociaty.Icon
+ item.isApplyCheck.Checked = this.sociaty.IsApplyCheck
+ item.applyLv.Text = cast.ToString(this.sociaty.ApplyLv)
+ }
+
}
func (this *SociatyMineView) dataListener(item *entryItem) {
@@ -177,6 +261,10 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
this.itemList.ItemList = this.itemList.CreateList()
this.applyListFun = func() {
+ if this.sociaty == nil {
+ dialog.ShowInformation("提示", "还没有加入任何公会", this.w)
+ return
+ }
sociatyId := this.sociaty.Id
if sociatyId == "" {
common.ShowTip("公会ID空")
@@ -199,7 +287,7 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
})
agreeBtn := widget.NewButton("同意", func() {
- defer this.applyListFun()
+ defer this.itemList.Reset()
selId := this.itemList.SelItemId
if selId == "" {
common.ShowTip("请选择项目")
@@ -214,14 +302,13 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
string(comm.ModuleSociaty),
sociaty.SociatySubTypeAgree,
&pb.SociatyAgreeReq{
- Uid: selId,
- SociatyId: sociatyId,
+ Uid: selId,
}); err != nil {
logrus.Error(err)
}
})
refuseBtn := widget.NewButton("拒绝", func() {
- defer this.applyListFun()
+ defer this.itemList.Reset()
selId := this.itemList.SelItemId
if selId == "" {
common.ShowTip("请选择项目")
@@ -236,8 +323,7 @@ func (this *SociatyMineView) showSociatyApplyListWin() {
string(comm.ModuleSociaty),
sociaty.SociatySubTypeRefuse,
&pb.SociatyRefuseReq{
- Uid: selId,
- SociatyId: sociatyId,
+ Uid: selId,
}); err != nil {
logrus.Error(err)
}
@@ -295,9 +381,7 @@ func (this *SociatyMineView) showSociatyMemberWin() {
if err := service.GetPttService().SendToClient(
string(comm.ModuleSociaty),
sociaty.SociatySubTypeMembers,
- &pb.SociatyMembersReq{
- SociatyId: sociatyId,
- }); err != nil {
+ &pb.SociatyMembersReq{}); err != nil {
logrus.Error(err)
}
}
@@ -362,7 +446,7 @@ func (this *SociatyMineView) memberListen() {
for i, v := range rsp.List {
item := common.Item{
Id: v.Uid,
- Text: fmt.Sprintf("%d - %s lv:%d", i+1, v.Name, v.Lv),
+ Text: fmt.Sprintf("%d - %s lv:%d %v", i+1, v.Name, v.Lv, v.Job),
}
this.memberList.AddItem(item)
}
@@ -370,3 +454,65 @@ func (this *SociatyMineView) memberListen() {
})
this.flag3 = true
}
+
+// 签到
+func (this *SociatyMineView) showSignWin() {
+ var lastCount int32
+ if this.sociaty == nil {
+ logrus.Error("公会 is nil")
+ return
+ }
+ lastCount = this.sociaty.LastSignCount
+
+ card := canvas.NewText(cast.ToString(lastCount), nil)
+ card.TextSize = 50
+ btn := widget.NewButton("签到", nil)
+ btn.OnTapped = func() {
+ defer btn.Disable()
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeSign,
+ &pb.SociatySignReq{},
+ ); err != nil {
+ logrus.Error(err)
+ return
+ }
+ }
+
+ if _, ok := utils.Findx(this.sociaty.SignIds, this.uid); ok {
+ btn.Text = "已签到"
+ btn.Disable()
+ }
+
+ l := container.NewVBox(container.NewCenter(card), btn)
+ dconf := dialog.NewCustom("签到", "关闭", l, this.w)
+ dconf.Resize(fyne.NewSize(400, 600))
+ dconf.Show()
+}
+
+// 任务列表
+func (this *SociatyMineView) showTaskListWin() {
+ refreshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
+ this.memberList.Reset()
+ this.taskList()
+ })
+
+ btns := container.NewHBox(refreshBtn)
+
+ c := container.NewBorder(btns, nil, nil, nil, this.memberList.ItemList)
+ dconf := dialog.NewCustom("任务", "关闭", c, this.w)
+ dconf.Resize(fyne.NewSize(800, 500))
+ dconf.Show()
+}
+
+func (this *SociatyMineView) taskList() {
+ this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
+ OnNotify: func(d interface{}, args ...interface{}) {
+ data := d.(*pb.UserMessage)
+ if !(data.MainType == string(comm.ModuleSociaty) &&
+ data.SubType == sociaty.SociatySubTypeMembers) {
+ return
+ }
+ },
+ })
+}
diff --git a/cmd/v2/ui/views/sociaty_rank.go b/cmd/v2/ui/views/sociaty_rank.go
new file mode 100644
index 000000000..bc02a11f7
--- /dev/null
+++ b/cmd/v2/ui/views/sociaty_rank.go
@@ -0,0 +1,82 @@
+package formview
+
+import (
+ "fmt"
+ "go_dreamfactory/cmd/v2/lib/common"
+ "go_dreamfactory/cmd/v2/model"
+ "go_dreamfactory/cmd/v2/service"
+ "go_dreamfactory/cmd/v2/service/observer"
+ "go_dreamfactory/comm"
+ "go_dreamfactory/modules/sociaty"
+ "go_dreamfactory/pb"
+
+ "fyne.io/fyne/v2"
+ "fyne.io/fyne/v2/container"
+ "fyne.io/fyne/v2/theme"
+ "fyne.io/fyne/v2/widget"
+ "github.com/sirupsen/logrus"
+)
+
+type SociatyRankView struct {
+ rankList func()
+ BaseformView
+ itemList *common.ItemList
+ flag bool
+}
+
+func (this *SociatyRankView) CreateView(t *model.TestCase) fyne.CanvasObject {
+ this.itemList = common.NewItemList()
+
+ this.itemList.ItemList = this.itemList.CreateList()
+ this.rankList = func() {
+ this.itemList.Reset()
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeRank,
+ &pb.SociatyRankReq{}); err != nil {
+ logrus.Error(err)
+ }
+ }
+ defer this.rankList()
+
+ refreshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
+ this.itemList.Reset()
+ this.rankList()
+ })
+ buttonBar := container.NewHBox(refreshBtn)
+
+ c := container.NewBorder(buttonBar, nil, nil, nil, this.itemList.ItemList)
+
+ this.dataListener()
+ return c
+}
+
+func (this *SociatyRankView) dataListener() {
+ if this.flag {
+ return
+ }
+ this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
+ OnNotify: func(d interface{}, args ...interface{}) {
+ data := d.(*pb.UserMessage)
+ if !(data.MainType == string(comm.ModuleSociaty) &&
+ data.SubType == sociaty.SociatySubTypeRank) {
+ return
+ }
+
+ rsp := &pb.SociatyRankResp{}
+ if !comm.ProtoUnmarshal(data, rsp) {
+ logrus.Error("unmarshal err")
+ return
+ }
+
+ for i, v := range rsp.Rank {
+ item := common.Item{
+ Id: v.SociatyId,
+ Text: fmt.Sprintf("%d - %s 等级:%d 活跃度:%d", i+1, v.Name, v.Lv, v.Activity),
+ }
+ this.itemList.AddItem(item)
+ }
+ },
+ })
+ this.flag = true
+}
diff --git a/cmd/v2/ui/views/sociaty_tasklist.go b/cmd/v2/ui/views/sociaty_tasklist.go
new file mode 100644
index 000000000..9105c2d80
--- /dev/null
+++ b/cmd/v2/ui/views/sociaty_tasklist.go
@@ -0,0 +1,108 @@
+package formview
+
+import (
+ "fmt"
+ "go_dreamfactory/cmd/v2/lib/common"
+ "go_dreamfactory/cmd/v2/model"
+ "go_dreamfactory/cmd/v2/service"
+ "go_dreamfactory/cmd/v2/service/observer"
+ "go_dreamfactory/comm"
+ "go_dreamfactory/modules/sociaty"
+ "go_dreamfactory/pb"
+
+ "fyne.io/fyne/v2"
+ "fyne.io/fyne/v2/canvas"
+ "fyne.io/fyne/v2/container"
+ "fyne.io/fyne/v2/theme"
+ "fyne.io/fyne/v2/widget"
+ "github.com/sirupsen/logrus"
+ "github.com/spf13/cast"
+)
+
+type SociatyTasklistView struct {
+ BaseformView
+ taskList func()
+ itemList *common.ItemList
+ flag bool
+}
+
+func (this *SociatyTasklistView) CreateView(t *model.TestCase) fyne.CanvasObject {
+ this.itemList = common.NewItemList()
+
+ this.itemList.ItemList = this.itemList.CreateList()
+
+ this.taskList = func() {
+ this.itemList.Reset()
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeTasklist,
+ &pb.SociatyTaskListReq{}); err != nil {
+ logrus.Error(err)
+ }
+ }
+
+ defer this.taskList()
+ refreshBtn := widget.NewButtonWithIcon("", theme.ViewRefreshIcon(), func() {
+ this.itemList.Reset()
+ this.taskList()
+ })
+
+ // 领取
+ receiveBtn := widget.NewButton("", func() {
+ selId := this.itemList.SelItemId
+ if selId == "" {
+ common.ShowTip("请选择项目")
+ return
+ }
+ if err := service.GetPttService().SendToClient(
+ string(comm.ModuleSociaty),
+ sociaty.SociatySubTypeReceive,
+ &pb.SociatyReceiveReq{
+ TaskId: cast.ToInt32(selId),
+ }); err != nil {
+ logrus.Error(err)
+ }
+ })
+
+ //活跃度领取
+ activityBtn := widget.NewButton("", nil)
+ activityVal := canvas.NewText("", nil)
+ buttonBar := container.NewHBox(refreshBtn, receiveBtn)
+
+ c1 := container.NewBorder(buttonBar, nil, nil, nil, this.itemList.ItemList)
+ c2 := container.NewBorder(nil, nil, nil, nil, container.NewVBox(container.NewCenter(activityVal), activityBtn))
+ cols := container.NewGridWithColumns(2, c1, c2)
+ this.dataListener()
+ return cols
+}
+
+func (this *SociatyTasklistView) dataListener() {
+ if this.flag {
+ return
+ }
+
+ this.obs.AddListener(observer.EVENT_REQ_RSP, observer.Listener{
+ OnNotify: func(d interface{}, args ...interface{}) {
+ data := d.(*pb.UserMessage)
+ if !(data.MainType == string(comm.ModuleSociaty) &&
+ data.SubType == sociaty.SociatySubTypeTasklist) {
+ return
+ }
+
+ rsp := &pb.SociatyTaskListResp{}
+ if !comm.ProtoUnmarshal(data, rsp) {
+ logrus.Error("unmarshal err")
+ return
+ }
+
+ for i, v := range rsp.List {
+ item := common.Item{
+ Id: cast.ToString(v.TaskId),
+ Text: fmt.Sprintf("%d - Id:%v 状态:%d ", i+1, v.TaskId, v.Status),
+ }
+ this.itemList.AddItem(item)
+ }
+ },
+ })
+ this.flag = true
+}
diff --git a/comm/const.go b/comm/const.go
index 9e84e6378..32a3ef101 100644
--- a/comm/const.go
+++ b/comm/const.go
@@ -23,8 +23,9 @@ const (
)
const (
- RDS_SESSION = "online"
- RDS_SOCIATY = "all"
+ RDS_SESSION = "online"
+ RDS_SOCIATY = "all"
+ RDS_SOCIATYRANK = "rank"
)
//ERR
@@ -171,6 +172,8 @@ const (
// 公会
TableSociaty = "sociaty"
+ // 公会任务
+ TableSociatyTask = "sociatytask"
)
//RPC服务接口定义处
@@ -208,6 +211,8 @@ const (
EventUserChanged core.Event_Key = "event_user_changed" //用户数据变化
EventTaskChanged core.Event_Key = "event_task_changed" //任务数据变化
+
+ EventSociatyRankChanged core.Event_Key = "event_sociatyRank_changed" //公会数据变化
)
const (
diff --git a/comm/imodule.go b/comm/imodule.go
index b5bbbfe52..210e62a63 100644
--- a/comm/imodule.go
+++ b/comm/imodule.go
@@ -208,5 +208,7 @@ type (
ISociaty interface {
//会长弹劾处理
ProcessAccuse(uid, sociatyId string)
+ // 公会成员
+ Members(uid string) (list []*pb.SociatyMemberInfo)
}
)
diff --git a/modules/gourmet/api_getranduser.go b/modules/gourmet/api_getranduser.go
index d2a3ce890..1708762ba 100644
--- a/modules/gourmet/api_getranduser.go
+++ b/modules/gourmet/api_getranduser.go
@@ -85,7 +85,7 @@ func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.GourmetGetRa
}
}
for k := range mapUser {
- if user, err := this.module.ModuleUser.GetRmoteUser(k); err == nil && user.Uid != "" {
+ if user, err := this.module.ModuleUser.GetRemoteUser(k); err == nil && user.Uid != "" {
szDbUser = append(szDbUser, user) // 转成user对象
} else {
this.module.Errorf("%v", err)
diff --git a/modules/rtask/module.go b/modules/rtask/module.go
index b75fb2970..133bfda0a 100644
--- a/modules/rtask/module.go
+++ b/modules/rtask/module.go
@@ -216,7 +216,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
session.GetServiecTag(),
comm.Service_Worker,
string(comm.Rpc_ModuleRtaskSendTask),
- pb.RPCRTaskReq{Uid: session.GetUserId(), TaskType: int32(rtaskType), Param: params},
+ pb.RPCRTaskReq{Uid: session.GetUserId(), TaskType: int32(rtaskType),},
nil); err != nil {
this.Errorln(err)
}
@@ -358,7 +358,7 @@ func (this *ModuleRtask) Rpc_ModuleRtaskSendTask(ctx context.Context, args *pb.R
err = fmt.Errorf("未查询到用户:%s在线信息!", args.Uid)
return
} else {
- this.SendToRtask(session, comm.TaskType(args.TaskType), args.Param...)
+ this.SendToRtask(session, comm.TaskType(args.TaskType),)
session.Push()
}
return
diff --git a/modules/smithy/api_getranduser.go b/modules/smithy/api_getranduser.go
index c5b41b5c5..10acf8f10 100644
--- a/modules/smithy/api_getranduser.go
+++ b/modules/smithy/api_getranduser.go
@@ -85,7 +85,7 @@ func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRan
}
}
for k := range mapUser {
- if user, err := this.module.ModuleUser.GetRmoteUser(k); err == nil && user.Uid != "" {
+ if user, err := this.module.ModuleUser.GetRemoteUser(k); err == nil && user.Uid != "" {
szDbUser = append(szDbUser, user) // 转成user对象
} else {
this.module.Errorf("%v", err)
diff --git a/modules/sociaty/api.go b/modules/sociaty/api.go
index 3ab11978a..b5fa2e753 100644
--- a/modules/sociaty/api.go
+++ b/modules/sociaty/api.go
@@ -7,24 +7,28 @@ import (
)
const (
- SociatySubTypeList = "list"
- SociatySubTypeMine = "mine"
- SociatySubTypeCreate = "create"
- SociatySubTypeSearch = "search"
- SociatySubTypeApply = "apply"
- SociatySubTypeApplyCanel = "applycancel"
- SociatySubTypeApplyList = "applylist"
- SociatySubTypeCancel = "cancel"
- SociatySubTypeDismiss = "dismiss"
- SociatySubTypeQuit = "quit"
- SociatySubTypeAgree = "agree"
- SociatySubTypeRefuse = "refuse"
- SociatySubTypeSetting = "setting"
- SociatySubTypeMembers = "members"
- SociatySubTypeAssign = "assign"
- SociatySubTypeDischarge = "discharge"
- SociatySubTypeSettingJob = "settingjob"
- SociatySubTypeSign = "sign"
+ SociatySubTypeList = "list"
+ SociatySubTypeMine = "mine"
+ SociatySubTypeCreate = "create"
+ SociatySubTypeSearch = "search"
+ SociatySubTypeApply = "apply"
+ SociatySubTypeApplyCanel = "applycancel"
+ SociatySubTypeApplyList = "applylist"
+ SociatySubTypeCancel = "cancel"
+ SociatySubTypeDismiss = "dismiss"
+ SociatySubTypeQuit = "quit"
+ SociatySubTypeAgree = "agree"
+ SociatySubTypeRefuse = "refuse"
+ SociatySubTypeSetting = "setting"
+ SociatySubTypeMembers = "members"
+ SociatySubTypeAssign = "assign"
+ SociatySubTypeDischarge = "discharge"
+ SociatySubTypeSettingJob = "settingjob"
+ SociatySubTypeSign = "sign"
+ SociatySubTypeReceive = "receive"
+ SociatySubTypeActivityReceive = "activityreceive"
+ SociatySubTypeRank = "rank"
+ SociatySubTypeTasklist = "tasklist"
)
type apiComp struct {
diff --git a/modules/sociaty/api_cross_accuse.go b/modules/sociaty/api_cross_accuse.go
index 4e07ab3e5..de0522578 100644
--- a/modules/sociaty/api_cross_accuse.go
+++ b/modules/sociaty/api_cross_accuse.go
@@ -10,9 +10,6 @@ import (
// 弹劾会长
func (this *apiComp) AsscuseCheck(session comm.IUserSession, req *pb.SociatyAccuseReq) (code pb.ErrorCode) {
- if req.SociatyId == "" {
- code = pb.ErrorCode_ReqParameterError
- }
return
}
@@ -21,10 +18,10 @@ func (this *apiComp) Asscuse(session comm.IUserSession, req *pb.SociatyAccuseReq
return
}
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_activityreceive.go b/modules/sociaty/api_cross_activityreceive.go
new file mode 100644
index 000000000..b25f97550
--- /dev/null
+++ b/modules/sociaty/api_cross_activityreceive.go
@@ -0,0 +1,56 @@
+package sociaty
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+
+ "google.golang.org/protobuf/proto"
+)
+
+// 活跃度领取
+func (this *apiComp) ActivityreceiveCheck(session comm.IUserSession, req *pb.SociatyActivityReceiveReq) (code pb.ErrorCode) {
+ if req.Id == 0 {
+ code = pb.ErrorCode_ReqParameterError
+ }
+ return
+}
+
+func (this *apiComp) Activityreceive(session comm.IUserSession, req *pb.SociatyActivityReceiveReq) (code pb.ErrorCode, data proto.Message) {
+ if code = this.ActivityreceiveCheck(session, req); code != pb.ErrorCode_Success {
+ return
+ }
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
+ if sociaty.Id == "" {
+ code = pb.ErrorCode_SociatyNoFound
+ this.module.Errorf("uid:%s not in sociaty", uid)
+ return
+ }
+
+ ggt, err := this.module.configure.getSociatyActivityCfg()
+ if err != nil || ggt == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+ conf, ok := ggt.GetDataMap()[req.Id]
+ if !ok {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+
+ //是否满足领取条件
+ if sociaty.Activity < conf.Activity {
+ this.module.Errorf("弹劾失败:%v", err)
+ return
+ }
+
+ rsp := &pb.SociatyActivityReceiveResp{
+ Id: req.Id,
+ SociatyId: sociaty.Id,
+ }
+
+ if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeActivityReceive, rsp); err != nil {
+ code = pb.ErrorCode_SystemError
+ }
+ return
+}
diff --git a/modules/sociaty/api_cross_agree.go b/modules/sociaty/api_cross_agree.go
index f60c25cde..656cb56c0 100644
--- a/modules/sociaty/api_cross_agree.go
+++ b/modules/sociaty/api_cross_agree.go
@@ -10,7 +10,7 @@ import (
// 申请-同意
func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.SociatyAgreeReq) (code pb.ErrorCode) {
- if req.Uid == "" || req.SociatyId == "" {
+ if req.Uid == "" {
code = pb.ErrorCode_ReqParameterError
}
return
@@ -20,11 +20,11 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) (
if code = this.AgreeCheck(session, req); code != pb.ErrorCode_Success {
return
}
- uid:= session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_apply.go b/modules/sociaty/api_cross_apply.go
index 83f05c150..6240b107d 100644
--- a/modules/sociaty/api_cross_apply.go
+++ b/modules/sociaty/api_cross_apply.go
@@ -20,6 +20,13 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
if code = this.ApplyCheck(session, req); code != pb.ErrorCode_Success {
return
}
+ // 全局配置
+ ggd := this.module.configure.GetGlobalConf()
+ if ggd == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+
uid := session.GetUserId()
sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
@@ -29,9 +36,44 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) (
return
}
+ // 是否达到入会等级
+ user, err := this.module.ModuleUser.GetRemoteUser(uid)
+ if err != nil {
+ return
+ }
+
+ if user == nil {
+ code = pb.ErrorCode_UserSessionNobeing
+ return
+ }
+
+ if user.Lv < sociaty.ApplyLv {
+ code = pb.ErrorCode_SociatyAppyLvNoEnough
+ return
+ }
+
+ // 是否公会成员
+ if this.module.modelSociaty.isMember(uid, sociaty) {
+ code = pb.ErrorCode_SociatyBelongTo
+ return
+ }
+
+ // 是否已申请
+ if this.module.modelSociaty.isApplied(uid, sociaty) {
+ code = pb.ErrorCode_SociatyApplied
+ return
+ }
+
+ //判断申请人数是否超出最大允许申请数
+ if len(sociaty.ApplyRecord) >= int(ggd.GuildAcceptApplyMax) {
+ code = pb.ErrorCode_SociatyApplyMax
+ return
+ }
+
+ // 申请
if err := this.module.modelSociaty.apply(uid, sociaty); err != nil {
code = pb.ErrorCode_SociatyApply
- this.module.Errorf("sociaty %s apply err:%v", req.SociatyId, err)
+ this.module.Errorf("公会申请失败 sociatyId:%s err:%v", req.SociatyId, err)
return
}
rsp := &pb.SociatyApplyResp{
diff --git a/modules/sociaty/api_cross_applycancel.go b/modules/sociaty/api_cross_applycancel.go
index b21bde324..b110d9788 100644
--- a/modules/sociaty/api_cross_applycancel.go
+++ b/modules/sociaty/api_cross_applycancel.go
@@ -19,6 +19,13 @@ func (this *apiComp) ApplyCancel(session comm.IUserSession, req *pb.SociatyApply
return
}
uid := session.GetUserId()
+
+ if err := this.module.modelSociaty.applyCancel(uid, req.SociatyId); err != nil {
+ code = pb.ErrorCode_SociatyApplyCanel
+ this.module.Errorf("申请撤销失败:%v", err)
+ return
+ }
+
rsp := &pb.SociatyApplyResp{
Uid: uid,
ScoiatyId: req.SociatyId,
diff --git a/modules/sociaty/api_cross_assign.go b/modules/sociaty/api_cross_assign.go
index 44ae2c831..4233af14d 100644
--- a/modules/sociaty/api_cross_assign.go
+++ b/modules/sociaty/api_cross_assign.go
@@ -9,7 +9,7 @@ import (
// 公会转让
func (this *apiComp) AssignCheck(session comm.IUserSession, req *pb.SociatyAssignReq) (code pb.ErrorCode) {
- if req.SociatyId == "" || req.TargetId == "" {
+ if req.TargetId == "" {
code = pb.ErrorCode_ReqParameterError
}
return
@@ -21,10 +21,10 @@ func (this *apiComp) Assign(session comm.IUserSession, req *pb.SociatyAssignReq)
}
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_create.go b/modules/sociaty/api_cross_create.go
index ed9f7de4a..952771aa1 100644
--- a/modules/sociaty/api_cross_create.go
+++ b/modules/sociaty/api_cross_create.go
@@ -5,11 +5,16 @@ import (
"go_dreamfactory/pb"
"time"
+ cfg "go_dreamfactory/sys/configure/structs"
+
"google.golang.org/protobuf/proto"
)
// 公会创建
func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.SociatyCreateReq) (code pb.ErrorCode) {
+ if len(req.Notice) > 150 {
+ code = pb.ErrorCode_ReqParameterError
+ }
return
}
@@ -40,7 +45,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
return
}
-
//检查是否已加入公会
if userExpand.SociatyId != "" {
code = pb.ErrorCode_SociatyAdded
@@ -48,10 +52,19 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
}
// CD校验
+ if this.module.modelSociaty.isInCDHour(userExpand.SociatyCd){
+ code = pb.ErrorCode_SociatyCDLimit
+ return
+ }
//检查钻石
- if user.Diamond < 500 {
- code = pb.ErrorCode_SociatyDiamondNoEnough
+ ggd := this.module.modelSociaty.moduleSociaty.configure.GetGlobalConf()
+ if ggd == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+
+ if code = this.module.ConsumeRes(session, []*cfg.Gameatn{ggd.GuildBuildCos}, true); code != pb.ErrorCode_Success {
return
}
@@ -88,6 +101,11 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.SociatyCreateReq)
return
}
+ // 初始化任务
+ if err := this.module.modelSociatyTask.initSociatyTask(user.Uid, sociaty.Id); err != nil {
+ this.module.Errorf("初始化玩家任务 err:%v", err)
+ }
+
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeCreate, &pb.SociatyCreateResp{
Id: sociaty.Id,
Uid: uid,
diff --git a/modules/sociaty/api_cross_discharge.go b/modules/sociaty/api_cross_discharge.go
index 481db6033..4fe1d3341 100644
--- a/modules/sociaty/api_cross_discharge.go
+++ b/modules/sociaty/api_cross_discharge.go
@@ -10,7 +10,7 @@ import (
// 踢出公会
func (this *apiComp) DischargeCheck(session comm.IUserSession, req *pb.SociatyDischargeReq) (code pb.ErrorCode) {
- if req.SociatyId == "" || req.TargetId == "" {
+ if req.TargetId == "" {
code = pb.ErrorCode_ReqParameterError
}
return
@@ -21,10 +21,10 @@ func (this *apiComp) Discharge(session comm.IUserSession, req *pb.SociatyDischar
return
}
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_dismiss.go b/modules/sociaty/api_cross_dismiss.go
index 599786ab4..e66dbcc6a 100644
--- a/modules/sociaty/api_cross_dismiss.go
+++ b/modules/sociaty/api_cross_dismiss.go
@@ -10,21 +10,15 @@ import (
// 公会解散
func (this *apiComp) DismissCheck(session comm.IUserSession, req *pb.SociatyDismissReq) (code pb.ErrorCode) {
- if req.SociatyId == "" {
- code = pb.ErrorCode_ReqParameterError
- }
return
}
func (this *apiComp) Dismiss(session comm.IUserSession, req *pb.SociatyDismissReq) (code pb.ErrorCode, data proto.Message) {
- if code = this.DismissCheck(session, req); code != pb.ErrorCode_Success {
- return
- }
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
@@ -34,25 +28,28 @@ func (this *apiComp) Dismiss(session comm.IUserSession, req *pb.SociatyDismissRe
return
}
- if err := this.module.modelSociaty.dismiss(sociaty); err != nil {
- code = pb.ErrorCode_SociatyDismiss
- this.module.Errorf("sociatyId: %s dismiss err:%v", req.SociatyId, err)
- return
- }
+ for _, m := range sociaty.Members {
+ //清除成员任务
+ this.module.modelSociatyTask.deleTask(sociaty.Id, m.Uid)
- //清除玩家sociatyId
- for _, v := range sociaty.Members {
+ //清除玩家sociatyId
update := map[string]interface{}{
- "sociatyId": "",
+ "sociatyId": "", //公会ID置空
}
-
- if err := this.module.ModuleUser.ChangeRemoteUserExpand(v.Uid, update); err != nil {
+ if err := this.module.ModuleUser.ChangeRemoteUserExpand(m.Uid, update); err != nil {
code = pb.ErrorCode_DBError
this.module.Errorf("更新玩家公会ID err:%v", err)
return
}
}
+ // 删除公会
+ if err := this.module.modelSociaty.dismiss(sociaty); err != nil {
+ code = pb.ErrorCode_SociatyDismiss
+ this.module.Errorf("sociatyId: %s dismiss err:%v", sociaty.Id, err)
+ return
+ }
+
rsp := &pb.SociatyDismissResp{
Uid: session.GetUserId(),
SociatyId: sociaty.Id,
diff --git a/modules/sociaty/api_cross_list.go b/modules/sociaty/api_cross_list.go
index 186534b24..6e48069d6 100644
--- a/modules/sociaty/api_cross_list.go
+++ b/modules/sociaty/api_cross_list.go
@@ -18,7 +18,7 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.SociatyListReq) (co
}
rsp := &pb.SociatyListResp{}
- rsp.List = this.module.modelSociaty.list(&req.Filter)
+ rsp.List = this.module.modelSociaty.list(session.GetUserId(), req.Filter)
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeList, rsp); err != nil {
code = pb.ErrorCode_SystemError
diff --git a/modules/sociaty/api_cross_members.go b/modules/sociaty/api_cross_members.go
index ce5f25b21..87f379ba6 100644
--- a/modules/sociaty/api_cross_members.go
+++ b/modules/sociaty/api_cross_members.go
@@ -10,20 +10,15 @@ import (
// 公会成员列表
func (this *apiComp) MembersCheck(session comm.IUserSession, req *pb.SociatyMembersReq) (code pb.ErrorCode) {
- if req.SociatyId == "" {
- code = pb.ErrorCode_ReqParameterError
- }
return
}
func (this *apiComp) Members(session comm.IUserSession, req *pb.SociatyMembersReq) (code pb.ErrorCode, data proto.Message) {
- if code = this.MembersCheck(session, req); code != pb.ErrorCode_Success {
- return
- }
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_mine.go b/modules/sociaty/api_cross_mine.go
index e37ab9719..c8c8103cd 100644
--- a/modules/sociaty/api_cross_mine.go
+++ b/modules/sociaty/api_cross_mine.go
@@ -20,18 +20,22 @@ func (this *apiComp) Mine(session comm.IUserSession, req *pb.SociatyMineReq) (co
return
}
+ rsp := &pb.SociatyMineResp{}
- // 未加入公会
- if userEx.SociatyId == "" {
- code = pb.ErrorCode_SociatyNoAdded
- return
+ // 已加入公会
+ if userEx.SociatyId != "" {
+ sociaty := this.module.modelSociaty.getSociaty(userEx.SociatyId)
+ if sociaty.Id == "" {
+ code = pb.ErrorCode_SociatyNoFound
+ this.module.Errorf("sociatyId: %s no found", userEx.SociatyId)
+ return
+ }
+
+ master := this.module.modelSociaty.getMasterInfo(sociaty)
+ rsp.Sociaty = sociaty
+ rsp.Master = master
}
- sociaty := this.module.modelSociaty.getSociaty(userEx.SociatyId)
-
- rsp := &pb.SociatyMineResp{
- Sociaty: sociaty,
- }
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeMine, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
diff --git a/modules/sociaty/api_cross_quit.go b/modules/sociaty/api_cross_quit.go
index a9ffbdec6..bff3458f8 100644
--- a/modules/sociaty/api_cross_quit.go
+++ b/modules/sociaty/api_cross_quit.go
@@ -10,24 +10,18 @@ import (
// 退出公会
func (this *apiComp) QuitCheck(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode) {
- if req.SociatyId == "" {
- code = pb.ErrorCode_ReqParameterError
- }
return
}
func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode, data proto.Message) {
- if code = this.QuitCheck(session, req); code != pb.ErrorCode_Success {
- return
- }
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
- uid := session.GetUserId()
if err := this.module.modelSociaty.quit(uid, sociaty); err != nil {
code = pb.ErrorCode_SociatyQuit
this.module.Errorf("退出公会失败:%v", err)
diff --git a/modules/sociaty/api_cross_rank.go b/modules/sociaty/api_cross_rank.go
new file mode 100644
index 000000000..fd30b19b0
--- /dev/null
+++ b/modules/sociaty/api_cross_rank.go
@@ -0,0 +1,26 @@
+package sociaty
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+
+ "google.golang.org/protobuf/proto"
+)
+
+// 公会排行榜
+
+func (this *apiComp) RankCheck(session comm.IUserSession, req *pb.SociatyRankReq) (code pb.ErrorCode) {
+ return
+}
+
+func (this *apiComp) Rank(session comm.IUserSession, req *pb.SociatyRankReq) (code pb.ErrorCode, data proto.Message) {
+ list := this.module.modelSociaty.rank()
+ rsp := &pb.SociatyRankResp{
+ Rank: list,
+ }
+
+ if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeRank, rsp); err != nil {
+ code = pb.ErrorCode_SystemError
+ }
+ return
+}
diff --git a/modules/sociaty/api_cross_receive.go b/modules/sociaty/api_cross_receive.go
new file mode 100644
index 000000000..69d00df73
--- /dev/null
+++ b/modules/sociaty/api_cross_receive.go
@@ -0,0 +1,84 @@
+package sociaty
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+
+ "google.golang.org/protobuf/proto"
+)
+
+// 任务奖励领取
+
+func (this *apiComp) ReceiveCheck(session comm.IUserSession, req *pb.SociatyReceiveReq) (code pb.ErrorCode) {
+ if req.TaskId == 0 {
+ code = pb.ErrorCode_ReqParameterError
+ }
+ return
+}
+
+func (this *apiComp) Receive(session comm.IUserSession, req *pb.SociatyReceiveReq) (code pb.ErrorCode, data proto.Message) {
+ if code = this.ReceiveCheck(session, req); code != pb.ErrorCode_Success {
+ return
+ }
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
+ if sociaty.Id == "" {
+ code = pb.ErrorCode_SociatyNoFound
+ this.module.Errorf("uid:%s not in sociaty", uid)
+ return
+ }
+
+ // 判断奖励是否已领
+ sociatyTask := this.module.modelSociaty.getUserTaskList(uid, sociaty.Id)
+ for _, v := range sociatyTask.List {
+ if v.TaskId == req.TaskId && v.Status == 1 {
+ code = pb.ErrorCode_SociatyRewardReceived
+ return
+ }
+ }
+
+ //TODO 验证任务是否完成
+
+ // 领取
+ if err := this.module.modelSociatyTask.receive(req.TaskId, uid, sociaty.Id); err != nil {
+ code = pb.ErrorCode_SociatyRewardReceive
+ this.module.Errorf("领取任务奖励 err:%v", err)
+ return
+ }
+
+ //获取奖励配置
+ ggt, err := this.module.configure.getSociatyTaskCfg()
+ if err != nil || ggt == nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+ conf, ok := ggt.GetDataMap()[req.TaskId]
+ if ok {
+ // 发放个人奖励
+ if code = this.module.DispenseRes(session, conf.Reward, true); code != pb.ErrorCode_Success {
+ this.module.Errorf("发放个人奖励失败 sociatyId:%s uid:%s taskId:%d code:%v", sociaty.Id, uid, req.TaskId, code)
+ }
+ }
+
+ // 更新公会经验和活跃度
+ if err := this.module.modelSociaty.updateResourceFromTask(sociaty, conf); err != nil {
+ this.module.Errorf("更新公会资源 sociatyId:%s uid:%s taskId:%d err:%v", sociaty.Id, uid, req.TaskId, err)
+ return
+ }
+
+ // 更新成员贡献值
+ if err := this.module.modelSociaty.updateMemberContribution(uid, conf.Contribution, sociaty); err != nil {
+ this.module.Errorf("更新成员贡献值 sociatyId:%s uid:%s taskId:%d err:%v", sociaty.Id, uid, req.TaskId, err)
+ return
+ }
+
+ rsp := &pb.SociatyReceiveResp{
+ SociatyId: sociaty.Id,
+ TaskId: req.TaskId,
+ }
+
+ if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeReceive, rsp); err != nil {
+ code = pb.ErrorCode_SystemError
+ }
+ return
+}
diff --git a/modules/sociaty/api_cross_refuse.go b/modules/sociaty/api_cross_refuse.go
index ad9ada2d0..ff1635be5 100644
--- a/modules/sociaty/api_cross_refuse.go
+++ b/modules/sociaty/api_cross_refuse.go
@@ -10,7 +10,7 @@ import (
// 申请复查
func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.SociatyRefuseReq) (code pb.ErrorCode) {
- if req.Uid == "" || req.SociatyId == "" {
+ if req.Uid == "" {
code = pb.ErrorCode_ReqParameterError
}
return
@@ -21,10 +21,10 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.SociatyRefuseReq)
return
}
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
diff --git a/modules/sociaty/api_cross_search.go b/modules/sociaty/api_cross_search.go
index 6d5212e91..ef306ff15 100644
--- a/modules/sociaty/api_cross_search.go
+++ b/modules/sociaty/api_cross_search.go
@@ -21,7 +21,10 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.SociatySearchReq)
}
rsp := &pb.SociatySearchResp{}
- rsp.Sociaty = this.module.modelSociaty.findByName(req.Name)
+ sociaty := this.module.modelSociaty.findByName(req.Name)
+ if sociaty.Id != "" {
+ rsp.List = append(rsp.List, sociaty)
+ }
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeSearch, rsp); err != nil {
code = pb.ErrorCode_SystemError
diff --git a/modules/sociaty/api_cross_setting.go b/modules/sociaty/api_cross_setting.go
index 83fc517a1..3723f9da2 100644
--- a/modules/sociaty/api_cross_setting.go
+++ b/modules/sociaty/api_cross_setting.go
@@ -50,7 +50,7 @@ func (this *apiComp) Setting(session comm.IUserSession, req *pb.SociatySettingRe
SociatyId: sociaty.Id,
}
- if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeAgree, rsp); err != nil {
+ if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeSetting, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
diff --git a/modules/sociaty/api_cross_settingjob.go b/modules/sociaty/api_cross_settingjob.go
index 28d35a7b4..21e126eb4 100644
--- a/modules/sociaty/api_cross_settingjob.go
+++ b/modules/sociaty/api_cross_settingjob.go
@@ -9,7 +9,7 @@ import (
// 设置职位
func (this *apiComp) SettingJobCheck(session comm.IUserSession, req *pb.SociatySettingJobReq) (code pb.ErrorCode) {
- if req.SociatyId == "" || req.TargetId == "" || req.Job == 0 {
+ if req.TargetId == "" || req.Job == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
@@ -19,20 +19,43 @@ func (this *apiComp) SettingJob(session comm.IUserSession, req *pb.SociatySettin
if code = this.SettingJobCheck(session, req); code != pb.ErrorCode_Success {
return
}
- uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
- if sociaty.Id == "" {
- code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ // 全局配置
+ ggd := this.module.configure.GetGlobalConf()
+ if ggd == nil {
+ code = pb.ErrorCode_ConfigNoFound
return
}
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
+ if sociaty.Id == "" {
+ code = pb.ErrorCode_SociatyNoFound
+ this.module.Errorf("uid:%s not in sociaty", uid)
+ return
+ }
+
+ // 权限校验
if !this.module.modelSociaty.isRight(uid, sociaty,
pb.SociatyJob_PRESIDENT) {
code = pb.ErrorCode_SociatyNoRight
return
}
+ // 判断职位人数
+ jobCount := this.module.modelSociaty.getJobCount(req.Job, sociaty)
+ if req.Job == pb.SociatyJob_VICEPRESIDENT && jobCount >= int(ggd.GuildViceAllianceLeaderMaxNum) ||
+ req.Job == pb.SociatyJob_ADMIN && jobCount >= int(ggd.GuildAdministratorsMaxNum) {
+ code = pb.ErrorCode_SociatyMemberCountLimit
+ return
+ }
+
+ // 不能设置自己
+ if uid == req.TargetId {
+ code = pb.ErrorCode_SociatySelfSetting
+ return
+ }
+
+ // 设置职位
if err := this.module.modelSociaty.settingJob(req.TargetId, req.Job, sociaty); err != nil {
code = pb.ErrorCode_SociatySettingJob
this.module.Errorf("设置职位失败:%v", err)
diff --git a/modules/sociaty/api_cross_sign.go b/modules/sociaty/api_cross_sign.go
index 2924daa7e..ff04bb36a 100644
--- a/modules/sociaty/api_cross_sign.go
+++ b/modules/sociaty/api_cross_sign.go
@@ -9,9 +9,6 @@ import (
// 签到
func (this *apiComp) SignCheck(session comm.IUserSession, req *pb.SociatySignReq) (code pb.ErrorCode) {
- if req.SociatyId == "" {
- code = pb.ErrorCode_ReqParameterError
- }
return
}
@@ -21,25 +18,55 @@ func (this *apiComp) Sign(session comm.IUserSession, req *pb.SociatySignReq) (co
}
uid := session.GetUserId()
- sociaty := this.module.modelSociaty.getSociaty(req.SociatyId)
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
- this.module.Errorf("sociatyId: %s no found", req.SociatyId)
+ this.module.Errorf("uid:%s not in sociaty", uid)
return
}
+ if this.module.modelSociaty.IsSign(uid, sociaty) {
+ code = pb.ErrorCode_SociatySigned
+ return
+ }
+
+ // 签到
if err := this.module.modelSociaty.sign(uid, sociaty); err != nil {
code = pb.ErrorCode_SociatyAgree
this.module.Errorf("签到失败:%v", err)
return
}
- //发奖
+ ggs, err := this.module.configure.getSociatySignCfg()
+ if err != nil {
+ code = pb.ErrorCode_ConfigNoFound
+ return
+ }
+ // 发奖
+ lastSignCount := sociaty.LastSignCount
+ var signCfgId int32 //签到配置ID
+ for _, v := range ggs.GetDataList() {
+ if lastSignCount >= v.Down && lastSignCount <= v.Up {
+ // 发放签到奖励
+ if code = this.module.DispenseRes(session, v.Reward, true); code == pb.ErrorCode_Success {
+ signCfgId = v.Id
+ }
+ }
+ }
+
+ if cfg, ok := ggs.GetDataMap()[signCfgId]; ok {
+ // 更新公会经验
+ if cfg.Exp.T == "guildexp" {
+ if err := this.module.modelSociaty.updateSociatyExp(cfg.Exp.N, sociaty); err != nil {
+ this.module.Errorf("公会经验更新失败:%v", err)
+ }
+ }
+ }
rsp := &pb.SociatySignResp{
Uid: uid,
- SociatyId: req.SociatyId,
+ SociatyId: sociaty.Id,
}
if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeSign, rsp); err != nil {
diff --git a/modules/sociaty/api_cross_tasklist.go b/modules/sociaty/api_cross_tasklist.go
new file mode 100644
index 000000000..34bb3c000
--- /dev/null
+++ b/modules/sociaty/api_cross_tasklist.go
@@ -0,0 +1,46 @@
+package sociaty
+
+import (
+ "go_dreamfactory/comm"
+ "go_dreamfactory/pb"
+
+ "google.golang.org/protobuf/proto"
+)
+
+// 任务列表
+
+func (this *apiComp) TaskListCheck(session comm.IUserSession, req *pb.SociatyTaskListReq) (code pb.ErrorCode) {
+ return
+}
+
+func (this *apiComp) TaskList(session comm.IUserSession, req *pb.SociatyTaskListReq) (code pb.ErrorCode, data proto.Message) {
+ uid := session.GetUserId()
+ sociaty := this.module.modelSociaty.getUserSociaty(uid)
+ if sociaty.Id == "" {
+ code = pb.ErrorCode_SociatyNoFound
+ this.module.Errorf("uid:%s not in sociaty", uid)
+ return
+ }
+ rsp := &pb.SociatyTaskListResp{}
+
+ defer func() {
+ if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeTasklist, rsp); err != nil {
+ code = pb.ErrorCode_SystemError
+ }
+ }()
+
+ sociatyTask := this.module.modelSociatyTask.taskList(uid, sociaty.Id)
+ if sociatyTask.SociatyId != "" {
+ var taskList []*pb.SociatyTask
+
+ for _, v := range sociatyTask.List {
+ taskList = append(taskList, &pb.SociatyTask{
+ TaskId: v.TaskId,
+ Status: v.Status,
+ })
+ }
+ rsp.List = taskList
+ }
+
+ return
+}
diff --git a/modules/sociaty/config.go b/modules/sociaty/config.go
index 7e5fffdac..5a88b0b73 100644
--- a/modules/sociaty/config.go
+++ b/modules/sociaty/config.go
@@ -1,16 +1,17 @@
package sociaty
import (
+ "fmt"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
cfg "go_dreamfactory/sys/configure/structs"
)
const (
- gameSociatyLv = "gameSociatyLv"
- gameSociatyTask = "gameSociatyTask"
- gameSociatySign = "gameSociatySign"
- gameSociatyActivity = "gameSociatyActivity"
+ gameSociatyLv = "game_guildlv.json"
+ gameSociatyTask = "game_guildtask.json"
+ gameSociatySign = "game_guildsign.json"
+ gameSociatyActivity = "game_guildactivity.json"
)
type configureComp struct {
@@ -20,10 +21,78 @@ type configureComp struct {
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.LoadMultiConfigure(map[string]interface{}{
- gameSociatyLv: cfg.NewGameSociatyLv,
- gameSociatyTask: cfg.NewGameSociatyTask,
- gameSociatySign: cfg.NewGameSociatySign,
- gameSociatyActivity: cfg.NewGameSociatyActivity,
+ gameSociatyLv: cfg.NewGameGuildLv,
+ gameSociatyTask: cfg.NewGameGuildTask,
+ gameSociatySign: cfg.NewGameGuildSign,
+ gameSociatyActivity: cfg.NewGameGuildActivity,
})
return
}
+
+// 等级配置
+func (this *configureComp) getSociatyLvCfg() (data *cfg.GameGuildLv, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+ if v, err = this.GetConfigure(gameSociatyLv); err != nil {
+ return
+ } else {
+ if data, ok = v.(*cfg.GameGuildLv); !ok {
+ err = fmt.Errorf("%T no is *cfg.GameGuildLv", v)
+ return
+ }
+ }
+ return
+}
+
+// 签到配置
+func (this *configureComp) getSociatySignCfg() (data *cfg.GameGuildSign, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+ if v, err = this.GetConfigure(gameSociatySign); err != nil {
+ return
+ } else {
+ if data, ok = v.(*cfg.GameGuildSign); !ok {
+ err = fmt.Errorf("%T no is *cfg.GameGuildSign", v)
+ return
+ }
+ }
+ return
+}
+
+// 任务配置
+func (this *configureComp) getSociatyTaskCfg() (data *cfg.GameGuildTask, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+ if v, err = this.GetConfigure(gameSociatyTask); err != nil {
+ return
+ } else {
+ if data, ok = v.(*cfg.GameGuildTask); !ok {
+ err = fmt.Errorf("%T no is *cfg.GameGuildTask", v)
+ return
+ }
+ }
+ return
+}
+
+// 活跃度配置
+func (this *configureComp) getSociatyActivityCfg() (data *cfg.GameGuildActivity, err error) {
+ var (
+ v interface{}
+ ok bool
+ )
+ if v, err = this.GetConfigure(gameSociatyActivity); err != nil {
+ return
+ } else {
+ if data, ok = v.(*cfg.GameGuildActivity); !ok {
+ err = fmt.Errorf("%T no is *cfg.GameGuildActivity", v)
+ return
+ }
+ }
+ return
+}
diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go
index a6b1d7ade..8f84381f3 100644
--- a/modules/sociaty/model_sociaty.go
+++ b/modules/sociaty/model_sociaty.go
@@ -6,10 +6,12 @@ import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
+ event_v2 "go_dreamfactory/lego/sys/event/v2"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
+ "go_dreamfactory/utils"
"sort"
"strings"
"time"
@@ -33,6 +35,16 @@ type ModelSociaty struct {
modules.MCompModel
moduleSociaty *Sociaty
service core.IService
+ EventApp *event_v2.App
+}
+
+type SociatyListen struct {
+ event_v2.App
+ sociatyId string
+ name string
+ lv int32
+ activity int32
+ ctime int64
}
func (this *ModelSociaty) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
@@ -40,6 +52,8 @@ func (this *ModelSociaty) Init(service core.IService, module core.IModule, comp
err = this.MCompModel.Init(service, module, comp, options)
this.moduleSociaty = module.(*Sociaty)
this.service = service
+ this.EventApp = event_v2.NewApp()
+ this.EventApp.Listen(comm.EventSociatyRankChanged, this.rankDataChanged)
return
}
@@ -51,6 +65,7 @@ func (this *ModelSociaty) create(sociaty *pb.DBSociaty) error {
_id := primitive.NewObjectID().Hex()
sociaty.Id = _id
sociaty.Ctime = time.Now().Unix()
+ sociaty.Lv = 1 //默认1级
if sociaty.Icon == "" {
sociaty.Icon = "1000" //默认图标
}
@@ -61,13 +76,35 @@ func (this *ModelSociaty) create(sociaty *pb.DBSociaty) error {
}
// 公会列表
-func (this *ModelSociaty) list(filter *pb.SociatyListFilter) (list []*pb.DBSociaty) {
- if pb.SociatyListFilter_ALL == 0 { //所有
+func (this *ModelSociaty) list(uid string, filter pb.SociatyListFilter) (list []*pb.DBSociaty) {
+ user, err := this.moduleSociaty.ModuleUser.GetRemoteUser(uid)
+ if err != nil {
+ return
+ }
+ if user == nil {
+ return
+ }
+
+ switch filter {
+ case pb.SociatyListFilter_ALL: //所有
if err := this.GetList(comm.RDS_SOCIATY, &list); err != nil {
log.Errorf("sociaty list err:%v", err)
return
}
- } else if pb.SociatyListFilter_NOAPPLY == 2 { //无需审批
+ case pb.SociatyListFilter_CONDI: //满足条件
+ //玩家等级大于等于公会的申请等级限制
+ if err := this.GetList(comm.RDS_SOCIATY, &list); err != nil {
+ log.Errorf("sociaty list err:%v", err)
+ return
+ }
+ var newList []*pb.DBSociaty
+ for _, v := range list {
+ if user.Lv >= v.ApplyLv {
+ newList = append(newList, v)
+ }
+ }
+ return newList
+ case pb.SociatyListFilter_NOAPPLY: //无需审批
filter := bson.M{
"isApplyCheck": false,
}
@@ -78,20 +115,23 @@ func (this *ModelSociaty) list(filter *pb.SociatyListFilter) (list []*pb.DBSocia
list = append(list, sociaty)
}
}
- } else if pb.SociatyListFilter_CONDI == 1 { //满足条件
- filter := bson.M{
- "applyLv": bson.D{
- {"$gte", 1},
- }, //玩家等级
+ case pb.SociatyListFilter_APPLYING: //申请中
+ if err := this.GetList(comm.RDS_SOCIATY, &list); err != nil {
+ log.Errorf("sociaty list err:%v", err)
+ return
}
- cur, err := this.DB.Find(comm.TableSociaty, filter)
- for cur.Next(context.TODO()) {
- sociaty := &pb.DBSociaty{}
- if err = cur.Decode(sociaty); err != nil {
- list = append(list, sociaty)
+
+ var newList []*pb.DBSociaty
+ for _, v := range list {
+ for _, apply := range v.ApplyRecord {
+ if apply.Uid == uid {
+ newList = append(newList, v)
+ }
}
}
+ return newList
}
+
return
}
@@ -120,25 +160,39 @@ func (this *ModelSociaty) getSociaty(sociatyId string) (sociaty *pb.DBSociaty) {
return
}
+// 获取玩家所在的公会
+func (this *ModelSociaty) getUserSociaty(uid string) (sociaty *pb.DBSociaty) {
+ sociaty = &pb.DBSociaty{}
+ userEx, err := this.moduleSociaty.ModuleUser.GetRemoteUserExpand(uid)
+ if err != nil {
+ return
+ }
+ if userEx.SociatyId != "" {
+ return this.getSociaty(userEx.SociatyId)
+ }
+ return
+}
+
// 申请公会
func (this *ModelSociaty) apply(uid string, sociaty *pb.DBSociaty) error {
-
- if this.isMember(uid, sociaty) {
- return fmt.Errorf("sociaty[%s] as member", sociaty.Id)
+ // 判断公会审批设置
+ if sociaty.IsApplyCheck { //需要审核
+ sociaty.ApplyRecord = append(sociaty.ApplyRecord, &pb.ApplyRecord{
+ Uid: uid,
+ Ctime: time.Now().Unix(),
+ })
+ update := map[string]interface{}{
+ "applyRecord": sociaty.ApplyRecord,
+ }
+ return this.updateSociaty(sociaty.Id, update)
+ } else { //无需审核直接入会
+ if err := this.addMember(uid, sociaty); err != nil {
+ return err
+ }
+ //初始玩家公会任务
+ this.moduleSociaty.modelSociatyTask.initSociatyTask(uid, sociaty.Id)
}
-
- if this.isApplied(uid, sociaty) {
- return fmt.Errorf("sociaty[%s] is applied", sociaty.Id)
- }
-
- sociaty.ApplyRecord = append(sociaty.ApplyRecord, &pb.ApplyRecord{
- Uid: uid,
- Ctime: time.Now().Unix(),
- })
- update := map[string]interface{}{
- "applyRecord": sociaty.ApplyRecord,
- }
- return this.updateSociaty(sociaty.Id, update)
+ return nil
}
// 设置公会
@@ -152,18 +206,13 @@ func (this *ModelSociaty) setting(sociaty *pb.DBSociaty) error {
return this.updateSociaty(sociaty.Id, update)
}
-//获取会长
-func (this *ModelSociaty) getMaster(sociaty *pb.DBSociaty) *pb.SociatyMember {
- for _, m := range sociaty.Members {
- if m.Job == pb.SociatyJob_PRESIDENT {
- return m
- }
- }
- return nil
-}
-
// 申请撤销
-func (this *ModelSociaty) applyCancel(uid string, sociaty *pb.DBSociaty) error {
+func (this *ModelSociaty) applyCancel(uid, sociatyId string) error {
+ sociaty := this.getSociaty(sociatyId)
+ if sociaty.Id == "" {
+ return fmt.Errorf("sociatyId: %s 公会不存在", sociatyId)
+ }
+
return this.delFromApplyRecord(uid, sociaty)
}
@@ -226,8 +275,7 @@ func (this *ModelSociaty) isRight(uid string, sociaty *pb.DBSociaty, jobs ...pb.
// 更新公会
func (this *ModelSociaty) updateSociaty(sociatyId string, update map[string]interface{}) error {
- this.ChangeList(comm.RDS_SOCIATY, sociatyId, update)
- return nil
+ return this.ChangeList(comm.RDS_SOCIATY, sociatyId, update)
}
// 退出公会
@@ -273,7 +321,16 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error {
update := map[string]interface{}{
"members": sociaty.Members,
}
- return this.updateSociaty(sociaty.Id, update)
+ if err := this.updateSociaty(sociaty.Id, update); err != nil {
+ return err
+ }
+
+ // 更新玩家公会
+ updateEx := map[string]interface{}{
+ "sociatyId": sociaty.Id,
+ }
+
+ return this.moduleSociaty.ModuleUser.ChangeRemoteUserExpand(uid, updateEx)
}
// 成员列表
@@ -288,6 +345,7 @@ func (this *ModelSociaty) members(sociaty *pb.DBSociaty) (list []*pb.SociatyMemb
Name: user.Name,
Avatar: user.Avatar,
Lv: user.Lv,
+ Job: m.Job,
OfflineTime: user.Offlinetime,
})
}
@@ -308,7 +366,9 @@ func (this *ModelSociaty) agree(uid string, sociaty *pb.DBSociaty) error {
if err := this.addMember(uid, sociaty); err != nil {
return err
}
- return nil
+
+ //初始玩家公会任务
+ return this.moduleSociaty.modelSociatyTask.initSociatyTask(uid, sociaty.Id)
}
//拒绝
@@ -447,6 +507,7 @@ func (this *ModelSociaty) assign(srcId, targetId string, sociaty *pb.DBSociaty)
// 踢出公会
// targetId 踢出目标
+// 不允许踢出会长
func (this *ModelSociaty) discharge(targetId string, sociaty *pb.DBSociaty) error {
for i, m := range sociaty.Members {
if m.Uid == targetId {
@@ -462,6 +523,16 @@ func (this *ModelSociaty) discharge(targetId string, sociaty *pb.DBSociaty) erro
return this.updateSociaty(sociaty.Id, update)
}
+//获取职位数
+func (this *ModelSociaty) getJobCount(job pb.SociatyJob, sociaty *pb.DBSociaty) (count int) {
+ for _, m := range sociaty.Members {
+ if m.Job == job {
+ count++
+ }
+ }
+ return
+}
+
// 设置职位
func (this *ModelSociaty) settingJob(targetId string, job pb.SociatyJob, sociaty *pb.DBSociaty) error {
for _, m := range sociaty.Members {
@@ -475,9 +546,29 @@ func (this *ModelSociaty) settingJob(targetId string, job pb.SociatyJob, sociaty
return this.updateSociaty(sociaty.Id, update)
}
+// 获取会长信息
+func (this *ModelSociaty) getMasterInfo(sociaty *pb.DBSociaty) *pb.SociatyMemberInfo {
+ for _, m := range sociaty.Members {
+ if m.Job == pb.SociatyJob_PRESIDENT {
+ user, err := this.moduleSociaty.ModuleUser.GetRemoteUser(m.Uid)
+ if err != nil || user.Uid == "" {
+ continue
+ }
+ return &pb.SociatyMemberInfo{
+ Uid: user.Uid,
+ Name: user.Name,
+ Lv: user.Lv,
+ Avatar: user.Avatar,
+ OfflineTime: user.Offlinetime,
+ }
+ }
+ }
+ return nil
+}
+
// 弹劾会长
func (this *ModelSociaty) accuse(sociaty *pb.DBSociaty) error {
- master := this.getMaster(sociaty)
+ master := this.getMasterInfo(sociaty)
if master == nil {
return errors.New("会长不存在")
}
@@ -490,7 +581,7 @@ func (this *ModelSociaty) accuse(sociaty *pb.DBSociaty) error {
now := time.Now().Unix()
left := now - user.Offlinetime
if left < 7*3600 || user.Offlinetime == 0 {
- return errors.New("会长很称职")
+ return errors.New("会长很称职,无需弹劾")
}
return nil
@@ -510,8 +601,150 @@ func (this *ModelSociaty) sign(uid string, sociaty *pb.DBSociaty) error {
return this.updateSociaty(sociaty.Id, update)
}
-// 签到奖励
-func (this *ModelSociaty) getSignReward() []*cfg.Gameatn {
-
- return nil
+// 是否已签到
+func (this *ModelSociaty) IsSign(uid string, sociaty *pb.DBSociaty) bool {
+ if _, ok := utils.Findx(sociaty.SignIds, uid); ok {
+ return ok
+ }
+ return false
+}
+
+// 获取玩家任务列表
+func (this *ModelSociaty) getUserTaskList(uid, sociatyId string) (sociatyTask *pb.DBSociatyTask) {
+ sociatyTask = &pb.DBSociatyTask{}
+ this.moduleSociaty.modelSociatyTask.GetListObj(sociatyId, uid, sociatyTask)
+ return
+}
+
+// 更新公会资源 活跃度、经验
+func (this *ModelSociaty) updateResourceFromTask(sociaty *pb.DBSociaty, conf *cfg.GameGuildTaskData) error {
+ if conf == nil {
+ return errors.New("配置未找到")
+ }
+ exp := sociaty.Exp //经验
+ activity := sociaty.Activity //活跃度
+
+ for _, v := range conf.SociatyReward {
+ if v.T == "guildactive" {
+ activity += v.N
+ } else if v.T == "guildexp" {
+ exp += v.N
+ }
+ }
+ update := map[string]interface{}{
+ "exp": exp,
+ "activity": activity,
+ }
+ return this.updateSociaty(sociaty.Id, update)
+}
+
+// 更新经验
+func (this *ModelSociaty) updateSociatyExp(val int32, sociaty *pb.DBSociaty) error {
+ exp := sociaty.Exp //经验
+ exp += val
+ update := map[string]interface{}{
+ "exp": exp,
+ }
+ return this.updateSociaty(sociaty.Id, update)
+}
+
+// 更新成员贡献值
+// 任务领取时更新
+func (this *ModelSociaty) updateMemberContribution(uid string, val int32, sociaty *pb.DBSociaty) error {
+ for _, m := range sociaty.Members {
+ if m.Uid == uid {
+ m.Contribution += val
+ }
+ }
+
+ update := map[string]interface{}{
+ "members": sociaty.Members,
+ }
+ return this.updateSociaty(sociaty.Id, update)
+}
+
+func (this *ModelSociaty) sort(list []*pb.DBSociatyRank) []*pb.DBSociatyRank {
+ sort.SliceStable(list, func(i, j int) bool {
+ if list[i].Lv == list[j].Lv {
+ if list[i].Activity == list[j].Activity {
+ return list[i].Ctime > list[j].Ctime
+ } else {
+ return list[i].Activity < list[j].Activity
+ }
+ }
+ return list[i].Lv < list[j].Lv
+ })
+ return list
+}
+
+// 公会等级变化
+// 更新排行榜
+func (this *ModelSociaty) rankDataChanged(event interface{}, next func(event interface{})) {
+ var list []*pb.DBSociatyRank
+ if err := this.GetList(comm.RDS_SOCIATYRANK, &list); err != nil {
+ log.Errorf("sociaty list err:%v", err)
+ return
+ }
+
+ data := event.(*SociatyListen)
+
+ newRank := &pb.DBSociatyRank{
+ SociatyId: data.sociatyId,
+ Name: data.name,
+ Lv: data.lv,
+ Activity: data.activity,
+ Ctime: data.ctime,
+ }
+ if len(list) == 0 || len(list) > 0 && len(list) < 20 {
+ if data != nil {
+ this.AddList(comm.RDS_SOCIATYRANK, data.sociatyId, newRank)
+ }
+ } else {
+ this.AddList(comm.RDS_SOCIATYRANK, data.sociatyId, newRank)
+ if err := this.GetList(comm.RDS_SOCIATYRANK, &list); err != nil {
+ log.Errorf("sociaty list err:%v", err)
+ return
+ }
+ // 排名
+ tmp := this.sort(list)
+ //找出20条之后的数据
+ lastData := append(tmp[:19], tmp[len(tmp)-1:]...)
+ //删除20之后的数据
+ delIds := []string{}
+ for _, v := range lastData {
+ delIds = append(delIds, v.SociatyId)
+ }
+ this.DelListlds(comm.RDS_SOCIATYRANK, delIds...)
+ }
+}
+
+// 排行榜
+func (this *ModelSociaty) rank() (rank []*pb.DBSociatyRank) {
+ var list []*pb.DBSociaty
+ if err := this.GetList(comm.RDS_SOCIATYRANK, &list); err != nil {
+ log.Errorf("sociaty list err:%v", err)
+ return nil
+ }
+
+ for _, v := range list {
+ rank = append(rank, &pb.DBSociatyRank{
+ Name: v.Name,
+ Lv: v.Lv,
+ Activity: v.Activity,
+ Ctime: v.Ctime,
+ })
+ }
+
+ rank = this.sort(rank)
+
+ rank = append(rank[:0], rank[19:]...)
+
+ return
+}
+
+func (this *ModelSociaty) isInCDHour(userCdTime int64) bool {
+ if userCdTime == 0 {
+ return false
+ }
+ return time.Now().Unix() < userCdTime
}
diff --git a/modules/sociaty/model_sociatytask.go b/modules/sociaty/model_sociatytask.go
new file mode 100644
index 000000000..6d3e6219c
--- /dev/null
+++ b/modules/sociaty/model_sociatytask.go
@@ -0,0 +1,89 @@
+package sociaty
+
+import (
+ "errors"
+ "go_dreamfactory/comm"
+ "go_dreamfactory/lego/core"
+ "go_dreamfactory/modules"
+ "go_dreamfactory/pb"
+ "go_dreamfactory/utils"
+)
+
+type ModelSociatyTask struct {
+ modules.MCompModel
+ moduleSociaty *Sociaty
+ service core.IService
+}
+
+func (this *ModelSociatyTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
+ this.TableName = comm.TableSociaty
+ err = this.MCompModel.Init(service, module, comp, options)
+ this.moduleSociaty = module.(*Sociaty)
+ this.service = service
+ return
+}
+
+// 初始化公会任务 加入成员时初始化
+func (this *ModelSociatyTask) initSociatyTask(uid, sociatyId string) error {
+ ggt, err := this.moduleSociaty.configure.getSociatyTaskCfg()
+ if err != nil || ggt == nil {
+ return errors.New("SociatyTaskCfg not found")
+ }
+ sociatyTask := &pb.DBSociatyTask{
+ SociatyId: sociatyId,
+ Uid: uid,
+ }
+ var taskList []*pb.SociatyTask
+
+ list := ggt.GetDataList()
+ // 大于4条配置
+ if len(list) > 4 {
+ //随机4条任务
+ randInts := utils.Numbers(0, len(list)-1, 4)
+ for _, v := range randInts {
+ taskList = append(taskList, &pb.SociatyTask{
+ TaskId: list[v].Id,
+ })
+ }
+ } else {
+ for _, v := range list {
+ taskList = append(taskList, &pb.SociatyTask{
+ TaskId: v.Id,
+ })
+ }
+ }
+ sociatyTask.List = taskList
+ return this.moduleSociaty.modelSociatyTask.AddList(sociatyId, uid, sociatyTask)
+}
+
+//任务列表
+func (this *ModelSociatyTask) taskList(uid, sociatyId string) (task *pb.DBSociatyTask) {
+ task = &pb.DBSociatyTask{}
+ this.GetListObj(sociatyId, uid, task)
+ return
+}
+
+// 删除公会任务
+func (this *ModelSociatyTask) deleTask(sociatyId, uid string) error {
+ return this.DelListlds(sociatyId, uid)
+}
+
+// 奖励领取
+func (this *ModelSociatyTask) receive(taskId int32, sociatyId, uid string) error {
+ sociatyTask := &pb.DBSociatyTask{}
+ this.GetListObj(sociatyId, uid, sociatyTask)
+ for _, t := range sociatyTask.List {
+ if t.TaskId == taskId {
+ t.Status = 1 //领取
+ }
+ }
+ update := map[string]interface{}{
+ "list": sociatyTask.List,
+ }
+ return this.ChangeList(sociatyId, uid, update)
+}
+
+// 活跃度领取
+func (this *ModelSociatyTask) activityReceive() error {
+ return nil
+}
diff --git a/modules/sociaty/module.go b/modules/sociaty/module.go
index 4b24a1d32..f6e1f9d43 100644
--- a/modules/sociaty/module.go
+++ b/modules/sociaty/module.go
@@ -5,6 +5,7 @@ import (
"go_dreamfactory/lego/base"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
+ "go_dreamfactory/pb"
"time"
)
@@ -12,10 +13,11 @@ var _ comm.ISociaty = (*Sociaty)(nil)
type Sociaty struct {
modules.ModuleBase
- api *apiComp
- service base.IRPCXService
- modelSociaty *ModelSociaty
- configure *modules.MCompConfigure
+ api *apiComp
+ service base.IRPCXService
+ modelSociaty *ModelSociaty
+ modelSociatyTask *ModelSociatyTask
+ configure *configureComp
}
func NewModule() core.IModule {
@@ -35,6 +37,8 @@ func (this *Sociaty) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelSociaty = this.RegisterComp(new(ModelSociaty)).(*ModelSociaty)
+ this.modelSociatyTask = this.RegisterComp(new(ModelSociatyTask)).(*ModelSociatyTask)
+ this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
func (this *Sociaty) Start() (err error) {
@@ -68,3 +72,9 @@ func (this *Sociaty) ProcessAccuse(uid, sociatyId string) {
}
}
}
+
+// 公会成员
+func (this *Sociaty) Members(uid string) (list []*pb.SociatyMemberInfo) {
+ sociaty := this.modelSociaty.getUserSociaty(uid)
+ return this.modelSociaty.members(sociaty)
+}
diff --git a/modules/timer/module.go b/modules/timer/module.go
index 64b9a2643..56446e8b3 100644
--- a/modules/timer/module.go
+++ b/modules/timer/module.go
@@ -30,6 +30,7 @@ type Timer struct {
season *SeasonPagoda
forum *ForumComp
arena *ArenaComp
+ sociaty *SociatyTimer
}
//模块名
@@ -64,6 +65,7 @@ func (this *Timer) OnInstallComp() {
this.chat = this.RegisterComp(new(ChatComp)).(*ChatComp)
this.season = this.RegisterComp(new(SeasonPagoda)).(*SeasonPagoda)
this.arena = this.RegisterComp(new(ArenaComp)).(*ArenaComp)
+ this.sociaty = this.RegisterComp(new(SociatyTimer)).(*SociatyTimer)
}
//日志
diff --git a/modules/timer/sociaty.go b/modules/timer/sociaty.go
new file mode 100644
index 000000000..e9f286954
--- /dev/null
+++ b/modules/timer/sociaty.go
@@ -0,0 +1,47 @@
+package timer
+
+import (
+ "context"
+ "go_dreamfactory/comm"
+ "go_dreamfactory/lego/core"
+ "go_dreamfactory/lego/sys/cron"
+ "go_dreamfactory/modules"
+ "go_dreamfactory/pb"
+
+ "go.mongodb.org/mongo-driver/bson"
+)
+
+type SociatyTimer struct {
+ modules.MCompModel
+ service core.IService
+}
+
+//组件初始化接口
+func (this *SociatyTimer) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
+ this.TableName = comm.TableSociaty
+ this.MCompModel.Init(service, module, comp, options)
+ this.service = service
+ return
+}
+
+func (this *SociatyTimer) Start() (err error) {
+ err = this.MCompModel.Start()
+ cron.AddFunc("0 0 12 * * ?", this.updateSign)
+ return
+}
+
+// updateSign
+func (this *SociatyTimer) updateSign() {
+ cur, err := this.DB.Find(core.SqlTable(this.TableName), bson.M{})
+ if err != nil {
+ return
+ }
+ for cur.Next(context.TODO()) {
+ sociaty := &pb.DBSociaty{}
+ if err = cur.Decode(sociaty); err == nil {
+ sociaty.LastSignCount = int32(len(sociaty.SignIds))
+ sociaty.SignIds = make([]string, 0)
+ _, err = this.DB.UpdateOne(core.SqlTable(this.TableName), bson.M{}, sociaty)
+ }
+ }
+}
diff --git a/modules/user/module.go b/modules/user/module.go
index 0ac8ba408..5cb057b81 100644
--- a/modules/user/module.go
+++ b/modules/user/module.go
@@ -202,7 +202,7 @@ func (this *User) QueryAttributeValue(uid string, attr string) (value int64) {
err error
)
if this.IsCross() {
- user, err = this.GetRmoteUser(uid)
+ user, err = this.GetRemoteUser(uid)
if err != nil {
return
}
@@ -239,13 +239,13 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
err error
)
if this.IsCross() {
- user, err = this.GetRmoteUser(uid)
+ user, err = this.GetRemoteUser(uid)
if err != nil {
code = pb.ErrorCode_UserSessionNobeing
return
}
- userEx, err = this.GetUserExpand(uid)
+ userEx, err = this.GetRemoteUserExpand(uid)
if err != nil {
code = pb.ErrorCode_UserExpandNull
return
diff --git a/pb/sociaty_db.pb.go b/pb/sociaty_db.pb.go
index b6665b19f..090da4d73 100644
--- a/pb/sociaty_db.pb.go
+++ b/pb/sociaty_db.pb.go
@@ -313,9 +313,10 @@ type SociatyMember struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //成员ID
- Job SociatyJob `protobuf:"varint,2,opt,name=job,proto3,enum=SociatyJob" json:"job" bson:"job"` //职位
- Ctime int64 `protobuf:"varint,3,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //入会时间
+ Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid" bson:"uid"` //成员ID
+ Job SociatyJob `protobuf:"varint,2,opt,name=job,proto3,enum=SociatyJob" json:"job" bson:"job"` //职位
+ Ctime int64 `protobuf:"varint,3,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //入会时间
+ Contribution int32 `protobuf:"varint,4,opt,name=contribution,proto3" json:"contribution" bson:"contribution"` //贡献值
}
func (x *SociatyMember) Reset() {
@@ -371,6 +372,13 @@ func (x *SociatyMember) GetCtime() int64 {
return 0
}
+func (x *SociatyMember) GetContribution() int32 {
+ if x != nil {
+ return x.Contribution
+ }
+ return 0
+}
+
// 日志
type SociatyLog struct {
state protoimpl.MessageState
@@ -427,6 +435,205 @@ func (x *SociatyLog) GetCtime() int64 {
return 0
}
+// 公会成员任务
+type DBSociatyTask struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"` //@go_tags(`bson:"sociatyId") 公会ID
+ Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
+ List []*SociatyTask `protobuf:"bytes,3,rep,name=list,proto3" json:"list" bson:"list"` //任务列表
+}
+
+func (x *DBSociatyTask) Reset() {
+ *x = DBSociatyTask{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_db_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBSociatyTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBSociatyTask) ProtoMessage() {}
+
+func (x *DBSociatyTask) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_db_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 DBSociatyTask.ProtoReflect.Descriptor instead.
+func (*DBSociatyTask) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DBSociatyTask) GetSociatyId() string {
+ if x != nil {
+ return x.SociatyId
+ }
+ return ""
+}
+
+func (x *DBSociatyTask) GetUid() string {
+ if x != nil {
+ return x.Uid
+ }
+ return ""
+}
+
+func (x *DBSociatyTask) GetList() []*SociatyTask {
+ if x != nil {
+ return x.List
+ }
+ return nil
+}
+
+type SociatyTask struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId" bson:"taskId"` //任务ID
+ Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status" bson:"status"` //领取状态:0未领取 1已领取
+}
+
+func (x *SociatyTask) Reset() {
+ *x = SociatyTask{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_db_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyTask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyTask) ProtoMessage() {}
+
+func (x *SociatyTask) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_db_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 SociatyTask.ProtoReflect.Descriptor instead.
+func (*SociatyTask) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *SociatyTask) GetTaskId() int32 {
+ if x != nil {
+ return x.TaskId
+ }
+ return 0
+}
+
+func (x *SociatyTask) GetStatus() int32 {
+ if x != nil {
+ return x.Status
+ }
+ return 0
+}
+
+//排行榜
+type DBSociatyRank struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId" bson:"sociatyId"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" bson:"name"` //公会名称
+ Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv" bson:"lv"` //等级
+ Activity int32 `protobuf:"varint,4,opt,name=activity,proto3" json:"activity" bson:"activity"` //活跃度
+ Ctime int64 `protobuf:"varint,5,opt,name=ctime,proto3" json:"ctime" bson:"ctime"` //公会创建时间
+}
+
+func (x *DBSociatyRank) Reset() {
+ *x = DBSociatyRank{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_db_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DBSociatyRank) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DBSociatyRank) ProtoMessage() {}
+
+func (x *DBSociatyRank) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_db_proto_msgTypes[6]
+ 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 DBSociatyRank.ProtoReflect.Descriptor instead.
+func (*DBSociatyRank) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_db_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *DBSociatyRank) GetSociatyId() string {
+ if x != nil {
+ return x.SociatyId
+ }
+ return ""
+}
+
+func (x *DBSociatyRank) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DBSociatyRank) GetLv() int32 {
+ if x != nil {
+ return x.Lv
+ }
+ return 0
+}
+
+func (x *DBSociatyRank) GetActivity() int32 {
+ if x != nil {
+ return x.Activity
+ }
+ return 0
+}
+
+func (x *DBSociatyRank) GetCtime() int64 {
+ if x != nil {
+ return x.Ctime
+ }
+ return 0
+}
+
var File_sociaty_sociaty_db_proto protoreflect.FileDescriptor
var file_sociaty_sociaty_db_proto_rawDesc = []byte{
@@ -465,22 +672,43 @@ var file_sociaty_sociaty_db_proto_rawDesc = []byte{
0x35, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
- 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x7a, 0x0a, 0x0d, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x3c,
- 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07,
- 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
- 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x50, 0x0a, 0x0a,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f,
- 0x4a, 0x4f, 0x42, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10,
- 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d,
- 0x56, 0x49, 0x43, 0x45, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12,
- 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x42, 0x06,
- 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x22,
+ 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
+ 0x6f, 0x6e, 0x22, 0x3c, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x6f, 0x67,
+ 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74,
+ 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65,
+ 0x22, 0x61, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73,
+ 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12,
+ 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
+ 0x64, 0x12, 0x20, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0c, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6c,
+ 0x69, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x0b, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61,
+ 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0d, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
+ 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69,
+ 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x2a, 0x50, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4a, 0x4f, 0x42, 0x10,
+ 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a,
+ 0x05, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x56, 0x49, 0x43, 0x45,
+ 0x50, 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x50,
+ 0x52, 0x45, 0x53, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
+ 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -496,24 +724,28 @@ func file_sociaty_sociaty_db_proto_rawDescGZIP() []byte {
}
var file_sociaty_sociaty_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_sociaty_sociaty_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_sociaty_sociaty_db_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_sociaty_sociaty_db_proto_goTypes = []interface{}{
(SociatyJob)(0), // 0: SociatyJob
(*DBSociaty)(nil), // 1: DBSociaty
(*ApplyRecord)(nil), // 2: ApplyRecord
(*SociatyMember)(nil), // 3: SociatyMember
(*SociatyLog)(nil), // 4: SociatyLog
+ (*DBSociatyTask)(nil), // 5: DBSociatyTask
+ (*SociatyTask)(nil), // 6: SociatyTask
+ (*DBSociatyRank)(nil), // 7: DBSociatyRank
}
var file_sociaty_sociaty_db_proto_depIdxs = []int32{
2, // 0: DBSociaty.applyRecord:type_name -> ApplyRecord
3, // 1: DBSociaty.members:type_name -> SociatyMember
4, // 2: DBSociaty.logs:type_name -> SociatyLog
0, // 3: SociatyMember.job:type_name -> SociatyJob
- 4, // [4:4] is the sub-list for method output_type
- 4, // [4:4] is the sub-list for method input_type
- 4, // [4:4] is the sub-list for extension type_name
- 4, // [4:4] is the sub-list for extension extendee
- 0, // [0:4] is the sub-list for field type_name
+ 6, // 4: DBSociatyTask.list:type_name -> SociatyTask
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
}
func init() { file_sociaty_sociaty_db_proto_init() }
@@ -570,6 +802,42 @@ func file_sociaty_sociaty_db_proto_init() {
return nil
}
}
+ file_sociaty_sociaty_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBSociatyTask); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyTask); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DBSociatyRank); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -577,7 +845,7 @@ func file_sociaty_sociaty_db_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sociaty_sociaty_db_proto_rawDesc,
NumEnums: 1,
- NumMessages: 4,
+ NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/pb/sociaty_msg.pb.go b/pb/sociaty_msg.pb.go
index 214935f08..cf3209145 100644
--- a/pb/sociaty_msg.pb.go
+++ b/pb/sociaty_msg.pb.go
@@ -24,9 +24,10 @@ const (
type SociatyListFilter int32
const (
- SociatyListFilter_ALL SociatyListFilter = 0 //全部
- SociatyListFilter_CONDI SociatyListFilter = 1 //满足条件
- SociatyListFilter_NOAPPLY SociatyListFilter = 2 //无审批
+ SociatyListFilter_ALL SociatyListFilter = 0 //全部
+ SociatyListFilter_CONDI SociatyListFilter = 1 //满足条件
+ SociatyListFilter_NOAPPLY SociatyListFilter = 2 //无审批
+ SociatyListFilter_APPLYING SociatyListFilter = 3 //申请中
)
// Enum value maps for SociatyListFilter.
@@ -35,11 +36,13 @@ var (
0: "ALL",
1: "CONDI",
2: "NOAPPLY",
+ 3: "APPLYING",
}
SociatyListFilter_value = map[string]int32{
- "ALL": 0,
- "CONDI": 1,
- "NOAPPLY": 2,
+ "ALL": 0,
+ "CONDI": 1,
+ "NOAPPLY": 2,
+ "APPLYING": 3,
}
)
@@ -353,7 +356,7 @@ type SociatySearchResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Sociaty *DBSociaty `protobuf:"bytes,1,opt,name=sociaty,proto3" json:"sociaty"`
+ List []*DBSociaty `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
}
func (x *SociatySearchResp) Reset() {
@@ -388,9 +391,9 @@ func (*SociatySearchResp) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{5}
}
-func (x *SociatySearchResp) GetSociaty() *DBSociaty {
+func (x *SociatySearchResp) GetList() []*DBSociaty {
if x != nil {
- return x.Sociaty
+ return x.List
}
return nil
}
@@ -566,7 +569,8 @@ type SociatyMineResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Sociaty *DBSociaty `protobuf:"bytes,1,opt,name=sociaty,proto3" json:"sociaty"` //公会信息
+ Sociaty *DBSociaty `protobuf:"bytes,1,opt,name=sociaty,proto3" json:"sociaty"` //公会信息
+ Master *SociatyMemberInfo `protobuf:"bytes,2,opt,name=master,proto3" json:"master"` // 会长
}
func (x *SociatyMineResp) Reset() {
@@ -608,17 +612,25 @@ func (x *SociatyMineResp) GetSociaty() *DBSociaty {
return nil
}
+func (x *SociatyMineResp) GetMaster() *SociatyMemberInfo {
+ if x != nil {
+ return x.Master
+ }
+ return nil
+}
+
//成员信息
type SociatyMemberInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //昵称
- Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar"` //头像
- Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` //等级
- OfflineTime int64 `protobuf:"varint,5,opt,name=offlineTime,proto3" json:"offlineTime"` //离线时间
+ Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //昵称
+ Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar"` //头像
+ Lv int32 `protobuf:"varint,4,opt,name=lv,proto3" json:"lv"` //等级
+ Job SociatyJob `protobuf:"varint,5,opt,name=job,proto3,enum=SociatyJob" json:"job"` //职位
+ OfflineTime int64 `protobuf:"varint,6,opt,name=offlineTime,proto3" json:"offlineTime"` //离线时间
}
func (x *SociatyMemberInfo) Reset() {
@@ -681,6 +693,13 @@ func (x *SociatyMemberInfo) GetLv() int32 {
return 0
}
+func (x *SociatyMemberInfo) GetJob() SociatyJob {
+ if x != nil {
+ return x.Job
+ }
+ return SociatyJob_NOJOB
+}
+
func (x *SociatyMemberInfo) GetOfflineTime() int64 {
if x != nil {
return x.OfflineTime
@@ -995,8 +1014,7 @@ type SociatyAgreeReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
- SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId"`
+ Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
}
func (x *SociatyAgreeReq) Reset() {
@@ -1038,13 +1056,6 @@ func (x *SociatyAgreeReq) GetUid() string {
return ""
}
-func (x *SociatyAgreeReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyAgreeResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1106,8 +1117,7 @@ type SociatyRefuseReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
- SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId"`
+ Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
}
func (x *SociatyRefuseReq) Reset() {
@@ -1149,13 +1159,6 @@ func (x *SociatyRefuseReq) GetUid() string {
return ""
}
-func (x *SociatyRefuseReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyRefuseResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1211,7 +1214,6 @@ func (x *SociatyRefuseResp) GetSociatyId() string {
return ""
}
-// 拒绝
// 撤销申请
type SociatyCancelReq struct {
state protoimpl.MessageState
@@ -1294,8 +1296,6 @@ type SociatyQuitReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
}
func (x *SociatyQuitReq) Reset() {
@@ -1330,13 +1330,6 @@ func (*SociatyQuitReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{23}
}
-func (x *SociatyQuitReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyQuitResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1397,8 +1390,6 @@ type SociatyDismissReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
}
func (x *SociatyDismissReq) Reset() {
@@ -1433,13 +1424,6 @@ func (*SociatyDismissReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{25}
}
-func (x *SociatyDismissReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyDismissResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1500,8 +1484,6 @@ type SociatyMembersReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
}
func (x *SociatyMembersReq) Reset() {
@@ -1536,13 +1518,6 @@ func (*SociatyMembersReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{27}
}
-func (x *SociatyMembersReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyMembersResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -1596,8 +1571,7 @@ type SociatyAssignReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
- TargetId string `protobuf:"bytes,2,opt,name=targetId,proto3" json:"targetId"` //转让目标玩家ID
+ TargetId string `protobuf:"bytes,1,opt,name=targetId,proto3" json:"targetId"` //转让目标玩家ID
}
func (x *SociatyAssignReq) Reset() {
@@ -1632,13 +1606,6 @@ func (*SociatyAssignReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{29}
}
-func (x *SociatyAssignReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
func (x *SociatyAssignReq) GetTargetId() string {
if x != nil {
return x.TargetId
@@ -1707,8 +1674,7 @@ type SociatyDischargeReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
- TargetId string `protobuf:"bytes,2,opt,name=targetId,proto3" json:"targetId"` //踢出目标玩家ID
+ TargetId string `protobuf:"bytes,1,opt,name=targetId,proto3" json:"targetId"` //踢出目标玩家ID
}
func (x *SociatyDischargeReq) Reset() {
@@ -1743,13 +1709,6 @@ func (*SociatyDischargeReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{31}
}
-func (x *SociatyDischargeReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
func (x *SociatyDischargeReq) GetTargetId() string {
if x != nil {
return x.TargetId
@@ -1818,9 +1777,8 @@ type SociatySettingJobReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
- TargetId string `protobuf:"bytes,2,opt,name=targetId,proto3" json:"targetId"` //目标玩家ID
- Job SociatyJob `protobuf:"varint,3,opt,name=job,proto3,enum=SociatyJob" json:"job"` //职位
+ TargetId string `protobuf:"bytes,1,opt,name=targetId,proto3" json:"targetId"` //目标玩家ID
+ Job SociatyJob `protobuf:"varint,2,opt,name=job,proto3,enum=SociatyJob" json:"job"` //职位
}
func (x *SociatySettingJobReq) Reset() {
@@ -1855,13 +1813,6 @@ func (*SociatySettingJobReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{33}
}
-func (x *SociatySettingJobReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
func (x *SociatySettingJobReq) GetTargetId() string {
if x != nil {
return x.TargetId
@@ -1944,8 +1895,6 @@ type SociatyAccuseReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
}
func (x *SociatyAccuseReq) Reset() {
@@ -1980,13 +1929,6 @@ func (*SociatyAccuseReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{35}
}
-func (x *SociatyAccuseReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatyAccuseResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2039,8 +1981,6 @@ type SociatySignReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- SociatyId string `protobuf:"bytes,1,opt,name=sociatyId,proto3" json:"sociatyId"`
}
func (x *SociatySignReq) Reset() {
@@ -2075,13 +2015,6 @@ func (*SociatySignReq) Descriptor() ([]byte, []int) {
return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{37}
}
-func (x *SociatySignReq) GetSociatyId() string {
- if x != nil {
- return x.SociatyId
- }
- return ""
-}
-
type SociatySignResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2137,6 +2070,384 @@ func (x *SociatySignResp) GetSociatyId() string {
return ""
}
+// 任务列表
+type SociatyTaskListReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SociatyTaskListReq) Reset() {
+ *x = SociatyTaskListReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyTaskListReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyTaskListReq) ProtoMessage() {}
+
+func (x *SociatyTaskListReq) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[39]
+ 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 SociatyTaskListReq.ProtoReflect.Descriptor instead.
+func (*SociatyTaskListReq) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{39}
+}
+
+type SociatyTaskListResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ List []*SociatyTask `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
+}
+
+func (x *SociatyTaskListResp) Reset() {
+ *x = SociatyTaskListResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyTaskListResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyTaskListResp) ProtoMessage() {}
+
+func (x *SociatyTaskListResp) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[40]
+ 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 SociatyTaskListResp.ProtoReflect.Descriptor instead.
+func (*SociatyTaskListResp) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *SociatyTaskListResp) GetList() []*SociatyTask {
+ if x != nil {
+ return x.List
+ }
+ return nil
+}
+
+// 任务奖励领取
+type SociatyReceiveReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"` //任务ID
+}
+
+func (x *SociatyReceiveReq) Reset() {
+ *x = SociatyReceiveReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyReceiveReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyReceiveReq) ProtoMessage() {}
+
+func (x *SociatyReceiveReq) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[41]
+ 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 SociatyReceiveReq.ProtoReflect.Descriptor instead.
+func (*SociatyReceiveReq) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *SociatyReceiveReq) GetTaskId() int32 {
+ if x != nil {
+ return x.TaskId
+ }
+ return 0
+}
+
+type SociatyReceiveResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
+ SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId"`
+}
+
+func (x *SociatyReceiveResp) Reset() {
+ *x = SociatyReceiveResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyReceiveResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyReceiveResp) ProtoMessage() {}
+
+func (x *SociatyReceiveResp) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[42]
+ 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 SociatyReceiveResp.ProtoReflect.Descriptor instead.
+func (*SociatyReceiveResp) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *SociatyReceiveResp) GetTaskId() int32 {
+ if x != nil {
+ return x.TaskId
+ }
+ return 0
+}
+
+func (x *SociatyReceiveResp) GetSociatyId() string {
+ if x != nil {
+ return x.SociatyId
+ }
+ return ""
+}
+
+//活跃度奖励领取
+type SociatyActivityReceiveReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` //配置ID
+}
+
+func (x *SociatyActivityReceiveReq) Reset() {
+ *x = SociatyActivityReceiveReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyActivityReceiveReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyActivityReceiveReq) ProtoMessage() {}
+
+func (x *SociatyActivityReceiveReq) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[43]
+ 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 SociatyActivityReceiveReq.ProtoReflect.Descriptor instead.
+func (*SociatyActivityReceiveReq) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *SociatyActivityReceiveReq) GetId() int32 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+type SociatyActivityReceiveResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
+ SociatyId string `protobuf:"bytes,2,opt,name=sociatyId,proto3" json:"sociatyId"`
+}
+
+func (x *SociatyActivityReceiveResp) Reset() {
+ *x = SociatyActivityReceiveResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyActivityReceiveResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyActivityReceiveResp) ProtoMessage() {}
+
+func (x *SociatyActivityReceiveResp) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[44]
+ 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 SociatyActivityReceiveResp.ProtoReflect.Descriptor instead.
+func (*SociatyActivityReceiveResp) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{44}
+}
+
+func (x *SociatyActivityReceiveResp) GetId() int32 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+func (x *SociatyActivityReceiveResp) GetSociatyId() string {
+ if x != nil {
+ return x.SociatyId
+ }
+ return ""
+}
+
+// 公会排行榜
+type SociatyRankReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SociatyRankReq) Reset() {
+ *x = SociatyRankReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyRankReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyRankReq) ProtoMessage() {}
+
+func (x *SociatyRankReq) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[45]
+ 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 SociatyRankReq.ProtoReflect.Descriptor instead.
+func (*SociatyRankReq) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{45}
+}
+
+type SociatyRankResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rank []*DBSociatyRank `protobuf:"bytes,1,rep,name=rank,proto3" json:"rank"`
+}
+
+func (x *SociatyRankResp) Reset() {
+ *x = SociatyRankResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SociatyRankResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SociatyRankResp) ProtoMessage() {}
+
+func (x *SociatyRankResp) ProtoReflect() protoreflect.Message {
+ mi := &file_sociaty_sociaty_msg_proto_msgTypes[46]
+ 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 SociatyRankResp.ProtoReflect.Descriptor instead.
+func (*SociatyRankResp) Descriptor() ([]byte, []int) {
+ return file_sociaty_sociaty_msg_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *SociatyRankResp) GetRank() []*DBSociatyRank {
+ if x != nil {
+ return x.Rank
+ }
+ return nil
+}
+
var File_sociaty_sociaty_msg_proto protoreflect.FileDescriptor
var file_sociaty_sociaty_msg_proto_rawDesc = []byte{
@@ -2165,153 +2476,164 @@ var file_sociaty_sociaty_msg_proto_rawDesc = []byte{
0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74,
0x22, 0x26, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63,
0x68, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69,
- 0x61, 0x74, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a,
- 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
- 0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x69,
- 0x61, 0x74, 0x79, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53,
- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63,
- 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e,
- 0x6f, 0x74, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74,
- 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x68,
- 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70,
- 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79,
- 0x4c, 0x76, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4c,
- 0x76, 0x22, 0x32, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69,
- 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x22, 0x83, 0x01, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62,
- 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
- 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76,
- 0x61, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
- 0x52, 0x02, 0x6c, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x54,
- 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69,
- 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
- 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
- 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x14, 0x53,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a,
+ 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42,
+ 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x9b, 0x01,
+ 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x12, 0x22, 0x0a,
+ 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x68, 0x65, 0x63,
+ 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x76, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x76, 0x22, 0x32, 0x0a, 0x12, 0x53,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
+ 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22,
+ 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x69, 0x6e, 0x65, 0x52, 0x65,
+ 0x71, 0x22, 0x63, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x69, 0x6e, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x52, 0x07, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x6d, 0x61,
+ 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x53, 0x6f, 0x63,
+ 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
+ 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x22, 0xa2, 0x01, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61,
+ 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03,
+ 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f,
+ 0x62, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66,
+ 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
+ 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x13, 0x53,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28,
- 0x0b, 0x32, 0x12, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65,
- 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2f, 0x0a, 0x0f, 0x53,
- 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1c,
- 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x10,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
- 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x63, 0x6f, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
- 0x22, 0x35, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79,
- 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63,
- 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x53, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
- 0x64, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x67, 0x72, 0x65,
- 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
- 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41,
- 0x67, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
- 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69,
- 0x61, 0x74, 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
- 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c,
- 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x11,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
- 0x64, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x63,
- 0x65, 0x6c, 0x52, 0x65, 0x71, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2e, 0x0a, 0x0e, 0x53, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09,
- 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a,
- 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
- 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x31, 0x0a,
- 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x52,
0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
- 0x22, 0x44, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69,
- 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x22, 0x3e, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79,
+ 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74,
+ 0x22, 0x2f, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79,
+ 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
+ 0x64, 0x22, 0x42, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c,
+ 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x63, 0x6f, 0x69, 0x61,
+ 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x69,
+ 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x1c,
+ 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x16,
+ 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x43, 0x61, 0x6e, 0x63,
+ 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63,
- 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
- 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73,
- 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
- 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x3c, 0x0a, 0x12, 0x53, 0x6f, 0x63,
- 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x26, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66,
- 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73,
+ 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x10, 0x53,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x67, 0x72, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
+ 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
+ 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22,
+ 0x24, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x66, 0x75, 0x73, 0x65,
+ 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x43, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x52, 0x65, 0x66, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09,
+ 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x22, 0x13,
+ 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52,
+ 0x65, 0x73, 0x70, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, 0x75,
+ 0x69, 0x74, 0x52, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x52, 0x65, 0x71, 0x22, 0x44, 0x0a,
+ 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x49, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x22, 0x3c, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26,
+ 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x53,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+ 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61,
+ 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61,
+ 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73,
0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72,
0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73,
- 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67,
- 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67,
- 0x65, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44,
- 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73,
- 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
- 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72,
- 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a,
- 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x6f, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x12,
- 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a,
- 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x70, 0x0a, 0x15, 0x53, 0x6f, 0x63, 0x69,
- 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12,
- 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x6a,
- 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61,
- 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x30, 0x0a, 0x10, 0x53, 0x6f,
- 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1c,
- 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x11,
- 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22,
- 0x2e, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
- 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22,
- 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
- 0x49, 0x64, 0x2a, 0x34, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4c, 0x69, 0x73,
- 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00,
- 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4e,
- 0x4f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
- 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08,
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a,
+ 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x22, 0x51, 0x0a, 0x14, 0x53, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a, 0x6f, 0x62, 0x52,
+ 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x12, 0x1d,
+ 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x53, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x70, 0x0a,
+ 0x15, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4a,
+ 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61,
+ 0x74, 0x79, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64,
+ 0x12, 0x1d, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e,
+ 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4a, 0x6f, 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22,
+ 0x12, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x63, 0x75, 0x73, 0x65,
+ 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63,
+ 0x63, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63,
+ 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x22, 0x41, 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69,
+ 0x61, 0x74, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
+ 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x53,
+ 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+ 0x71, 0x22, 0x37, 0x0a, 0x13, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x54, 0x61, 0x73, 0x6b,
+ 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x11, 0x53, 0x6f,
+ 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12,
+ 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x12, 0x53, 0x6f, 0x63, 0x69, 0x61,
+ 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a,
+ 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74,
+ 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74,
+ 0x79, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x19, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63,
+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
+ 0x22, 0x4a, 0x0a, 0x1a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76,
+ 0x69, 0x74, 0x79, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c,
+ 0x0a, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e,
+ 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x22, 0x35,
+ 0x0a, 0x0f, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73,
+ 0x70, 0x12, 0x22, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0e, 0x2e, 0x44, 0x42, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x52, 0x61, 0x6e, 0x6b, 0x52,
+ 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x2a, 0x42, 0x0a, 0x11, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79,
+ 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c,
+ 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x10, 0x01, 0x12, 0x0b,
+ 0x0a, 0x07, 0x4e, 0x4f, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41,
+ 0x50, 0x50, 0x4c, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70,
+ 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -2327,65 +2649,79 @@ func file_sociaty_sociaty_msg_proto_rawDescGZIP() []byte {
}
var file_sociaty_sociaty_msg_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_sociaty_sociaty_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 39)
+var file_sociaty_sociaty_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 47)
var file_sociaty_sociaty_msg_proto_goTypes = []interface{}{
- (SociatyListFilter)(0), // 0: SociatyListFilter
- (*SociatyCreateReq)(nil), // 1: SociatyCreateReq
- (*SociatyCreateResp)(nil), // 2: SociatyCreateResp
- (*SociatyListReq)(nil), // 3: SociatyListReq
- (*SociatyListResp)(nil), // 4: SociatyListResp
- (*SociatySearchReq)(nil), // 5: SociatySearchReq
- (*SociatySearchResp)(nil), // 6: SociatySearchResp
- (*SociatySettingReq)(nil), // 7: SociatySettingReq
- (*SociatySettingResp)(nil), // 8: SociatySettingResp
- (*SociatyMineReq)(nil), // 9: SociatyMineReq
- (*SociatyMineResp)(nil), // 10: SociatyMineResp
- (*SociatyMemberInfo)(nil), // 11: SociatyMemberInfo
- (*SociatyApplyListReq)(nil), // 12: SociatyApplyListReq
- (*SociatyApplyListResp)(nil), // 13: SociatyApplyListResp
- (*SociatyApplyReq)(nil), // 14: SociatyApplyReq
- (*SociatyApplyResp)(nil), // 15: SociatyApplyResp
- (*SociatyApplyCancelReq)(nil), // 16: SociatyApplyCancelReq
- (*SociatyApplyCancelResp)(nil), // 17: SociatyApplyCancelResp
- (*SociatyAgreeReq)(nil), // 18: SociatyAgreeReq
- (*SociatyAgreeResp)(nil), // 19: SociatyAgreeResp
- (*SociatyRefuseReq)(nil), // 20: SociatyRefuseReq
- (*SociatyRefuseResp)(nil), // 21: SociatyRefuseResp
- (*SociatyCancelReq)(nil), // 22: SociatyCancelReq
- (*SociatyCancelResp)(nil), // 23: SociatyCancelResp
- (*SociatyQuitReq)(nil), // 24: SociatyQuitReq
- (*SociatyQuitResp)(nil), // 25: SociatyQuitResp
- (*SociatyDismissReq)(nil), // 26: SociatyDismissReq
- (*SociatyDismissResp)(nil), // 27: SociatyDismissResp
- (*SociatyMembersReq)(nil), // 28: SociatyMembersReq
- (*SociatyMembersResp)(nil), // 29: SociatyMembersResp
- (*SociatyAssignReq)(nil), // 30: SociatyAssignReq
- (*SociatyAssignResp)(nil), // 31: SociatyAssignResp
- (*SociatyDischargeReq)(nil), // 32: SociatyDischargeReq
- (*SociatyDischargeResp)(nil), // 33: SociatyDischargeResp
- (*SociatySettingJobReq)(nil), // 34: SociatySettingJobReq
- (*SociatySettingJobResp)(nil), // 35: SociatySettingJobResp
- (*SociatyAccuseReq)(nil), // 36: SociatyAccuseReq
- (*SociatyAccuseResp)(nil), // 37: SociatyAccuseResp
- (*SociatySignReq)(nil), // 38: SociatySignReq
- (*SociatySignResp)(nil), // 39: SociatySignResp
- (*DBSociaty)(nil), // 40: DBSociaty
- (SociatyJob)(0), // 41: SociatyJob
+ (SociatyListFilter)(0), // 0: SociatyListFilter
+ (*SociatyCreateReq)(nil), // 1: SociatyCreateReq
+ (*SociatyCreateResp)(nil), // 2: SociatyCreateResp
+ (*SociatyListReq)(nil), // 3: SociatyListReq
+ (*SociatyListResp)(nil), // 4: SociatyListResp
+ (*SociatySearchReq)(nil), // 5: SociatySearchReq
+ (*SociatySearchResp)(nil), // 6: SociatySearchResp
+ (*SociatySettingReq)(nil), // 7: SociatySettingReq
+ (*SociatySettingResp)(nil), // 8: SociatySettingResp
+ (*SociatyMineReq)(nil), // 9: SociatyMineReq
+ (*SociatyMineResp)(nil), // 10: SociatyMineResp
+ (*SociatyMemberInfo)(nil), // 11: SociatyMemberInfo
+ (*SociatyApplyListReq)(nil), // 12: SociatyApplyListReq
+ (*SociatyApplyListResp)(nil), // 13: SociatyApplyListResp
+ (*SociatyApplyReq)(nil), // 14: SociatyApplyReq
+ (*SociatyApplyResp)(nil), // 15: SociatyApplyResp
+ (*SociatyApplyCancelReq)(nil), // 16: SociatyApplyCancelReq
+ (*SociatyApplyCancelResp)(nil), // 17: SociatyApplyCancelResp
+ (*SociatyAgreeReq)(nil), // 18: SociatyAgreeReq
+ (*SociatyAgreeResp)(nil), // 19: SociatyAgreeResp
+ (*SociatyRefuseReq)(nil), // 20: SociatyRefuseReq
+ (*SociatyRefuseResp)(nil), // 21: SociatyRefuseResp
+ (*SociatyCancelReq)(nil), // 22: SociatyCancelReq
+ (*SociatyCancelResp)(nil), // 23: SociatyCancelResp
+ (*SociatyQuitReq)(nil), // 24: SociatyQuitReq
+ (*SociatyQuitResp)(nil), // 25: SociatyQuitResp
+ (*SociatyDismissReq)(nil), // 26: SociatyDismissReq
+ (*SociatyDismissResp)(nil), // 27: SociatyDismissResp
+ (*SociatyMembersReq)(nil), // 28: SociatyMembersReq
+ (*SociatyMembersResp)(nil), // 29: SociatyMembersResp
+ (*SociatyAssignReq)(nil), // 30: SociatyAssignReq
+ (*SociatyAssignResp)(nil), // 31: SociatyAssignResp
+ (*SociatyDischargeReq)(nil), // 32: SociatyDischargeReq
+ (*SociatyDischargeResp)(nil), // 33: SociatyDischargeResp
+ (*SociatySettingJobReq)(nil), // 34: SociatySettingJobReq
+ (*SociatySettingJobResp)(nil), // 35: SociatySettingJobResp
+ (*SociatyAccuseReq)(nil), // 36: SociatyAccuseReq
+ (*SociatyAccuseResp)(nil), // 37: SociatyAccuseResp
+ (*SociatySignReq)(nil), // 38: SociatySignReq
+ (*SociatySignResp)(nil), // 39: SociatySignResp
+ (*SociatyTaskListReq)(nil), // 40: SociatyTaskListReq
+ (*SociatyTaskListResp)(nil), // 41: SociatyTaskListResp
+ (*SociatyReceiveReq)(nil), // 42: SociatyReceiveReq
+ (*SociatyReceiveResp)(nil), // 43: SociatyReceiveResp
+ (*SociatyActivityReceiveReq)(nil), // 44: SociatyActivityReceiveReq
+ (*SociatyActivityReceiveResp)(nil), // 45: SociatyActivityReceiveResp
+ (*SociatyRankReq)(nil), // 46: SociatyRankReq
+ (*SociatyRankResp)(nil), // 47: SociatyRankResp
+ (*DBSociaty)(nil), // 48: DBSociaty
+ (SociatyJob)(0), // 49: SociatyJob
+ (*SociatyTask)(nil), // 50: SociatyTask
+ (*DBSociatyRank)(nil), // 51: DBSociatyRank
}
var file_sociaty_sociaty_msg_proto_depIdxs = []int32{
0, // 0: SociatyListReq.filter:type_name -> SociatyListFilter
- 40, // 1: SociatyListResp.list:type_name -> DBSociaty
- 40, // 2: SociatySearchResp.sociaty:type_name -> DBSociaty
- 40, // 3: SociatyMineResp.sociaty:type_name -> DBSociaty
- 11, // 4: SociatyApplyListResp.list:type_name -> SociatyMemberInfo
- 11, // 5: SociatyMembersResp.list:type_name -> SociatyMemberInfo
- 41, // 6: SociatySettingJobReq.job:type_name -> SociatyJob
- 41, // 7: SociatySettingJobResp.job:type_name -> SociatyJob
- 8, // [8:8] is the sub-list for method output_type
- 8, // [8:8] is the sub-list for method input_type
- 8, // [8:8] is the sub-list for extension type_name
- 8, // [8:8] is the sub-list for extension extendee
- 0, // [0:8] is the sub-list for field type_name
+ 48, // 1: SociatyListResp.list:type_name -> DBSociaty
+ 48, // 2: SociatySearchResp.list:type_name -> DBSociaty
+ 48, // 3: SociatyMineResp.sociaty:type_name -> DBSociaty
+ 11, // 4: SociatyMineResp.master:type_name -> SociatyMemberInfo
+ 49, // 5: SociatyMemberInfo.job:type_name -> SociatyJob
+ 11, // 6: SociatyApplyListResp.list:type_name -> SociatyMemberInfo
+ 11, // 7: SociatyMembersResp.list:type_name -> SociatyMemberInfo
+ 49, // 8: SociatySettingJobReq.job:type_name -> SociatyJob
+ 49, // 9: SociatySettingJobResp.job:type_name -> SociatyJob
+ 50, // 10: SociatyTaskListResp.list:type_name -> SociatyTask
+ 51, // 11: SociatyRankResp.rank:type_name -> DBSociatyRank
+ 12, // [12:12] is the sub-list for method output_type
+ 12, // [12:12] is the sub-list for method input_type
+ 12, // [12:12] is the sub-list for extension type_name
+ 12, // [12:12] is the sub-list for extension extendee
+ 0, // [0:12] is the sub-list for field type_name
}
func init() { file_sociaty_sociaty_msg_proto_init() }
@@ -2863,6 +3199,102 @@ func file_sociaty_sociaty_msg_proto_init() {
return nil
}
}
+ file_sociaty_sociaty_msg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyTaskListReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyTaskListResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyReceiveReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyReceiveResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyActivityReceiveReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyActivityReceiveResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyRankReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_sociaty_sociaty_msg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SociatyRankResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -2870,7 +3302,7 @@ func file_sociaty_sociaty_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sociaty_sociaty_msg_proto_rawDesc,
NumEnums: 1,
- NumMessages: 39,
+ NumMessages: 47,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/sys/configure/structs/Game.GuildActivity.go b/sys/configure/structs/Game.GuildActivity.go
new file mode 100644
index 000000000..b5a0a935c
--- /dev/null
+++ b/sys/configure/structs/Game.GuildActivity.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGuildActivity struct {
+ _dataMap map[int32]*GameGuildActivityData
+ _dataList []*GameGuildActivityData
+}
+
+func NewGameGuildActivity(_buf []map[string]interface{}) (*GameGuildActivity, error) {
+ _dataList := make([]*GameGuildActivityData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGuildActivityData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGuildActivityData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Id] = _v
+ }
+ }
+ return &GameGuildActivity{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGuildActivity) GetDataMap() map[int32]*GameGuildActivityData {
+ return table._dataMap
+}
+
+func (table *GameGuildActivity) GetDataList() []*GameGuildActivityData {
+ return table._dataList
+}
+
+func (table *GameGuildActivity) Get(key int32) *GameGuildActivityData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GuildActivityData.go b/sys/configure/structs/Game.GuildActivityData.go
new file mode 100644
index 000000000..91770d77c
--- /dev/null
+++ b/sys/configure/structs/Game.GuildActivityData.go
@@ -0,0 +1,52 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGuildActivityData struct {
+ Id int32
+ Activity int32
+ Reward []*Gameatn
+}
+
+const TypeId_GameGuildActivityData = 1556214768
+
+func (*GameGuildActivityData) GetTypeId() int32 {
+ return 1556214768
+}
+
+func (_v *GameGuildActivityData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["activity"].(float64); !_ok_ { err = errors.New("activity error"); return }; _v.Activity = int32(_tempNum_) }
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
+
+ _v.Reward = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.Reward = append(_v.Reward, _list_v_)
+ }
+ }
+
+ return
+}
+
+func DeserializeGameGuildActivityData(_buf map[string]interface{}) (*GameGuildActivityData, error) {
+ v := &GameGuildActivityData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Game.GuildLv.go b/sys/configure/structs/Game.GuildLv.go
new file mode 100644
index 000000000..fe01609fa
--- /dev/null
+++ b/sys/configure/structs/Game.GuildLv.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGuildLv struct {
+ _dataMap map[int32]*GameGuildLvData
+ _dataList []*GameGuildLvData
+}
+
+func NewGameGuildLv(_buf []map[string]interface{}) (*GameGuildLv, error) {
+ _dataList := make([]*GameGuildLvData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGuildLvData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGuildLvData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Lv] = _v
+ }
+ }
+ return &GameGuildLv{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGuildLv) GetDataMap() map[int32]*GameGuildLvData {
+ return table._dataMap
+}
+
+func (table *GameGuildLv) GetDataList() []*GameGuildLvData {
+ return table._dataList
+}
+
+func (table *GameGuildLv) Get(key int32) *GameGuildLvData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GuildLvData.go b/sys/configure/structs/Game.GuildLvData.go
new file mode 100644
index 000000000..a9119b9e2
--- /dev/null
+++ b/sys/configure/structs/Game.GuildLvData.go
@@ -0,0 +1,39 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGuildLvData struct {
+ Lv int32
+ Exp int32
+ MemberMax int32
+}
+
+const TypeId_GameGuildLvData = 150033963
+
+func (*GameGuildLvData) GetTypeId() int32 {
+ return 150033963
+}
+
+func (_v *GameGuildLvData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lv"].(float64); !_ok_ { err = errors.New("lv error"); return }; _v.Lv = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exp"].(float64); !_ok_ { err = errors.New("exp error"); return }; _v.Exp = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["member_max"].(float64); !_ok_ { err = errors.New("member_max error"); return }; _v.MemberMax = int32(_tempNum_) }
+ return
+}
+
+func DeserializeGameGuildLvData(_buf map[string]interface{}) (*GameGuildLvData, error) {
+ v := &GameGuildLvData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Game.GuildPng.go b/sys/configure/structs/Game.GuildPng.go
new file mode 100644
index 000000000..8e603d117
--- /dev/null
+++ b/sys/configure/structs/Game.GuildPng.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGuildPng struct {
+ _dataMap map[int32]*GameGuildPngData
+ _dataList []*GameGuildPngData
+}
+
+func NewGameGuildPng(_buf []map[string]interface{}) (*GameGuildPng, error) {
+ _dataList := make([]*GameGuildPngData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGuildPngData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGuildPngData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Id] = _v
+ }
+ }
+ return &GameGuildPng{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGuildPng) GetDataMap() map[int32]*GameGuildPngData {
+ return table._dataMap
+}
+
+func (table *GameGuildPng) GetDataList() []*GameGuildPngData {
+ return table._dataList
+}
+
+func (table *GameGuildPng) Get(key int32) *GameGuildPngData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GuildPngData.go b/sys/configure/structs/Game.GuildPngData.go
new file mode 100644
index 000000000..5bc7789fb
--- /dev/null
+++ b/sys/configure/structs/Game.GuildPngData.go
@@ -0,0 +1,37 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGuildPngData struct {
+ Id int32
+ Png string
+}
+
+const TypeId_GameGuildPngData = -586458500
+
+func (*GameGuildPngData) GetTypeId() int32 {
+ return -586458500
+}
+
+func (_v *GameGuildPngData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
+ { var _ok_ bool; if _v.Png, _ok_ = _buf["png"].(string); !_ok_ { err = errors.New("png error"); return } }
+ return
+}
+
+func DeserializeGameGuildPngData(_buf map[string]interface{}) (*GameGuildPngData, error) {
+ v := &GameGuildPngData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Game.GuildSign.go b/sys/configure/structs/Game.GuildSign.go
new file mode 100644
index 000000000..6e9221e86
--- /dev/null
+++ b/sys/configure/structs/Game.GuildSign.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGuildSign struct {
+ _dataMap map[int32]*GameGuildSignData
+ _dataList []*GameGuildSignData
+}
+
+func NewGameGuildSign(_buf []map[string]interface{}) (*GameGuildSign, error) {
+ _dataList := make([]*GameGuildSignData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGuildSignData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGuildSignData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Id] = _v
+ }
+ }
+ return &GameGuildSign{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGuildSign) GetDataMap() map[int32]*GameGuildSignData {
+ return table._dataMap
+}
+
+func (table *GameGuildSign) GetDataList() []*GameGuildSignData {
+ return table._dataList
+}
+
+func (table *GameGuildSign) Get(key int32) *GameGuildSignData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GuildSignData.go b/sys/configure/structs/Game.GuildSignData.go
new file mode 100644
index 000000000..228fb571b
--- /dev/null
+++ b/sys/configure/structs/Game.GuildSignData.go
@@ -0,0 +1,58 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGuildSignData struct {
+ Id int32
+ Down int32
+ Up int32
+ SignInText string
+ Reward []*Gameatn
+ Exp *Gameatn
+}
+
+const TypeId_GameGuildSignData = -171525346
+
+func (*GameGuildSignData) GetTypeId() int32 {
+ return -171525346
+}
+
+func (_v *GameGuildSignData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["down"].(float64); !_ok_ { err = errors.New("down error"); return }; _v.Down = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["up"].(float64); !_ok_ { err = errors.New("up error"); return }; _v.Up = int32(_tempNum_) }
+ {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["SignIn_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.SignInText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.SignInText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
+
+ _v.Reward = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.Reward = append(_v.Reward, _list_v_)
+ }
+ }
+
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["exp"].(map[string]interface{}); !_ok_ { err = errors.New("exp error"); return }; if _v.Exp, err = DeserializeGameatn(_x_); err != nil { return } }
+ return
+}
+
+func DeserializeGameGuildSignData(_buf map[string]interface{}) (*GameGuildSignData, error) {
+ v := &GameGuildSignData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Game.GuildTask.go b/sys/configure/structs/Game.GuildTask.go
new file mode 100644
index 000000000..1aafe73ee
--- /dev/null
+++ b/sys/configure/structs/Game.GuildTask.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGuildTask struct {
+ _dataMap map[int32]*GameGuildTaskData
+ _dataList []*GameGuildTaskData
+}
+
+func NewGameGuildTask(_buf []map[string]interface{}) (*GameGuildTask, error) {
+ _dataList := make([]*GameGuildTaskData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGuildTaskData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGuildTaskData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Id] = _v
+ }
+ }
+ return &GameGuildTask{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGuildTask) GetDataMap() map[int32]*GameGuildTaskData {
+ return table._dataMap
+}
+
+func (table *GameGuildTask) GetDataList() []*GameGuildTaskData {
+ return table._dataList
+}
+
+func (table *GameGuildTask) Get(key int32) *GameGuildTaskData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GuildTaskData.go b/sys/configure/structs/Game.GuildTaskData.go
new file mode 100644
index 000000000..e394e9e6a
--- /dev/null
+++ b/sys/configure/structs/Game.GuildTaskData.go
@@ -0,0 +1,69 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGuildTaskData struct {
+ Id int32
+ Weight int32
+ Reward []*Gameatn
+ SociatyReward []*Gameatn
+ Contribution int32
+}
+
+const TypeId_GameGuildTaskData = -892997914
+
+func (*GameGuildTaskData) GetTypeId() int32 {
+ return -892997914
+}
+
+func (_v *GameGuildTaskData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
+
+ _v.Reward = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.Reward = append(_v.Reward, _list_v_)
+ }
+ }
+
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["sociaty_reward"].([]interface{}); !_ok_ { err = errors.New("sociaty_reward error"); return }
+
+ _v.SociatyReward = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.SociatyReward = append(_v.SociatyReward, _list_v_)
+ }
+ }
+
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["contribution"].(float64); !_ok_ { err = errors.New("contribution error"); return }; _v.Contribution = int32(_tempNum_) }
+ return
+}
+
+func DeserializeGameGuildTaskData(_buf map[string]interface{}) (*GameGuildTaskData, error) {
+ v := &GameGuildTaskData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Game.SociatyTaskData.go b/sys/configure/structs/Game.SociatyTaskData.go
index 9a9c350a2..383b05c94 100644
--- a/sys/configure/structs/Game.SociatyTaskData.go
+++ b/sys/configure/structs/Game.SociatyTaskData.go
@@ -44,7 +44,7 @@ func (_v *GameSociatyTaskData)Deserialize(_buf map[string]interface{}) (err erro
{
var _arr_ []interface{}
var _ok_ bool
- if _arr_, _ok_ = _buf["sociaty_reword"].([]interface{}); !_ok_ { err = errors.New("sociaty_reword error"); return }
+ if _arr_, _ok_ = _buf["sociaty_reward"].([]interface{}); !_ok_ { err = errors.New("sociaty_reward error"); return }
_v.SociatyReword = make([]*Gameatn, 0, len(_arr_))