上传配置

This commit is contained in:
liwei1dao 2024-01-26 22:20:59 +08:00
parent c24ae0141a
commit e626eb06a5
18 changed files with 383 additions and 338 deletions

View File

@ -9,7 +9,7 @@
"icon": "sx_fk_dhs",
"icon2": "sx_fk_ls",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_dhs",
"choseeffect": "effect_sx_trail_dhs",
"pointeffect": "effect_sx_liuguang_dhs",
"score": 1,
@ -26,7 +26,7 @@
"icon": "sx_fk_ls",
"icon2": "sx_fk_dhs",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_ls",
"choseeffect": "effect_sx_trail_fhs",
"pointeffect": "effect_sx_liuguang_ls",
"score": 1,
@ -43,7 +43,7 @@
"icon": "sx_fk_lvs",
"icon2": "sx_fk_lvs",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_lvs",
"choseeffect": "effect_sx_trail_hs",
"pointeffect": "effect_sx_liuguang_lvs",
"score": 1,
@ -60,7 +60,7 @@
"icon": "sx_fk_zs",
"icon2": "sx_fk_zs",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_zs",
"choseeffect": "effect_sx_trail_ls",
"pointeffect": "effect_sx_liuguang_zs",
"score": 1,
@ -77,7 +77,7 @@
"icon": "sx_fk_hs",
"icon2": "sx_fk_hs",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_hs",
"choseeffect": "effect_sx_trail_lvs",
"pointeffect": "effect_sx_liuguang_hs",
"score": 1,
@ -94,7 +94,7 @@
"icon": "sx_fk_fhs",
"icon2": "sx_fk_fhs",
"weight": 1500,
"effect": "",
"effect": "effect_sx_xiaochu_fhs",
"choseeffect": "effect_sx_trail_zs",
"pointeffect": "effect_sx_liuguang_fhs",
"score": 1,

View File

@ -17,7 +17,7 @@
"n": 1
}
],
"heroId": "55005",
"heroId": "85001",
"main_text": {
"key": "enchantboss_boss_main_text_01",
"text": "BOSS主界面描述"
@ -45,7 +45,7 @@
],
"BattleReadyID": 4101,
"heroexp": 10,
"spine": "bossShow_huolong",
"spine": "bossShow_huoyantaitan",
"icon": "hkz_wftj_wjyz03",
"back_png": "wjyz_img003",
"bossIcon": "gl_img_55005"
@ -68,7 +68,7 @@
"n": 1
}
],
"heroId": "55007",
"heroId": "85003",
"main_text": {
"key": "enchantboss_boss_main_text_02",
"text": "BOSS主界面描述"
@ -96,7 +96,7 @@
],
"BattleReadyID": 4201,
"heroexp": 10,
"spine": "bossShow_huolong",
"spine": "bossShow_bingshuangtaitan",
"icon": "hkz_wftj_wjyz02",
"back_png": "wjyz_img001",
"bossIcon": "gl_img_55007"
@ -129,7 +129,7 @@
"n": 1
}
],
"heroId": "55006",
"heroId": "85002",
"main_text": {
"key": "enchantboss_boss_main_text_03",
"text": "BOSS主界面描述"
@ -157,7 +157,7 @@
],
"BattleReadyID": 4301,
"heroexp": 10,
"spine": "bossShow_huolong",
"spine": "bossShow_senlin",
"icon": "hkz_wftj_wjyz01",
"back_png": "wjyz_img002",
"bossIcon": "gl_img_55006"

View File

