Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
c0cae0b509
@ -163,7 +163,7 @@
|
||||
},
|
||||
"usetype": 1,
|
||||
"color": 4,
|
||||
"bagtype": 0,
|
||||
"bagtype": 1,
|
||||
"index": 99,
|
||||
"special_type": 200,
|
||||
"time": 0,
|
||||
@ -196,7 +196,7 @@
|
||||
},
|
||||
"usetype": 1,
|
||||
"color": 5,
|
||||
"bagtype": 0,
|
||||
"bagtype": 1,
|
||||
"index": 99,
|
||||
"special_type": 150,
|
||||
"time": 0,
|
||||
@ -8870,7 +8870,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000201",
|
||||
"t": "15000101",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -8933,7 +8933,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000202",
|
||||
"t": "15000102",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -8996,7 +8996,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000203",
|
||||
"t": "15000103",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -9059,7 +9059,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000204",
|
||||
"t": "15000104",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -9110,7 +9110,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000301",
|
||||
"t": "15000201",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -9161,7 +9161,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000302",
|
||||
"t": "15000202",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -9212,7 +9212,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000303",
|
||||
"t": "15000203",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
@ -9263,7 +9263,7 @@
|
||||
"decompose_get": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "15000304",
|
||||
"t": "15000204",
|
||||
"n": 2
|
||||
}
|
||||
],
|
||||
|
@ -115970,9 +115970,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 15,
|
||||
"hppro": 3.5,
|
||||
"atkpro": 1,
|
||||
"defpro": 0.1,
|
||||
"hppro": 2.5,
|
||||
"atkpro": 0.5,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -116270,9 +116270,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 20,
|
||||
"hppro": 4,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.1,
|
||||
"hppro": 3.5,
|
||||
"atkpro": 0.65,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -116570,9 +116570,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 25,
|
||||
"hppro": 5,
|
||||
"atkpro": 1.3,
|
||||
"defpro": 0.1,
|
||||
"hppro": 4.5,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -116870,9 +116870,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 30,
|
||||
"hppro": 6,
|
||||
"atkpro": 1.3,
|
||||
"defpro": 0.1,
|
||||
"hppro": 5.5,
|
||||
"atkpro": 0.95,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -117170,9 +117170,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 35,
|
||||
"hppro": 8,
|
||||
"atkpro": 1.4,
|
||||
"defpro": 0.1,
|
||||
"hppro": 6.5,
|
||||
"atkpro": 1.1,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -117470,9 +117470,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 40,
|
||||
"hppro": 10,
|
||||
"atkpro": 1.4,
|
||||
"defpro": 0.1,
|
||||
"hppro": 7.5,
|
||||
"atkpro": 1.25,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -117770,9 +117770,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 45,
|
||||
"hppro": 12,
|
||||
"atkpro": 1.5,
|
||||
"defpro": 0.1,
|
||||
"hppro": 8.5,
|
||||
"atkpro": 1.4,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -118070,9 +118070,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 50,
|
||||
"hppro": 14,
|
||||
"atkpro": 1.5,
|
||||
"defpro": 0.1,
|
||||
"hppro": 9.5,
|
||||
"atkpro": 1.55,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -118370,9 +118370,9 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 55,
|
||||
"hppro": 16,
|
||||
"atkpro": 2,
|
||||
"defpro": 0.1,
|
||||
"hppro": 11,
|
||||
"atkpro": 1.7,
|
||||
"defpro": 0.5,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
"skill3": 1,
|
||||
@ -118671,7 +118671,7 @@
|
||||
"newskill": [],
|
||||
"lv": 10,
|
||||
"hppro": 2,
|
||||
"atkpro": 1,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -118970,8 +118970,8 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 15,
|
||||
"hppro": 3,
|
||||
"atkpro": 1,
|
||||
"hppro": 2.5,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -119270,8 +119270,8 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 20,
|
||||
"hppro": 4,
|
||||
"atkpro": 1,
|
||||
"hppro": 3,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -119570,8 +119570,8 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 25,
|
||||
"hppro": 5,
|
||||
"atkpro": 1,
|
||||
"hppro": 3.5,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -119870,8 +119870,8 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 30,
|
||||
"hppro": 6,
|
||||
"atkpro": 1,
|
||||
"hppro": 4,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -120170,8 +120170,8 @@
|
||||
"equip": [],
|
||||
"newskill": [],
|
||||
"lv": 35,
|
||||
"hppro": 7,
|
||||
"atkpro": 1,
|
||||
"hppro": 6,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -120471,7 +120471,7 @@
|
||||
"newskill": [],
|
||||
"lv": 40,
|
||||
"hppro": 8,
|
||||
"atkpro": 1,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -120771,7 +120771,7 @@
|
||||
"newskill": [],
|
||||
"lv": 45,
|
||||
"hppro": 10,
|
||||
"atkpro": 1,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -121071,7 +121071,7 @@
|
||||
"newskill": [],
|
||||
"lv": 50,
|
||||
"hppro": 12,
|
||||
"atkpro": 1,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -121371,7 +121371,7 @@
|
||||
"newskill": [],
|
||||
"lv": 55,
|
||||
"hppro": 14,
|
||||
"atkpro": 1,
|
||||
"atkpro": 0.8,
|
||||
"defpro": 0.3,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -121671,7 +121671,7 @@
|
||||
"newskill": [],
|
||||
"lv": 10,
|
||||
"hppro": 2,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -121971,7 +121971,7 @@
|
||||
"newskill": [],
|
||||
"lv": 15,
|
||||
"hppro": 3,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -122271,7 +122271,7 @@
|
||||
"newskill": [],
|
||||
"lv": 20,
|
||||
"hppro": 4,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -122571,7 +122571,7 @@
|
||||
"newskill": [],
|
||||
"lv": 25,
|
||||
"hppro": 5,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -122871,7 +122871,7 @@
|
||||
"newskill": [],
|
||||
"lv": 30,
|
||||
"hppro": 6,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -123171,7 +123171,7 @@
|
||||
"newskill": [],
|
||||
"lv": 35,
|
||||
"hppro": 7,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -123471,7 +123471,7 @@
|
||||
"newskill": [],
|
||||
"lv": 40,
|
||||
"hppro": 8,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -123771,7 +123771,7 @@
|
||||
"newskill": [],
|
||||
"lv": 45,
|
||||
"hppro": 10,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -124071,7 +124071,7 @@
|
||||
"newskill": [],
|
||||
"lv": 50,
|
||||
"hppro": 11,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
@ -124371,7 +124371,7 @@
|
||||
"newskill": [],
|
||||
"lv": 55,
|
||||
"hppro": 12,
|
||||
"atkpro": 1.5,
|
||||
"atkpro": 1.2,
|
||||
"defpro": 0.4,
|
||||
"skill1": 1,
|
||||
"skill2": 1,
|
||||
|
@ -1841,5 +1841,32 @@
|
||||
"uiid": 0,
|
||||
"activateType": 0,
|
||||
"notify": []
|
||||
},
|
||||
{
|
||||
"id": "friendMz",
|
||||
"name": {
|
||||
"key": "opencond_opencond_name_80",
|
||||
"text": "好友木桩"
|
||||
},
|
||||
"main": [
|
||||
{
|
||||
"key": 4,
|
||||
"param": 10
|
||||
},
|
||||
{
|
||||
"key": 1,
|
||||
"param": 10
|
||||
}
|
||||
],
|
||||
"wkqbx": 0,
|
||||
"kqbx": 0,
|
||||
"img": "",
|
||||
"prompt": {
|
||||
"key": "opencond_opencond_prompt_80",
|
||||
"text": "好友数量"
|
||||
},
|
||||
"uiid": 0,
|
||||
"activateType": 2,
|
||||
"notify": []
|
||||
}
|
||||
]
|
@ -29230,7 +29230,7 @@
|
||||
"Argu": [
|
||||
1,
|
||||
4,
|
||||
1000
|
||||
800
|
||||
],
|
||||
"FollowSK": [],
|
||||
"SucFollowSK": [],
|
||||
|
@ -12196,7 +12196,7 @@
|
||||
},
|
||||
"Desc": {
|
||||
"key": "skill_skill_atk_Desc_113002311_1",
|
||||
"text": "食人鱼先生对敌方1个目标造成攻击力500%的伤害;若目标死亡,则附加1次攻击,对随机1个目标造成攻击力300%的伤害,本次攻击无视防御。"
|
||||
"text": "食人鱼先生对敌方目标造成攻击力500%的伤害;若目标死亡,则附加1次攻击,对随机1个目标造成攻击力300%的伤害,本次攻击无视防御。"
|
||||
},
|
||||
"buffid": [],
|
||||
"map": ""
|
||||
@ -15317,7 +15317,7 @@
|
||||
},
|
||||
"Desc": {
|
||||
"key": "skill_skill_atk_Desc_143001211_1",
|
||||
"text": "阿比盖尔·斯通对敌方攻击力200%的伤害,有75%概率附加2回合[color=#e5621b]攻击下降[/color]状态。"
|
||||
"text": "阿比盖尔造成攻击力200%的伤害,有75%概率附加2回合[color=#e5621b]攻击下降[/color]状态。"
|
||||
},
|
||||
"buffid": [
|
||||
390001006
|
||||
|
@ -334,6 +334,7 @@ const ( //Rpc
|
||||
Rpc_ModuleCaravanSettlement core.Rpc_Key = "Rpc_ModuleCaravanSettlement" //商队比赛结算信息
|
||||
|
||||
Rpc_ModuleBuriedTrigger core.Rpc_Key = "Rpc_ModuleBuriedTrigger" //埋点跨服触发通知
|
||||
Rpc_OpendCond core.Rpc_Key = "Rpc_OpendCond"
|
||||
)
|
||||
|
||||
// 事件类型定义处
|
||||
@ -350,7 +351,7 @@ const (
|
||||
EventOpenCond core.Event_Key = "event_open_cond" //功能开放事件
|
||||
|
||||
EventBuriedComplete core.Event_Key = "event_buried_complete" //埋点系统条件完成事件批处理接口 接口样例 func(uid string,conids []int32)
|
||||
EventFriendChange core.Event_Key = "event_friend_change" //加好友
|
||||
EventFriendChange core.Event_Key = "event_friend_change" //加好友
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -35,6 +35,8 @@ type (
|
||||
CheckLvUpCond(session IUserSession, lv int32)
|
||||
CheckTaskCond(session IUserSession, id int32)
|
||||
CheckMlineCond(session IUserSession, id int32)
|
||||
|
||||
CheckFriendCond(session IUserSession, id int32)
|
||||
// 查询opencond 配置
|
||||
CheckOpenCondCfgById(uid string, id string) (bOpen bool, errdata *pb.ErrorData)
|
||||
}
|
||||
|
@ -18,10 +18,11 @@ type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
module *ModuleSys
|
||||
|
||||
hlock sync.RWMutex
|
||||
maplv map[int32][]string // 监听等级大于1 的配置
|
||||
maptask map[int32][]string
|
||||
mapmline map[int32][]string
|
||||
hlock sync.RWMutex
|
||||
maplv map[int32][]string // 监听等级大于1 的配置
|
||||
maptask map[int32][]string
|
||||
mapmline map[int32][]string
|
||||
mapfriend map[int32][]string // 好友数量
|
||||
}
|
||||
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
@ -41,6 +42,7 @@ func (this *configureComp) LoadCondConfig() {
|
||||
this.maplv = make(map[int32][]string, 0)
|
||||
this.maptask = make(map[int32][]string, 0)
|
||||
this.mapmline = make(map[int32][]string, 0)
|
||||
this.mapfriend = make(map[int32][]string, 0)
|
||||
defer this.hlock.Unlock()
|
||||
for _, v := range data.GetDataList() {
|
||||
for _, v1 := range v.Main {
|
||||
@ -54,6 +56,9 @@ func (this *configureComp) LoadCondConfig() {
|
||||
if v1.Key == 2 && v1.Param > 1 {
|
||||
this.mapmline[v1.Param] = append(this.mapmline[v1.Param], v.Id)
|
||||
}
|
||||
if v1.Key == 4 && v1.Param > 1 {
|
||||
this.mapfriend[v1.Param] = append(this.mapfriend[v1.Param], v.Id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,6 +77,10 @@ func (this *configureComp) getOpencondMline(id int32) []string {
|
||||
func (this *configureComp) getOpencondTask(id int32) []string {
|
||||
return this.maptask[id]
|
||||
}
|
||||
|
||||
func (this *configureComp) getFriendTask(id int32) []string {
|
||||
return this.mapfriend[id]
|
||||
}
|
||||
func (this *configureComp) getOpencondCfg() (data *cfg.GameOpencond, err error) {
|
||||
var (
|
||||
v interface{}
|
||||
|
@ -99,6 +99,18 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
|
||||
case 4:
|
||||
module, err := this.service.GetModule(comm.ModuleFriend)
|
||||
if err != nil {
|
||||
this.moduleSys.Debugln(err)
|
||||
return ""
|
||||
}
|
||||
if v, ok := module.(comm.IFriend); ok {
|
||||
if v.GetFriendCount(uid) < conf.Param {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return condData.Id
|
||||
|
@ -1,11 +1,14 @@
|
||||
package sys
|
||||
|
||||
import (
|
||||
"context"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"time"
|
||||
)
|
||||
|
||||
var _ comm.ISys = (*ModuleSys)(nil)
|
||||
@ -14,8 +17,8 @@ type ModuleSys struct {
|
||||
modules.ModuleBase
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
|
||||
modelSys *ModelSys
|
||||
service base.IRPCXService
|
||||
modelSys *ModelSys
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
@ -29,8 +32,16 @@ func (this *ModuleSys) OnInstallComp() {
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
||||
|
||||
//模块初始化
|
||||
func (this *ModuleSys) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service.(base.IRPCXService)
|
||||
return
|
||||
}
|
||||
|
||||
func (this *ModuleSys) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
this.service.RegisterFunctionName(string(comm.Rpc_OpendCond), this.OpenCond)
|
||||
return
|
||||
}
|
||||
|
||||
@ -51,13 +62,32 @@ func (this *ModuleSys) CheckLvUpCond(session comm.IUserSession, lv int32) {
|
||||
this.AutoActivate(session, cond)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *ModuleSys) CheckMlineCond(session comm.IUserSession, id int32) {
|
||||
if cond := this.configure.getOpencondMline(id); len(cond) > 0 {
|
||||
this.AutoActivate(session, cond)
|
||||
}
|
||||
}
|
||||
func (this *ModuleSys) CheckTaskCond(session comm.IUserSession, id int32) {
|
||||
if cond := this.configure.getOpencondTask(id); len(cond) > 0 {
|
||||
|
||||
func (this *ModuleSys) CheckFriendCond(session comm.IUserSession, id int32) {
|
||||
if cond := this.configure.getFriendTask(id); len(cond) > 0 {
|
||||
this.AutoActivate(session, cond)
|
||||
}
|
||||
}
|
||||
func (this *ModuleSys) CheckTaskCond(session comm.IUserSession, num int32) {
|
||||
if cond := this.configure.getOpencondTask(num); len(cond) > 0 {
|
||||
// 通知本服
|
||||
ctx, _ := context.WithTimeout(context.Background(), time.Second*5)
|
||||
_, err := this.service.RpcGo(
|
||||
ctx,
|
||||
comm.Service_Worker,
|
||||
string(comm.Rpc_OpendCond),
|
||||
&pb.RPCFriendNumReq{Uid: session.GetUserId(), Cond: cond},
|
||||
nil)
|
||||
if err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
this.AutoActivate(session, cond)
|
||||
}
|
||||
}
|
||||
@ -70,18 +100,18 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
|
||||
list, _ := this.modelSys.GetOpenCondList(session.GetUserId())
|
||||
for _, cid := range cids {
|
||||
opencfg := this.configure.getOpencondCfgByCid(cid)
|
||||
if opencfg != nil {
|
||||
if id := this.modelSys.validCond(session.GetUserId(), opencfg); id == "" { // 条件不满足
|
||||
break
|
||||
}
|
||||
if opencfg == nil {
|
||||
continue
|
||||
}
|
||||
for k, v := range list.Cond {
|
||||
if k == cid && v != 0 {
|
||||
if id := this.modelSys.validCond(session.GetUserId(), opencfg); id == "" { // 条件不满足
|
||||
continue
|
||||
} else {
|
||||
if _, ok := list.Cond[cid]; !ok {
|
||||
list.Cond[cid] = 1
|
||||
szOpen = append(szOpen, cid)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if len(szOpen) > 0 {
|
||||
this.modelSys.ChangeOpenCondData(session.GetUserId(), map[string]interface{}{
|
||||
@ -113,3 +143,10 @@ func (this *ModuleSys) CheckOpenCondCfgById(uid string, id string) (bOpen bool,
|
||||
}
|
||||
return
|
||||
}
|
||||
func (this *ModuleSys) OpenCond(ctx context.Context, req *pb.RPCFriendNumReq, resp interface{}) (err error) {
|
||||
if session, ok := this.GetUserSession(req.Uid); ok {
|
||||
this.AutoActivate(session, req.Cond)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -2459,6 +2459,61 @@ func (x *FriendQiecuonotifyPush) GetNotifyType() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type RPCFriendNumReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
|
||||
Cond []string `protobuf:"bytes,2,rep,name=cond,proto3" json:"cond"`
|
||||
}
|
||||
|
||||
func (x *RPCFriendNumReq) Reset() {
|
||||
*x = RPCFriendNumReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[49]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RPCFriendNumReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RPCFriendNumReq) ProtoMessage() {}
|
||||
|
||||
func (x *RPCFriendNumReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_friend_friend_msg_proto_msgTypes[49]
|
||||
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 RPCFriendNumReq.ProtoReflect.Descriptor instead.
|
||||
func (*RPCFriendNumReq) Descriptor() ([]byte, []int) {
|
||||
return file_friend_friend_msg_proto_rawDescGZIP(), []int{49}
|
||||
}
|
||||
|
||||
func (x *RPCFriendNumReq) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RPCFriendNumReq) GetCond() []string {
|
||||
if x != nil {
|
||||
return x.Cond
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_friend_friend_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_friend_friend_msg_proto_rawDesc = []byte{
|
||||
@ -2640,8 +2695,11 @@ var file_friend_friend_msg_proto_rawDesc = []byte{
|
||||
0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x66,
|
||||
0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x6f, 0x74,
|
||||
0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x0f, 0x52, 0x50, 0x43, 0x46, 0x72,
|
||||
0x69, 0x65, 0x6e, 0x64, 0x4e, 0x75, 0x6d, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x6f, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x6e, 0x64,
|
||||
0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -2656,7 +2714,7 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte {
|
||||
return file_friend_friend_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 49)
|
||||
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 50)
|
||||
var file_friend_friend_msg_proto_goTypes = []interface{}{
|
||||
(*FriendBase)(nil), // 0: FriendBase
|
||||
(*FriendListReq)(nil), // 1: FriendListReq
|
||||
@ -2707,7 +2765,8 @@ var file_friend_friend_msg_proto_goTypes = []interface{}{
|
||||
(*FriendStopReq)(nil), // 46: FriendStopReq
|
||||
(*FriendStopResp)(nil), // 47: FriendStopResp
|
||||
(*FriendQiecuonotifyPush)(nil), // 48: FriendQiecuonotifyPush
|
||||
(*AssistRecord)(nil), // 49: AssistRecord
|
||||
(*RPCFriendNumReq)(nil), // 49: RPCFriendNumReq
|
||||
(*AssistRecord)(nil), // 50: AssistRecord
|
||||
}
|
||||
var file_friend_friend_msg_proto_depIdxs = []int32{
|
||||
0, // 0: FriendListResp.list:type_name -> FriendBase
|
||||
@ -2717,7 +2776,7 @@ var file_friend_friend_msg_proto_depIdxs = []int32{
|
||||
0, // 4: FriendBlackListResp.friends:type_name -> FriendBase
|
||||
0, // 5: FriendZanlistResp.list:type_name -> FriendBase
|
||||
0, // 6: FriendAssistlistResp.list:type_name -> FriendBase
|
||||
49, // 7: FriendAssistlistResp.record:type_name -> AssistRecord
|
||||
50, // 7: FriendAssistlistResp.record:type_name -> AssistRecord
|
||||
0, // 8: FriendAssistHeroUpdatePush.friend:type_name -> FriendBase
|
||||
0, // 9: FriendAssistHeroListResp.friends:type_name -> FriendBase
|
||||
10, // [10:10] is the sub-list for method output_type
|
||||
@ -3322,6 +3381,18 @@ func file_friend_friend_msg_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_friend_friend_msg_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RPCFriendNumReq); 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{
|
||||
@ -3329,7 +3400,7 @@ func file_friend_friend_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_friend_friend_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 49,
|
||||
NumMessages: 50,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -13,4 +13,5 @@ const (
|
||||
GameOpencondType_Platlv = 1
|
||||
GameOpencondType_Maxmapid = 2
|
||||
GameOpencondType_Worldtaskid = 3
|
||||
GameOpencondType_Friend = 4
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user