This commit is contained in:
meixiongfeng 2022-11-22 11:02:47 +08:00
commit 829900682c
10 changed files with 193 additions and 129 deletions

View File

@ -349,11 +349,11 @@
"key": "itemname_10009", "key": "itemname_10009",
"text": "被封印的魔法书" "text": "被封印的魔法书"
}, },
"usetype": 3, "usetype": 9,
"color": 1, "color": 1,
"bagtype": 1, "bagtype": 1,
"index": 9, "index": 9,
"special_type": 0, "special_type": 5,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -392,11 +392,11 @@
"key": "itemname_10010", "key": "itemname_10010",
"text": "古代硬币" "text": "古代硬币"
}, },
"usetype": 3, "usetype": 9,
"color": 1, "color": 1,
"bagtype": 1, "bagtype": 1,
"index": 10, "index": 10,
"special_type": 0, "special_type": 5,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -435,11 +435,11 @@
"key": "itemname_10011", "key": "itemname_10011",
"text": "坏掉的钟表" "text": "坏掉的钟表"
}, },
"usetype": 3, "usetype": 9,
"color": 2, "color": 2,
"bagtype": 1, "bagtype": 1,
"index": 11, "index": 11,
"special_type": 0, "special_type": 10,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -478,11 +478,11 @@
"key": "itemname_10012", "key": "itemname_10012",
"text": "木材" "text": "木材"
}, },
"usetype": 3, "usetype": 9,
"color": 2, "color": 2,
"bagtype": 1, "bagtype": 1,
"index": 12, "index": 12,
"special_type": 0, "special_type": 10,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -521,11 +521,11 @@
"key": "itemname_10013", "key": "itemname_10013",
"text": "四叶草" "text": "四叶草"
}, },
"usetype": 3, "usetype": 9,
"color": 3, "color": 3,
"bagtype": 1, "bagtype": 1,
"index": 13, "index": 13,
"special_type": 0, "special_type": 20,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -564,11 +564,11 @@
"key": "itemname_10014", "key": "itemname_10014",
"text": "冒险家勋章" "text": "冒险家勋章"
}, },
"usetype": 3, "usetype": 9,
"color": 4, "color": 4,
"bagtype": 1, "bagtype": 1,
"index": 14, "index": 14,
"special_type": 0, "special_type": 50,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -607,11 +607,11 @@
"key": "itemname_10015", "key": "itemname_10015",
"text": "猫猫护身符" "text": "猫猫护身符"
}, },
"usetype": 3, "usetype": 9,
"color": 5, "color": 5,
"bagtype": 1, "bagtype": 1,
"index": 15, "index": 15,
"special_type": 0, "special_type": 100,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -650,11 +650,11 @@
"key": "itemname_10016", "key": "itemname_10016",
"text": "人造钻石" "text": "人造钻石"
}, },
"usetype": 3, "usetype": 9,
"color": 6, "color": 6,
"bagtype": 1, "bagtype": 1,
"index": 16, "index": 16,
"special_type": 0, "special_type": 200,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
@ -977,7 +977,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1026,7 +1026,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1075,7 +1075,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1124,7 +1124,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1173,7 +1173,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1222,7 +1222,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1271,7 +1271,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1320,7 +1320,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1369,7 +1369,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1412,7 +1412,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1455,7 +1455,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,
@ -1498,7 +1498,7 @@
109 109
], ],
"use_skip": 109, "use_skip": 109,
"upper_limit": 999, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 0, "star": 0,

View File