@ -12,7 +12,7 @@
"key": "IntegralBoss_Integralbuff_name_01",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_sjbb",
"des": {
"key": "IntegralBoss_Integralbuff_des_01",
"text": "我方守护者生命上限提升30%"
@ -31,7 +31,7 @@
"key": "IntegralBoss_Integralbuff_name_02",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_ygbh",
"des": {
"key": "IntegralBoss_Integralbuff_des_02",
"text": "我方守护者受到伤害降低30%"
@ -50,7 +50,7 @@
"key": "IntegralBoss_Integralbuff_name_03",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_jjfj",
"des": {
"key": "IntegralBoss_Integralbuff_des_03",
"text": "守护者血量低于30%时伤害提升60%"
@ -69,7 +69,7 @@
"key": "IntegralBoss_Integralbuff_name_04",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_ycem",
"des": {
"key": "IntegralBoss_Integralbuff_des_04",
"text": "敌方全体伤害提升10%"
@ -88,7 +88,7 @@
"key": "IntegralBoss_Integralbuff_name_05",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_ecem",
"des": {
"key": "IntegralBoss_Integralbuff_des_05",
"text": "敌方全体伤害提升20%"
@ -107,7 +107,7 @@
"key": "IntegralBoss_Integralbuff_name_06",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_scem",
"des": {
"key": "IntegralBoss_Integralbuff_des_06",
"text": "敌方全体伤害提升30%"
@ -126,7 +126,7 @@
"key": "IntegralBoss_Integralbuff_name_07",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_ysj",
"des": {
"key": "IntegralBoss_Integralbuff_des_07",
"text": "敌方全体速度+2"
@ -145,7 +145,7 @@
"key": "IntegralBoss_Integralbuff_name_08",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_esj",
"des": {
"key": "IntegralBoss_Integralbuff_des_08",
"text": "敌方全体速度+3"
@ -164,7 +164,7 @@
"key": "IntegralBoss_Integralbuff_name_09",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_ssj",
"des": {
"key": "IntegralBoss_Integralbuff_des_09",
"text": "敌方全体速度+4"
@ -183,7 +183,7 @@
"key": "IntegralBoss_Integralbuff_name_10",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_yccl",
"des": {
"key": "IntegralBoss_Integralbuff_des_10",
"text": "我方守护者受到的治疗效果降低10%"
@ -202,7 +202,7 @@
"key": "IntegralBoss_Integralbuff_name_11",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_eccl",
"des": {
"key": "IntegralBoss_Integralbuff_des_11",
"text": "我方守护者受到的治疗效果降低20%"
@ -221,7 +221,7 @@
"key": "IntegralBoss_Integralbuff_name_12",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_sccl",
"des": {
"key": "IntegralBoss_Integralbuff_des_12",
"text": "我方守护者受到的治疗效果降低30%"
@ -240,7 +240,7 @@
"key": "IntegralBoss_Integralbuff_name_13",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_xybz",
"des": {
"key": "IntegralBoss_Integralbuff_des_13",
"text": "战斗开始后我方随机2名守护者获得2回合的流血"
@ -259,7 +259,7 @@
"key": "IntegralBoss_Integralbuff_name_14",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_bxcx",
"des": {
"key": "IntegralBoss_Integralbuff_des_14",
"text": "敌方造成的流血和眩晕将额外增加1回合持续时间"
@ -278,7 +278,7 @@
"key": "IntegralBoss_Integralbuff_name_15",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_sjsr",
"des": {
"key": "IntegralBoss_Integralbuff_des_15",
"text": "敌方攻击眩晕状态的敌人时无视受击者15%防御"
@ -297,7 +297,7 @@
"key": "IntegralBoss_Integralbuff_name_16",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_yxsg",
"des": {
"key": "IntegralBoss_Integralbuff_des_16",
"text": "敌方攻击处于流血状态的敌人时额外增加40%暴击伤害"
@ -316,7 +316,7 @@
"key": "IntegralBoss_Integralbuff_name_17",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_mjzz",
"des": {
"key": "IntegralBoss_Integralbuff_des_17",
"text": "每3回合驱散敌方全部减益1次"
@ -335,7 +335,7 @@
"key": "IntegralBoss_Integralbuff_name_18",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_sjcz",
"des": {
"key": "IntegralBoss_Integralbuff_des_18",
"text": "除BOSS外所有友方技能最大冷却时间增加1回合"
@ -354,7 +354,7 @@
"key": "IntegralBoss_Integralbuff_name_19",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_wjjw",
"des": {
"key": "IntegralBoss_Integralbuff_des_19",
"text": "每3回合驱散我方守护者全部增益1次"
@ -373,7 +373,7 @@
"key": "IntegralBoss_Integralbuff_name_20",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_zmsm",
"des": {
"key": "IntegralBoss_Integralbuff_des_20",
"text": "战斗开始后我方全体各自失去20%生命"
@ -392,7 +392,7 @@
"key": "IntegralBoss_Integralbuff_name_21",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_emsm",
"des": {
"key": "IntegralBoss_Integralbuff_des_21",
"text": "敌方会心提升20%"
@ -411,7 +411,7 @@
"key": "IntegralBoss_Integralbuff_name_22",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"icon": "ty_icon_buff_jgwx",
"des": {
"key": "IntegralBoss_Integralbuff_des_22",
"text": "敌方全体免疫控制效果(小怪生效)"

View File

@ -18349,7 +18349,7 @@
"img": "item_10000036",
"intr": {
"key": "item_item_intr_10000036",
"text": "在秘境中获得,可以用于各个事件消耗用。"
"text": "在秘境中获得,结算退出石阵秘境后即清空。"
},
"describe": {
"key": "item_item_describe_10000036",

File diff suppressed because it is too large Load Diff

View File

@ -390180,7 +390180,9 @@
"heroid": 55001,
"star": 3,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 20,
"hppro": 10,
"atkpro": 0.5,
@ -390495,7 +390497,9 @@
"heroid": 55001,
"star": 3,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 30,
"hppro": 10,
"atkpro": 0.5,
@ -390810,7 +390814,9 @@
"heroid": 55001,
"star": 3,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 40,
"hppro": 10,
"atkpro": 0.5,
@ -391125,7 +391131,9 @@
"heroid": 55001,
"star": 4,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 50,
"hppro": 10,
"atkpro": 0.5,
@ -391440,7 +391448,9 @@
"heroid": 55001,
"star": 5,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 60,
"hppro": 10,
"atkpro": 0.5,
@ -391755,7 +391765,9 @@
"heroid": 55001,
"star": 5,
"equip": [],
"newskill": [],
"newskill": [
134006011
],
"lv": 70,
"hppro": 10,
"atkpro": 0.5,

View File

@ -9195,7 +9195,7 @@
},
{
"id": 60118,
"heroid": 25001,
"heroid": 35006,
"Levelid": 0,
"datas": [
"GameMain",
@ -9392,7 +9392,7 @@
},
{
"id": 60168,
"heroid": 25001,
"heroid": 43007,
"Levelid": 0,
"datas": [
"GameMain",

View File

@ -74289,11 +74289,11 @@
4,
7000
],
"FollowSK": [
"FollowSK": [],
"SucFollowSK": [
285001312,
285001313
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
@ -74668,11 +74668,11 @@
4,
7000
],
"FollowSK": [
"FollowSK": [],
"SucFollowSK": [
285002312,
285002313
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
@ -75046,11 +75046,11 @@
4,
7000
],
"FollowSK": [
"FollowSK": [],
"SucFollowSK": [
285003312,
285003313
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,

View File

@ -61012,7 +61012,7 @@
"key": "skill_skill_atk_Name_185001111",
"text": "火岩熔心"
},
"ico": "jn_85001_1",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_1",
@ -61045,7 +61045,7 @@
"key": "skill_skill_atk_Name_185001211",
"text": "熔魂重塑"
},
"ico": "jn_85001_2",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_2",
@ -61078,7 +61078,7 @@
"key": "skill_skill_atk_Name_185001311",
"text": "熔焰迸发"
},
"ico": "jn_85001_3",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_3",
@ -61111,7 +61111,7 @@
"key": "skill_skill_atk_Name_185001411",
"text": "岩浆倾泻"
},
"ico": "jn_85001_4",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_4",
@ -61144,7 +61144,7 @@
"key": "skill_skill_atk_Name_185001511",
"text": "熔岩爆裂"
},
"ico": "jn_85001_5",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_5",
@ -61158,7 +61158,9 @@
285001513
]
},
"passSkill": [],
"passSkill": [
285001513
],
"Desc": {
"key": "skill_skill_atk_Desc_185001511_1",
"text": "对敌方全体造成伤害,并引爆当前叠加层数的【炽热岩浆】,引爆时将根据【炽热岩浆】的剩余层数提升本次伤害。释放该技能后,若清除掉的【炽热岩浆】层数达到目标,火焰泰坦会短暂进入破防状态。"
@ -61178,7 +61180,7 @@
"key": "skill_skill_atk_Name_185001611",
"text": "炽热散落"
},
"ico": "jn_85001_6",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_6",
@ -61212,7 +61214,7 @@
"key": "skill_skill_atk_Name_185002111",
"text": "荆棘窒息"
},
"ico": "jn_85002_1",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_1",
@ -61245,7 +61247,7 @@
"key": "skill_skill_atk_Name_185002211",
"text": "森魂复苏"
},
"ico": "jn_85002_2",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_2",
@ -61278,7 +61280,7 @@
"key": "skill_skill_atk_Name_185002311",
"text": "盘根错节"
},
"ico": "jn_85002_3",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_3",
@ -61311,7 +61313,7 @@
"key": "skill_skill_atk_Name_185002411",
"text": "痛苦蔓延"
},
"ico": "jn_85002_4",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_4",
@ -61344,7 +61346,7 @@
"key": "skill_skill_atk_Name_185002511",
"text": "藤蔓狂舞"
},
"ico": "jn_85002_5",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_5",
@ -61358,7 +61360,9 @@
285002513
]
},
"passSkill": [],
"passSkill": [
285002513
],
"Desc": {
"key": "skill_skill_atk_Desc_185002511_1",
"text": "对敌方全体造成伤害,并引爆当前叠加层数的【疯缠树枝】,引爆时将根据【疯缠树枝】的剩余层数提升本次伤害。释放该技能后,若清除掉的【疯缠树枝】层数达到目标,森林泰坦会短暂进入破防状态。"
@ -61378,7 +61382,7 @@
"key": "skill_skill_atk_Name_185002611",
"text": "大地震撼"
},
"ico": "jn_85002_6",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_6",
@ -61412,7 +61416,7 @@
"key": "skill_skill_atk_Name_185003111",
"text": "冰寒彻骨"
},
"ico": "jn_85003_1",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_1",
@ -61445,7 +61449,7 @@
"key": "skill_skill_atk_Name_185003211",
"text": "冰魂觉醒"
},
"ico": "jn_85003_2",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_2",
@ -61478,7 +61482,7 @@
"key": "skill_skill_atk_Name_185003311",
"text": "寒风凛冽"
},
"ico": "jn_85003_3",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_3",
@ -61511,7 +61515,7 @@
"key": "skill_skill_atk_Name_185003411",
"text": "冰冻三尺"
},
"ico": "jn_85003_4",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_4",
@ -61544,7 +61548,7 @@
"key": "skill_skill_atk_Name_185003511",
"text": "冰霜呼啸"
},
"ico": "jn_85003_5",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_5",
@ -61558,7 +61562,9 @@
285003513
]
},
"passSkill": [],
"passSkill": [
285003513
],
"Desc": {
"key": "skill_skill_atk_Desc_185003511_1",
"text": "对敌方全体造成伤害,并引爆当前叠加层数的【寒骨冰棱】,引爆时将根据【寒骨冰棱】的剩余层数提升本次伤害。释放该技能后,若清除掉的【寒骨冰棱】层数达到目标,冰霜泰坦会短暂进入破防状态。"
@ -61578,7 +61584,7 @@
"key": "skill_skill_atk_Name_185003611",
"text": "冰川雪崩"
},
"ico": "jn_85003_6",
"ico": "jn_51056_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_6",

View File

@ -14667,7 +14667,7 @@
"OverlayTimes": 1,
"SameID": false,
"golbalbufficon": "",
"buffIcon": "",
"buffIcon": "ty_icon_buff_fcsz",
"buffeffect": "",
"buffpos": "",
"AddTrigger": 0,

View File

@ -13431,12 +13431,14 @@
"icon": "",
"When": 16,
"FromCheck": "Target=3",
"TargetCheck": "Target=2,BuffTotalOverlayNumLess=391000116,OverlayNum=25",
"TargetCheck": "Target=2",
"MainSkillCheck": "SkillPos=5",
"AfterSkillCheck": "",
"BuffCheck": "",
"DpsCheck": "",
"AddCon": [],
"AddCon": [
"BuffTotalOverlayNumLess=391000116,OverlayNum=25"
],
"PasPr": 1000,
"PasCorrection": 0,
"TriggerAnim": "",
@ -13457,12 +13459,14 @@
"icon": "",
"When": 16,
"FromCheck": "Target=3",
"TargetCheck": "Target=2,BuffTotalOverlayNumLess=391000123,OverlayNum=25",
"TargetCheck": "Target=2",
"MainSkillCheck": "SkillPos=5",
"AfterSkillCheck": "",
"BuffCheck": "",
"DpsCheck": "",
"AddCon": [],
"AddCon": [
"BuffTotalOverlayNumLess=391000123,OverlayNum=25"
],
"PasPr": 1000,
"PasCorrection": 0,
"TriggerAnim": "",
@ -13483,12 +13487,14 @@
"icon": "",
"When": 16,
"FromCheck": "Target=3",
"TargetCheck": "Target=2,BuffTotalOverlayNumLess=391000127,OverlayNum=25",
"TargetCheck": "Target=2",
"MainSkillCheck": "SkillPos=5",
"AfterSkillCheck": "",
"BuffCheck": "",
"DpsCheck": "",
"AddCon": [],
"AddCon": [
"BuffTotalOverlayNumLess=391000127,OverlayNum=25"
],
"PasPr": 1000,
"PasCorrection": 0,
"TriggerAnim": "",

View File

@ -198,3 +198,7 @@ func (this *MCompModel) DelListlds(uid string, ids []string, opt ...db.DBOption)
func (this *MCompModel) BatchDelLists(uid string) (err error) {
return this.DBModel.BatchDelLists(uid)
}
func (this *MCompModel) RedisDels(uids []string) (err error) {
return this.DBModel.RedisDels(uids)
}

View File

@ -39,6 +39,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe
return
}
list.Landid = land.Id
update["landid"] = land.Id
} else {
// 校验是否过期
if list.Etime > configure.Now().Unix() {

View File

@ -49,6 +49,7 @@ func (this *modelLand) changePlunderLandData(id string, update map[string]interf
func (this *modelLand) createPlunderLandData(user *pb.DBPlunder) (land *pb.DBPlunderLand, err error) {
var (
uids []string
other []string
users []*pb.DBPlunder
socre int32
)
@ -69,6 +70,7 @@ func (this *modelLand) createPlunderLandData(user *pb.DBPlunder) (land *pb.DBPlu
tmp := &pb.DBPlunder{}
if err = cur.Decode(tmp); err == nil {
users = append(users, tmp)
other = append(other, tmp.Uid)
}
}
@ -85,7 +87,11 @@ func (this *modelLand) createPlunderLandData(user *pb.DBPlunder) (land *pb.DBPlu
for _, v := range users {
uids = append(uids, v.Uid)
}
if err = this.module.modelPlunder.BatchChange(uids, map[string]interface{}{"landid": land.Id}); err != nil {
if err = this.module.modelPlunder.RedisDels(other); err != nil {
return
}
if _, err = this.DB.UpdateMany(core.SqlTable(comm.TablePlunder), bson.M{"uid": bson.M{"$in": uids}}, bson.M{"$set": bson.M{"landid": land.Id}}); err != nil {
fmt.Printf("err:%v", err)
return
}
return

View File

@ -10,6 +10,8 @@ import (
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/sys/db"
mgooptions "go.mongodb.org/mongo-driver/mongo/options"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/x/bsonx"
@ -25,7 +27,8 @@ func (this *modelPlunder) Init(service core.IService, module core.IModule, comp
this.TableName = comm.TablePlunder
this.module = module.(*Plunder)
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
Options: mgooptions.Index().SetUnique(true),
})
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
Keys: bsonx.Doc{{Key: "score", Value: bsonx.Int32(1)}},
@ -66,28 +69,30 @@ func (this *modelPlunder) getPlunderData(session comm.IUserSession) (info *pb.DB
this.module.Errorln(err)
return
}
user, err = this.module.GetUserForSession(session)
if err != nil {
this.module.Errorln(err)
return
}
info = &pb.DBPlunder{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
Uinfo: comm.GetUserBaseInfo(user),
Ctime: configure.Now().Unix(),
Develop: make(map[int32]int32),
}
if err == mgo.MongodbNil {
user, err = this.module.GetUserForSession(session)
if err != nil {
this.module.Errorln(err)
return
}
info = &pb.DBPlunder{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
Uinfo: comm.GetUserBaseInfo(user),
Ctime: configure.Now().Unix(),
Develop: make(map[int32]int32),
}
for i := 0; i < 3; i++ { // 队列固定三条
info.Line = append(info.Line, &pb.TransportLine{})
for i := 0; i < 3; i++ { // 队列固定三条
info.Line = append(info.Line, &pb.TransportLine{})
}
info.Line = append(info.Line, &pb.TransportLine{
Closetime: -1, // 需要手动解锁
})
// 刷新货物信息
info.Source, _ = this.refreshGoodsInfo()
err = this.Add(session.GetUserId(), info)
}
info.Line = append(info.Line, &pb.TransportLine{
Closetime: -1, // 需要手动解锁
})
// 刷新货物信息
info.Source, _ = this.refreshGoodsInfo()
err = this.Add(session.GetUserId(), info)
return
}

View File

@ -15,4 +15,5 @@ const (
TEnumETaskDesType_Weekly = 4
TEnumETaskDesType_Caravan = 5
TEnumETaskDesType_EasterEgg = 6
TEnumETaskDesType_Guild = 7
)

View File

@ -399,6 +399,7 @@ func (this *DBModel) ChangeLists(uid string, datas map[string]interface{}, opt .
func (this *DBModel) BatchChange(uids []string, datas map[string]interface{}, opt ...DBOption) (err error) {
pipe := this.Redis.RedisPipe(context.TODO())
for _, uid := range uids {
if err = pipe.HMSet(this.ukey(uid), datas); err != nil {
log.Error("DBModel ChangeList", log.Field{Key: "err", Value: err.Error()})
return
@ -1367,3 +1368,16 @@ func (this *DBModel) BatchDelLists(uid string) (err error) {
}
return
}
// 删除卸载redis
func (this *DBModel) RedisDels(uids []string) (err error) {
pipe := this.Redis.RedisPipe(context.TODO())
for _, uid := range uids {
if err = pipe.Delete(this.ukey(uid)); err != nil {
log.Error("DBModel RedisDels", log.Field{Key: "err", Value: err.Error()})
return
}
}
_, err = pipe.Exec()
return
}

View File

@ -5,6 +5,7 @@ import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/lego/sys/mgo"
r "go_dreamfactory/lego/sys/redis"
"go_dreamfactory/pb"
@ -131,31 +132,20 @@ func TestRa(t *testing.T) {
r.SetRedisType(r.Redis_Single),
r.SetRedis_Single_Addr("10.0.0.9:10011"),
r.SetRedis_Single_Password("li13451234"),
r.SetRedis_Single_DB(15),
r.SetRedis_Single_DB(3),
); err != nil {
fmt.Printf("err:%v", err)
return
} else {
s, err2 := sys.ZRevRange("sociatyboss:personalrank", 0, 10).Result()
if err2 != nil {
t.Fatal(err2)
pipe := sys.RedisPipe(context.TODO())
uids := []string{"dfli-plunder:dfli_65b3b051d7569e684039d273"}
for _, uid := range uids {
if err = pipe.Delete(uid); err != nil {
log.Error("DBModel RedisDels", log.Field{Key: "err", Value: err.Error()})
return
}
}
// m := &redis.Z{Score: float64(1), Member: "dd"}
// sys.ZAdd("sociatyrank", m)
// sys.ZIncrBy("sociatyrank", 10, "a100aa")
// sys.ZIncrBy("sociatyrank", 10, "a100ab")
for _, v := range s {
// fmt.Println(v)
score, _ := sys.ZScore("sociatyboss:personalrank", v)
ranking, _ := sys.ZRevRank("sociatyboss:personalrank", v)
fmt.Printf("%d %v - %d \n", (ranking + 1), v, int64(score))
result, _ := sys.ZRevRank("sociatyboss:personalrank", v)
fmt.Println(result)
}
_, err = pipe.Exec()
}
}