@ -50,13 +50,14 @@ func (this *TaskActiveListView) CreateView(t *model.TestCase) fyne.CanvasObject
//receive button //receive button
receiveBtn := widget.NewButtonWithIcon("领取", theme.ConfirmIcon(), func() { receiveBtn := widget.NewButtonWithIcon("领取", theme.ConfirmIcon(), func() {
if len(this.itemList.SelItemIds) != 1 { selItemId := this.itemList.SelItemId
if selItemId == "" {
dialog.ShowError(errors.New("请选择一项"), this.w) dialog.ShowError(errors.New("请选择一项"), this.w)
return return
} }
if err := service.GetPttService().SendToClient( if err := service.GetPttService().SendToClient(
t.MainType, "activereceive", t.MainType, "activereceive",
&pb.TaskActiveReceiveReq{Id: this.itemList.SelItemIds[0], TaskTag: cast.ToInt32(tagSelect.Selected)}); err != nil { &pb.TaskActiveReceiveReq{Id: selItemId, TaskTag: cast.ToInt32(tagSelect.Selected)}); err != nil {
logrus.Error(err) logrus.Error(err)
return return
} }
@ -94,7 +95,7 @@ func (this *TaskActiveListView) dataListener() {
for _, v := range rsp.List { for _, v := range rsp.List {
item := common.Item{ item := common.Item{
Id: cast.ToString(v.Id), Id: cast.ToString(v.Id),
Text: fmt.Sprintf("%s R:%d", cast.ToString(v.RId), v.Received), Text: fmt.Sprintf("任务ID:%s 领取状态:%d", cast.ToString(v.RId), v.Received),
} }
this.itemList.AddItem(item) this.itemList.AddItem(item)
} }

View File

@ -359,77 +359,145 @@ const (
// 随机任务类型 // 随机任务类型
const ( const (
Rtype1 TaskType = 1 //英雄指定 Rtype1 TaskType = 1 //英雄指定
Rtype2 TaskType = 2 //主线之内触发了剧情Id Rtype2 TaskType = 2 //主线之内触发了剧情Id
Rtype3 TaskType = 3 //每日任务 Rtype3 TaskType = 3 //每日任务
Rtype4 TaskType = 4 //指定英雄的等级限制 Rtype4 TaskType = 4 //指定英雄的等级限制
Rtype5 TaskType = 5 //指定英雄的装备数量 Rtype5 TaskType = 5 //指定英雄的装备数量
Rtype6 TaskType = 6 //指定英雄的星级 Rtype6 TaskType = 6 //指定英雄的星级
Rtype7 TaskType = 7 //日常登录一次 Rtype7 TaskType = 7 //日常登录一次
Rtype8 TaskType = 8 //累计登陆xx天 Rtype8 TaskType = 8 //累计登陆xx天
Rtype9 TaskType = 9 //连续登陆xx天 Rtype9 TaskType = 9 //连续登陆xx天
Rtype10 TaskType = 10 //拥有xx个好友 Rtype10 TaskType = 10 //拥有xx个好友
Rtype11 TaskType = 11 //赠送X次友情点 Rtype11 TaskType = 11 //赠送X次友情点
Rtype12 TaskType = 12 //使用好友助战英雄xx次 Rtype12 TaskType = 12 //使用好友助战英雄xx次
Rtype13 TaskType = 13 //更换X次助战英雄 Rtype13 TaskType = 13 //更换X次助战英雄
Rtype14 TaskType = 14 //累计xx次普通招募 Rtype14 TaskType = 14 //累计xx次普通招募
Rtype15 TaskType = 15 //累计xx次阵营招募 Rtype15 TaskType = 15 //累计xx次阵营招募
Rtype16 TaskType = 16 //招募获得xx品质英雄xx个 Rtype16 TaskType = 16 //招募获得xx品质英雄xx个
Rtype17 TaskType = 17 //普通招募十连获得xx个以上xx星英雄 Rtype17 TaskType = 17 //普通招募十连获得xx个以上xx星英雄
Rtype18 TaskType = 18 //xx次普通招募 Rtype18 TaskType = 18 //xx次普通招募
Rtype19 TaskType = 19 //xx次阵营招募 Rtype19 TaskType = 19 //xx次阵营招募
Rtype20 TaskType = 20 //用户等级达到xx级 Rtype20 TaskType = 20 //用户等级达到xx级
Rtype21 TaskType = 21 //英雄合成xx次 Rtype21 TaskType = 21 //英雄合成xx次
Rtype22 TaskType = 22 //合成xx英雄 Rtype22 TaskType = 22 //合成xx英雄
Rtype23 TaskType = 23 //拥有xx个xx星级的xx等级英雄 Rtype23 TaskType = 23 //拥有xx个xx星级的xx等级英雄
Rtype24 TaskType = 24 //为任意英雄提升xx次等级 Rtype24 TaskType = 24 //为任意英雄提升xx次等级
Rtype25 TaskType = 25 //xx名xx英雄升至xx星 Rtype25 TaskType = 25 //xx名xx英雄升至xx星
Rtype26 TaskType = 26 //xx名英雄从三星升四星 Rtype26 TaskType = 26 //xx名英雄从三星升四星
Rtype27 TaskType = 27 //xx名英雄从四星升五星 Rtype27 TaskType = 27 //xx名英雄从四星升五星
Rtype28 TaskType = 28 //xx名英雄从五星升六星 Rtype28 TaskType = 28 //xx名英雄从五星升六星
Rtype29 TaskType = 29 //拥有xx个xx级及以上的【xx】英雄 Rtype29 TaskType = 29 //拥有xx个xx级及以上的【xx】英雄
Rtype30 TaskType = 30 //获得xx个品质为xx的英雄 Rtype30 TaskType = 30 //获得xx个品质为xx的英雄
Rtype31 TaskType = 31 //获得xx个品质为xx以上的英雄 Rtype31 TaskType = 31 //获得xx个品质为xx以上的英雄
Rtype32 TaskType = 32 //xx个品质为xx的英雄升到xx级 Rtype32 TaskType = 32 //xx个品质为xx的英雄升到xx级
Rtype33 TaskType = 33 //xx个品质为xx以及以上英雄升到xx级 Rtype33 TaskType = 33 //xx个品质为xx以及以上英雄升到xx级
Rtype34 TaskType = 34 //xx个英雄觉醒达到xx阶段 Rtype34 TaskType = 34 //xx个英雄觉醒达到xx阶段
Rtype35 TaskType = 35 //xx英雄觉醒达到xx阶段 Rtype35 TaskType = 35 //xx英雄觉醒达到xx阶段
Rtype36 TaskType = 36 //xx位xx品质xx职业英雄xx阵营觉醒达到xx阶段 Rtype36 TaskType = 36 //xx位xx品质xx职业英雄xx阵营觉醒达到xx阶段
Rtype37 TaskType = 37 //xx名xx品质英雄满共鸣、等级、觉醒 Rtype37 TaskType = 37 //xx名xx品质英雄满共鸣、等级、觉醒
Rtype38 TaskType = 38 //xx英雄满级、共鸣、觉醒至最高状态 Rtype38 TaskType = 38 //xx英雄满级、共鸣、觉醒至最高状态
Rtype39 TaskType = 39 //累计英雄共鸣xx次 Rtype39 TaskType = 39 //累计英雄共鸣xx次
Rtype40 TaskType = 40 //xx个英雄共鸣满xx次 Rtype40 TaskType = 40 //xx个英雄共鸣满xx次
Rtype41 TaskType = 41 //xx名英雄穿戴xx件xx星级的装备 Rtype41 TaskType = 41 //xx名英雄穿戴xx件xx星级的装备
Rtype42 TaskType = 42 //xx名英雄穿戴xx件xx等级的装备 Rtype42 TaskType = 42 //xx名英雄穿戴xx件xx等级的装备
Rtype43 TaskType = 43 //将xx件装备强化至xx级 Rtype43 TaskType = 43 //将xx件装备强化至xx级
Rtype44 TaskType = 44 //任意装备强化到xx级 Rtype44 TaskType = 44 //任意装备强化到xx级
Rtype45 TaskType = 45 //将xx件xx星【xx】套装装备强化至xx级 Rtype45 TaskType = 45 //将xx件xx星【xx】套装装备强化至xx级
Rtype46 TaskType = 46 //为xx名英雄穿戴完整xx星【xx】套装装备 Rtype46 TaskType = 46 //为xx名英雄穿戴完整xx星【xx】套装装备
Rtype47 TaskType = 47 //累计强化装备成功xx次 Rtype47 TaskType = 47 //累计强化装备成功xx次
Rtype48 TaskType = 48 //xx次xx星的二件套装备强化至xx并穿戴 Rtype48 TaskType = 48 //xx次xx星的二件套装备强化至xx并穿戴
Rtype49 TaskType = 49 //xx次xx星的四件套装备强化至xx并穿戴 Rtype49 TaskType = 49 //xx次xx星的四件套装备强化至xx并穿戴
Rtype50 TaskType = 50 //获得xx星以上装备xx件 Rtype50 TaskType = 50 //获得xx星以上装备xx件
Rtype51 TaskType = 51 //在铁匠铺中获得xx件xx星装备 Rtype51 TaskType = 51 //在铁匠铺中获得xx件xx星装备
Rtype52 TaskType = 52 //xx英雄提升xx次技能等级 Rtype52 TaskType = 52 //xx英雄提升xx次技能等级
Rtype53 TaskType = 53 //技能升级累计xx次 Rtype53 TaskType = 53 //技能升级累计xx次
Rtype54 TaskType = 54 //x名卡牌角色技能全满级 Rtype54 TaskType = 54 //x名卡牌角色技能全满级
Rtype55 TaskType = 55 //xx品质英雄提升xx次技能等级 Rtype55 TaskType = 55 //xx品质英雄提升xx次技能等级
Rtype56 TaskType = 56 //拥有xx名技能升级xx次的xx职业英雄 Rtype56 TaskType = 56 //拥有xx名技能升级xx次的xx职业英雄
Rtype57 TaskType = 57 //xx名英雄技能满级 Rtype57 TaskType = 57 //xx名英雄技能满级
Rtype58 TaskType = 58 //通关任意普通爬塔层数 Rtype58 TaskType = 58 //通关任意普通爬塔层数
Rtype59 TaskType = 59 //通关普通爬塔xx层 Rtype59 TaskType = 59 //通关普通爬塔xx层
Rtype60 TaskType = 60 //任意主线副本通关1次 Rtype60 TaskType = 60 //任意主线副本通关1次
Rtype61 TaskType = 61 //通关主线关卡xx Rtype61 TaskType = 61 //通关主线关卡xx
Rtype62 TaskType = 62 //世界聊天发言xx次 Rtype62 TaskType = 62 //世界聊天发言xx次
Rtype63 TaskType = 63 //日常任务活跃度达到xx Rtype63 TaskType = 63 //日常任务活跃度达到xx
Rtype64 TaskType = 64 //任意商品购买xx次 Rtype64 TaskType = 64 //任意商品购买xx次
Rtype65 TaskType = 65 //在商店购买xx商品xx件 Rtype65 TaskType = 65 //在商店购买xx商品xx件
Rtype66 TaskType = 66 //xx商店购买任意商品xx次 Rtype66 TaskType = 66 //xx商店购买任意商品xx次
Rtype67 TaskType = 67 //商店购物消耗xx货币xx个 Rtype67 TaskType = 67 //商店购物消耗xx货币xx个
Rtype68 TaskType = 68 //任意渠道消耗xx金币 Rtype68 TaskType = 68 //任意渠道消耗xx金币
Rtype69 TaskType = 69 //与其他玩家切磋xx次 Rtype69 TaskType = 69 //与其他玩家切磋xx次
Rtype70 TaskType = 70 //通关世界任务XX关卡 Rtype70 TaskType = 70 //通关世界任务XX关卡
Rtype71 TaskType = 71 //完成一次捏人 Rtype72 TaskType = 72 //完成一次捏人
Rtype73 TaskType = 73 //通关难度A维京远征指定BOSSN次从接到任务开始只有通关A难度进度才+1
Rtype74 TaskType = 74 //通关难度A维京远征指定BOSS检查最高难度记录是否超过了此难度超过则完成
Rtype75 TaskType = 75 //自动战斗通关难度A的维京远征指定BOSS从接到任务开始若全程无手动操作不包含变速且挑战难度大于等于A则判断任务完成
Rtype76 TaskType = 76 //通关维京远征指定BOSSN次(从创号开始记录,通关任意难度进度都+1)
Rtype77 TaskType = 77 //通关难度A及以上维京远征指定BOSSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1)
Rtype78 TaskType = 78 //通关难度A维京远征指定BOSS时间达到XX秒以内(检查最高记录是否超过了此难度,超过则完成)
Rtype79 TaskType = 79 //使用好友助战英雄通关A难度的指定维京远征BOSS(从接到任务开始通关阵营中包含好友助战英雄难度大于等于A的指定维京远征BOSS时任务完成。)
Rtype80 TaskType = 80 //通关难度A指定狩猎BOOS难度N次(从接到任务开始只有通关A难度进度才+1)
Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成)
Rtype82 TaskType = 82 //通关狩猎指定BOOSN次历史(从创号开始记录登陆天数,通关任意难度进度都+1)
Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1)
Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成)
Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成)
Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成)
Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1)
Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1耗尽BOSS挑战次数)
Rtype89 TaskType = 89 //任意招募N次(从接到任务开始普通招募和阵营招募都算单抽1次10连抽算10次)
Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始单抽点10次不算10连抽才进度+1)
Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始单抽点10次不算10连抽才进度+1)
Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1)
Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级并将这些强化等级中最低的数值计入进度如果达到了任务所需的强化等级则完成任务。)
Rtype94 TaskType = 94 //装备附魔N次历史(从创号开始记录,附魔成功进度+1)
Rtype95 TaskType = 95 //装备洗练N次历史(从创号开始记录,洗练成功进度+1)
Rtype96 TaskType = 96 //强化失败N次(从接到任务开始,强化失败进度+1)
Rtype97 TaskType = 97 //获得X星X套装的装备N件时段(从接到任务开始每获得1件X星X套装的装备则进度+1)
Rtype98 TaskType = 98 //穿戴N套强化A级的装备(打开任务时检查英雄身上的装备的最低等级当最低等级超过A则任务进度+1。)
Rtype99 TaskType = 99 //获得N个初始属性大于等于A条的B星装备(从接到任务开始每次获得强化为0级的A星装备时判断属性条目大于或等于B进度+1)
Rtype100 TaskType = 100 //职业武器强化成功N次历史(从创号开始记录,强化成功进度+1)
Rtype101 TaskType = 101 //获得X星职业武器N件历史(从创号开始记录每获得1件X星职业武器则进度+1)
Rtype102 TaskType = 102 //阵营饰品强化成功N次历史(从创号开始记录,强化成功进度+1)
Rtype103 TaskType = 103 //获得X星阵营饰品N件历史(从创号开始记录每获得1件X星阵营饰品则进度+1)
Rtype104 TaskType = 104 //消费N个钻石历史(从创号开始记录,每次消耗钻石增加消耗额的进度)
Rtype105 TaskType = 105 //商店刷新N次(从接到任务开始,每次刷新商店进度+1)
Rtype106 TaskType = 106 //跨服聊天发言N次(从接到任务开始,每次跨服发言成功进度+1)
Rtype107 TaskType = 107 //赠送N个人好感度(从接到任务开始每赠送1个好友好感度则进度+1)
Rtype108 TaskType = 108 //助战英雄被使用X次(从接到任务开始每被使用1次则进度+1)
Rtype109 TaskType = 109 //加入公会(打开任务时,检查是否加入了公会,加入则完成)
Rtype110 TaskType = 110 //激活X个英雄图鉴(打开任务时,检查英雄图鉴激活数量并计入进度,达到了任务所需个数则完成任务。)
Rtype111 TaskType = 111 //拥有N个X级英雄(打开任务时检查达到X级的英雄数量达到任务所需个数则完成任务)
Rtype112 TaskType = 112 //养成N个X级英雄(从接到任务开始,英雄升级时,如果英雄的初始等级<X且变化后大于等于X则进度+1.)
Rtype113 TaskType = 113 //任意英雄升N级(从接到任务开始,英雄等级每次变化时,进度增加“变化后等级-变化前等级”)
Rtype114 TaskType = 114 //X英雄升到X星(打开任务时检查X英雄的星级达到任务条件则完成任务)
Rtype115 TaskType = 115 //通过升星获得N个A星英雄(从接到任务开始任意英雄升到A星则进度+1)
Rtype116 TaskType = 116 //A阵营英雄技能升N级(从接到任务开始A阵营的英雄技能每升1级进度+1)
Rtype117 TaskType = 117 //指定英雄技能升N级(打开任务时,检查指定英雄技能等级并计入进度,如果达到任务条件则任务完成)
Rtype118 TaskType = 118 //拥有觉醒至A级的B星英雄N个(打开任务时检查B星英雄中觉醒等级大于等于A级的记入进度达到任务条件则完成任务)
Rtype119 TaskType = 119 //指定英雄觉醒至N级(打开任务时,检查指定英雄的觉醒等级并记入进度,达到任务条件则完成任务)
Rtype120 TaskType = 120 //任意英雄觉醒N级(从接到任务开始任意英雄觉醒每升1级进度+1)
Rtype121 TaskType = 121 //A阵营英雄觉醒N级(从接到任务开始A阵营的英雄觉醒每升1级进度+1)
Rtype122 TaskType = 122 //A星英雄觉醒N级(从接到任务开始A星的英雄觉醒每升1级进度+1)
Rtype123 TaskType = 123 //拥有共鸣至A级的B星英雄N个(打开任务时检查B星英雄中共鸣等级大于等于A级的记入进度达到任务条件则完成任务)
Rtype124 TaskType = 124 //拥有共鸣至N级的英雄(打开任务时,检查英雄中共鸣等级最高的英雄并记入进度,达到任务条件则完成任务)
Rtype125 TaskType = 125 //指定英雄共鸣至N级(打开任务时,检查指定英雄的共鸣等级并记入进度,达到任务条件则完成任务)
Rtype126 TaskType = 126 //A阵营英雄共鸣N级(从接到任务开始A阵营的英雄共鸣每升1级进度+1)
Rtype127 TaskType = 127 //A星英雄共鸣N级(从接到任务开始A星的英雄共鸣每升1级进度+1)
Rtype128 TaskType = 128 //竞技场积分达到N分(历史最高记录计入进度达到N分则完成任务)
Rtype129 TaskType = 129 //竞技场段位达到A段位(打开任务时,检查玩家历史最高段位,如果达到任务条件则完成任务)
Rtype130 TaskType = 130 //进行N次竞技场挑战(进行挑战或复仇操作均进度+1)
Rtype131 TaskType = 131 //竞技场获胜N次(挑战或复仇胜利则进度+1)
Rtype132 TaskType = 132 //与N个英雄好感度等级达到A(打开任务时检查好感度达到A的英雄个数计入进度如果达到任务条件则任务完成)
Rtype133 TaskType = 133 //与指定英雄好感度等级达到N(打开任务时,检查指定英雄的好感度等级计入进度,如果达到任务条件则任务完成)
Rtype134 TaskType = 134 //赠送英雄礼物并增加N点好感度(从接到任务开始,英雄好感度每次变化时,进度增加“变化后等级-变化前等级”)
Rtype135 TaskType = 135 //累计武馆训练X小时历史(从创号开始记录满1小时进度+1)
Rtype136 TaskType = 136 //累计美食馆烹饪X小时历史(从创号开始记录满1小时进度+1)
Rtype137 TaskType = 137 //累计铁匠铺锻造X小时历史(从创号开始记录满1小时进度+1)
Rtype138 TaskType = 138 //在线N分钟(从接到任务开始,记录玩家在线时间并记入进度)
Rtype139 TaskType = 139 //通过融合获得指定英雄(从接到任务开始记录,通过融合获得指定英雄则任务完成)
) )
const ( const (

View File

@ -11,6 +11,7 @@ import (
"go_dreamfactory/lego/utils/codec/json" "go_dreamfactory/lego/utils/codec/json"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"time" "time"
"google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/anypb"
@ -82,7 +83,7 @@ func (this *Chat) OnInstallComp() {
//Event------------------------------------------------------------------------------------------------------------ //Event------------------------------------------------------------------------------------------------------------
func (this *Chat) EventUserOffline(session comm.IUserSession) { func (this *Chat) EventUserOffline(session comm.IUserSession) {
if err := this.modelChat.removeCrossChannelMember(session); err != nil { if err := this.modelChat.removeCrossChannelMember(session); err != nil {
this.Debug("EventUserOffline:", log.Fields{ "uid": session.GetUserId(),"err":err.Error()}) this.Debug("EventUserOffline:", log.Fields{"uid": session.GetUserId(), "err": err.Error()})
} }
} }
@ -226,7 +227,7 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
Channel: pb.ChatChannel_System, Channel: pb.ChatChannel_System,
Ctype: pb.ChatType_Text, Ctype: pb.ChatType_Text,
Stag: this.service.GetTag(), Stag: this.service.GetTag(),
Ctime: time.Now().Unix(), Ctime: configure.Now().Unix(),
Content: fmt.Sprintf(st.Text, agrs...), Content: fmt.Sprintf(st.Text, agrs...),
Display: st.Display, Display: st.Display,
} }

View File

@ -139,7 +139,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
N: v.N * int32(req.Amount), N: v.N * int32(req.Amount),
}) })
} }
if code = this.module.ConsumeRes(session, itemcf.SynthetizeDeplete, true); code != pb.ErrorCode_Success { if code = this.module.ConsumeRes(session, sale, true); code != pb.ErrorCode_Success {
return return
} }

View File

@ -127,6 +127,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) {
Avatar: user.Avatar, Avatar: user.Avatar,
Uname: user.Name, Uname: user.Name,
Slv: user.Lv, Slv: user.Lv,
Ctime: configure.Now().Unix(),
Stag: session.GetServiecTag(), Stag: session.GetServiecTag(),
Content: mdata.Monster, Content: mdata.Monster,
AppendStr: mdata.Id, AppendStr: mdata.Id,

View File

@ -167,7 +167,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53,
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype71: comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72:
this.registerVerifyHandle(v.Id, &rtaskCondi{ this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg, cfg: typeCfg,
find: this.modelRtaskRecord.lessEqualFirstParam, find: this.modelRtaskRecord.lessEqualFirstParam,

View File

@ -36,7 +36,16 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
// code = pb.ErrorCode_TaskReceived // code = pb.ErrorCode_TaskReceived
// return // return
// } // }
ue, err := this.moduleTask.ModuleUser.GetUserExpand(uid)
if err != nil {
code = pb.ErrorCode_DBError
return
}
if ue == nil {
code = pb.ErrorCode_UserExpandNull
return
}
var rewards []*cfg.Gameatn var rewards []*cfg.Gameatn
// 玩家的 // 玩家的
activeList := this.moduleTask.modelTaskActive.getActiveListByTag(uid, comm.TaskTag(req.TaskTag)) activeList := this.moduleTask.modelTaskActive.getActiveListByTag(uid, comm.TaskTag(req.TaskTag))
@ -49,33 +58,18 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
} }
// get user expand // get user expand
ue, err := this.moduleTask.ModuleUser.GetUserExpand(uid)
if err != nil {
code = pb.ErrorCode_DBError
return
}
if ue == nil {
code = pb.ErrorCode_UserExpandNull
return
}
update := make(map[string]interface{}) update := make(map[string]interface{})
if req.TaskTag == int32(comm.TASK_DAILY) { if req.TaskTag == int32(comm.TASK_DAILY) {
if ue.Activeday >= conf.Active { if ue.Activeday < conf.Active {
update["received"] = 1 continue
} else {
code = pb.ErrorCode_TaskActiveNoenough
return
} }
} else if req.TaskTag == int32(comm.TASK_WEEKLY) { } else if req.TaskTag == int32(comm.TASK_WEEKLY) {
if ue.Activeweek >= conf.Active { if ue.Activeweek < conf.Active {
update["received"] = 1 continue
} else {
code = pb.ErrorCode_TaskActiveNoenough
return
} }
} }
update["received"] = 1
if len(update) > 0 { if len(update) > 0 {
if err := this.moduleTask.modelTaskActive.updateReceive(session.GetUserId(), if err := this.moduleTask.modelTaskActive.updateReceive(session.GetUserId(),
v.Id, v.Id,
@ -102,7 +96,7 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
Id: req.Id, Id: req.Id,
} }
err := session.SendMsg(string(this.moduleTask.GetType()), TaskSubTypeActiveReceive, resp) err = session.SendMsg(string(this.moduleTask.GetType()), TaskSubTypeActiveReceive, resp)
if err != nil { if err != nil {
code = pb.ErrorCode_SystemError code = pb.ErrorCode_SystemError
} }

View File

@ -95,7 +95,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c
} }
if req.Figure != 0 { if req.Figure != 0 {
this.module.ModuleRtask.SendToRtask(session, comm.Rtype71, 1) this.module.ModuleRtask.SendToRtask(session, comm.Rtype72, 1)
} }
return return
} }

View File

@ -192,7 +192,6 @@ func (this *ModelUser) ChangeLevel(event interface{}, next func(event interface{
ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush, ul.session.SendMsg(string(this.module.GetType()), UserSubTypeLvChangedPush,
&pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv}) &pb.UserLvChangedPush{Uid: ul.session.GetUserId(), Exp: ul.exp, Lv: ul.lv})
this.module.DispenseRes(ul.session, rewards, true) this.module.DispenseRes(ul.session, rewards, true)
this.module.ModuleRtask.SendToRtask(ul.session, comm.Rtype71, 1)
} }
} }