This commit is contained in:
wh_zcy 2023-05-26 15:13:24 +08:00
commit 8358b89945
21 changed files with 1385 additions and 1289 deletions

View File

@ -1065,7 +1065,7 @@
"id": 121,
"insert": 0,
"desc": "A阵营英雄觉醒N级(从接到任务开始A阵营的英雄觉醒每升1级进度+1)",
"data1": "等级",
"data1": "次数",
"data2": "阵营id",
"data3": "",
"data4": ""
@ -1523,7 +1523,7 @@
{
"id": 172,
"insert": 0,
"desc": "连续战斗X次接取任务后在任意战斗内使用连续战斗一次进度便加一",
"desc": "维京体系内战斗X次接取任务后在任意战斗内使用连续战斗一次进度便加一",
"data1": "次数",
"data2": "",
"data3": "",

View File

@ -279,7 +279,7 @@
"id": "kungfu",
"name": {
"key": "opencond_opencond_name_13",
"text": "武馆入口"
"text": "维京远征"
},
"main": [
{
@ -302,7 +302,7 @@
"id": "event",
"name": {
"key": "opencond_opencond_name_14",
"text": "主题活动入口"
"text": "巨龙之岛"
},
"main": [
{
@ -325,7 +325,7 @@
"id": "mistyIsland",
"name": {
"key": "opencond_opencond_name_15",
"text": "迷雾岛屿"
"text": "灾厄之岛"
},
"main": [
{

View File

@ -7603,13 +7603,13 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "连续战斗10次",
"text": "连续战斗10次"
"key": "连续战斗3次",
"text": "连续战斗3次"
},
"type": 172,
"valid": 0,
"NPC": 10241,
"data1": 10,
"data1": 3,
"data2": 0,
"data3": 0,
"data4": 0,
@ -7705,14 +7705,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "A阵营1个英雄觉醒4阶",
"text": "A阵营1个英雄觉醒4阶"
"key": "B阵营1个英雄觉醒2阶",
"text": "B阵营1个英雄觉醒2阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10301,
"data1": 4,
"data2": 0,
"data1": 2,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7722,14 +7722,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "B阵营1个英雄觉醒4阶",
"text": "B阵营1个英雄觉醒4阶"
"key": "B阵营1个英雄觉醒3阶",
"text": "B阵营1个英雄觉醒3阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10311,
"data1": 4,
"data2": 0,
"data1": 3,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7739,14 +7739,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "C阵营1个英雄觉醒4阶",
"text": "C阵营1个英雄觉醒4阶"
"key": "B阵营1个英雄觉醒4阶",
"text": "B阵营1个英雄觉醒4阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10321,
"data1": 4,
"data2": 0,
"data1": 5,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7790,14 +7790,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "A阵营1个觉醒5阶",
"text": "A阵营1个觉醒5阶"
"key": "A阵营1个觉醒2阶",
"text": "A阵营1个觉醒2阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10351,
"data1": 5,
"data2": 0,
"data1": 2,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7807,14 +7807,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "B阵营1个觉醒5阶",
"text": "B阵营1个觉醒5阶"
"key": "A阵营1个觉醒3阶",
"text": "A阵营1个觉醒3阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10361,
"data1": 5,
"data2": 0,
"data1": 3,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7824,14 +7824,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "C阵营1个觉醒5阶",
"text": "C阵营1个觉醒5阶"
"key": "A阵营1个觉醒5阶",
"text": "A阵营1个觉醒5阶"
},
"type": 105,
"type": 121,
"valid": 0,
"NPC": 10371,
"data1": 5,
"data2": 0,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -7841,14 +7841,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "5星卡技能升满",
"text": "5星卡技能升满"
"key": "1个5星卡技能升满",
"text": "1个5星卡技能升满"
},
"type": 105,
"type": 174,
"valid": 0,
"NPC": 10381,
"data1": 5,
"data2": 0,
"data1": 1,
"data2": 5,
"data3": 0,
"data4": 0,
"data5": 0
@ -7912,10 +7912,10 @@
"key": "将炉温拉满1次",
"text": "将炉温拉满1次"
},
"type": 105,
"type": 175,
"valid": 0,
"NPC": 0,
"data1": 3,
"data1": 100,
"data2": 0,
"data3": 0,
"data4": 0,
@ -8014,11 +8014,11 @@
"key": "解锁2阶段装备1个图纸",
"text": "解锁2阶段装备1个图纸"
},
"type": 105,
"type": 179,
"valid": 0,
"NPC": 0,
"data1": 1,
"data2": 0,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -8028,14 +8028,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "解锁3阶段装备1个图纸",
"text": "解锁3阶段装备1个图纸"
"key": "解锁3阶段装备2个图纸",
"text": "解锁3阶段装备2个图纸"
},
"type": 105,
"type": 179,
"valid": 0,
"NPC": 0,
"data1": 1,
"data2": 0,
"data1": 2,
"data2": 3,
"data3": 0,
"data4": 0,
"data5": 0
@ -8045,14 +8045,14 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "解锁5阶段装备1个图纸",
"text": "解锁5阶段装备1个图纸"
"key": "解锁5阶段装备3个图纸",
"text": "解锁5阶段装备3个图纸"
},
"type": 105,
"type": 179,
"valid": 0,
"NPC": 0,
"data1": 1,
"data2": 0,
"data1": 3,
"data2": 5,
"data3": 0,
"data4": 0,
"data5": 0
@ -8116,11 +8116,11 @@
"key": "指定A套装强化6",
"text": "指定A套装强化6"
},
"type": 105,
"type": 93,
"valid": 0,
"NPC": 0,
"data1": 6,
"data2": 0,
"data2": 1,
"data3": 0,
"data4": 0,
"data5": 0
@ -8133,11 +8133,11 @@
"key": "指定B套装强化6",
"text": "指定B套装强化6"
},
"type": 105,
"type": 93,
"valid": 0,
"NPC": 0,
"data1": 6,
"data2": 0,
"data2": 2,
"data3": 0,
"data4": 0,
"data5": 0
@ -8402,15 +8402,15 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "自动战斗装备副本难度5",
"text": "自动战斗装备副本难度5"
"key": "自动战斗装备副本难度2",
"text": "自动战斗装备副本难度2"
},
"type": 105,
"type": 181,
"valid": 0,
"NPC": 0,
"data1": 1,
"data2": 0,
"data3": 0,
"data2": 11,
"data3": 2,
"data4": 0,
"data5": 0
},
@ -8419,15 +8419,15 @@
"data": 2,
"type_sp": 1,
"tasktxt": {
"key": "自动战斗装备副本难度10",
"text": "自动战斗装备副本难度10"
"key": "自动战斗装备副本难度3",
"text": "自动战斗装备副本难度3"
},
"type": 105,
"type": 181,
"valid": 0,
"NPC": 0,
"data1": 1,
"data2": 0,
"data3": 0,
"data2": 11,
"data3": 3,
"data4": 0,
"data5": 0
},
@ -8456,7 +8456,7 @@
"key": "解锁木桩1根",
"text": "解锁木桩1根"
},
"type": 105,
"type": 152,
"valid": 0,
"NPC": 0,
"data1": 1,
@ -8473,10 +8473,10 @@
"key": "解锁木桩2根",
"text": "解锁木桩2根"
},
"type": 105,
"type": 152,
"valid": 0,
"NPC": 0,
"data1": 1,
"data1": 2,
"data2": 0,
"data3": 0,
"data4": 0,
@ -8490,10 +8490,10 @@
"key": "解锁木桩3根",
"text": "解锁木桩3根"
},
"type": 105,
"type": 152,
"valid": 0,
"NPC": 0,
"data1": 1,
"data1": 3,
"data2": 0,
"data3": 0,
"data4": 0,
@ -8507,7 +8507,7 @@
"key": "抵御踢馆2次",
"text": "抵御踢馆2次"
},
"type": 105,
"type": 182,
"valid": 0,
"NPC": 0,
"data1": 2,
@ -8524,7 +8524,7 @@
"key": "抵御踢馆4次",
"text": "抵御踢馆4次"
},
"type": 105,
"type": 182,
"valid": 0,
"NPC": 0,
"data1": 4,
@ -8541,7 +8541,7 @@
"key": "抵御踢馆6次",
"text": "抵御踢馆6次"
},
"type": 105,
"type": 182,
"valid": 0,
"NPC": 0,
"data1": 6,
@ -8592,7 +8592,7 @@
"key": "完成一次每日1健",
"text": "完成一次每日1健"
},
"type": 105,
"type": 185,
"valid": 0,
"NPC": 0,
"data1": 1,
@ -8609,7 +8609,7 @@
"key": "完成一次每日3健",
"text": "完成一次每日3健"
},
"type": 105,
"type": 185,
"valid": 0,
"NPC": 0,
"data1": 3,
@ -8626,7 +8626,7 @@
"key": "完成一次每日5健",
"text": "完成一次每日5健"
},
"type": 105,
"type": 185,
"valid": 0,
"NPC": 0,
"data1": 5,
@ -8677,11 +8677,11 @@
"key": "5名25级英雄",
"text": "5名25级英雄"
},
"type": 105,
"type": 111,
"valid": 0,
"NPC": 0,
"data1": 5,
"data2": 0,
"data2": 25,
"data3": 0,
"data4": 0,
"data5": 0
@ -8694,11 +8694,11 @@
"key": "5名40级英雄",
"text": "5名40级英雄"
},
"type": 105,
"type": 111,
"valid": 0,
"NPC": 0,
"data1": 5,
"data2": 0,
"data2": 40,
"data3": 0,
"data4": 0,
"data5": 0
@ -8711,11 +8711,11 @@
"key": "5名50级英雄",
"text": "5名50级英雄"
},
"type": 105,
"type": 111,
"valid": 0,
"NPC": 0,
"data1": 5,
"data2": 0,
"data2": 50,
"data3": 0,
"data4": 0,
"data5": 0
@ -8728,7 +8728,7 @@
"key": "武馆的派遣悬赏3次",
"text": "武馆的派遣悬赏3次"
},
"type": 105,
"type": 186,
"valid": 0,
"NPC": 0,
"data1": 3,
@ -8745,7 +8745,7 @@
"key": "武馆的派遣悬赏8次",
"text": "武馆的派遣悬赏8次"
},
"type": 105,
"type": 186,
"valid": 0,
"NPC": 0,
"data1": 8,
@ -8796,7 +8796,7 @@
"key": "武馆的派遣悬赏10次",
"text": "武馆的派遣悬赏10次"
},
"type": 105,
"type": 186,
"valid": 0,
"NPC": 0,
"data1": 10,
@ -8830,7 +8830,7 @@
"key": "10名50级英雄",
"text": "10名50级英雄"
},
"type": 105,
"type": 111,
"valid": 0,
"NPC": 0,
"data1": 10,
@ -12556,7 +12556,7 @@
"type": 172,
"valid": 0,
"NPC": 0,
"data1": 10,
"data1": 3,
"data2": 0,
"data3": 0,
"data4": 0,

View File

@ -14793,29 +14793,6 @@
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 11,
"Argu": [
1,
4,
6000
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 213002312,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 2,
"Argu": [
413002311,
@ -14833,9 +14810,57 @@
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 213002312,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 2,
"Argu": [
413002312,
-1,
-1
],
"FollowSK": [],
"SucFollowSK": [
213002313
],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 213002313,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 1,
"Argu": [
1,
4,
5000
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 213002314,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "Type=Rand",
@ -17235,6 +17260,30 @@
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 2,
"Argu": [
444004211,
1000,
1,
-1
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 244004212,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 2,
"Type": 1,
"Argu": [
1,
@ -17255,35 +17304,6 @@
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 244004212,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 1,
"Argu": [
1,
4,
200,
2,
2,
60
],
"FollowSK": [],
"SucFollowSK": [
244004213,
244004214
],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 244004213,
"EmitPR": 600,
@ -17307,30 +17327,6 @@
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 244004214,
"EmitPR": 1000,
"From": 4,
"Where": [],
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 2,
"Argu": [
444004211,
1000,
1,
-1
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 244004311,
"EmitPR": 1000,
@ -25753,11 +25749,14 @@
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 21,
"Type": 23,
"Argu": [
2,
2,
60
4,
1800,
1,
1,
80
],
"FollowSK": [],
"SucFollowSK": [],
@ -25801,11 +25800,14 @@
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 21,
"Type": 23,
"Argu": [
2,
2,
60
4,
1800,
1,
1,
80
],
"FollowSK": [],
"SucFollowSK": [],
@ -25847,11 +25849,14 @@
"Order": "",
"Limit": 1,
"ExecuteCnt": 1,
"Type": 21,
"Type": 23,
"Argu": [
2,
2,
60
4,
1800,
1,
1,
80
],
"FollowSK": [
215003314,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -842,7 +842,7 @@
"When": 15,
"FromCheck": "Target=3",
"TargetCheck": "",
"MainSkillCheck": "",
"MainSkillCheck": "MainSkillID=113002311",
"AfterSkillCheck": "",
"BuffCheck": "",
"AddCon": [],
@ -850,7 +850,23 @@
"Type": "CallSkillPas",
"MaxEmitTimes": 1,
"Callback": [
213002313
113002312
]
},
{
"Id": 413002312,
"When": 15,
"FromCheck": "Target=3",
"TargetCheck": "",
"MainSkillCheck": "MainSkillID=113002312",
"AfterSkillCheck": "",
"BuffCheck": "",
"AddCon": [],
"PasPr": 1000,
"Type": "CallSkillPas",
"MaxEmitTimes": 2,
"Callback": [
113002312
]
},
{
@ -2488,7 +2504,7 @@
"When": 16,
"FromCheck": "Target=3",
"TargetCheck": "Target=2",
"MainSkillCheck": "",
"MainSkillCheck": "MainSkillID=144004211",
"AfterSkillCheck": "",
"BuffCheck": "",
"AddCon": [],

View File

@ -7,7 +7,7 @@
},
"introduce": {
"key": "vikingexpedition_entrance_introduce_1",
"text": "通过挑战三大泰坦,获得强力装备吧"
"text": "通过挑战三大泰坦,获得强力装备吧"
},
"unlock": {
"key": "vikingexpedition_entrance_unlock_1",
@ -24,7 +24,7 @@
},
"introduce": {
"key": "vikingexpedition_entrance_introduce_2",
"text": "武器副本描述"
"text": "通过挑战幕后黑手,获得强力神器吧!"
},
"unlock": {
"key": "vikingexpedition_entrance_unlock_2",
@ -41,7 +41,7 @@
},
"introduce": {
"key": "vikingexpedition_entrance_introduce_3",
"text": "饰品副本描述"
"text": "通过挑战邪恶博士,获得强力饰品吧!"
},
"unlock": {
"key": "vikingexpedition_entrance_unlock_3",

View File

@ -455,7 +455,7 @@ type (
}
IPandaAtlas interface {
CheckActivatePandaAtlasCollect(uid string, id string)
CheckActivatePandaAtlasCollect(uid string, id string) (err error)
}
//练功房
IPractice interface {

View File

@ -19,9 +19,10 @@ func (this *apiComp) Activate(session comm.IUserSession, req *pb.AtlasActivateRe
return
}
atlasConf := this.module.configure.GetPandoAtlasConf(req.Id)
if atlasConf == nil {
code = pb.ErrorCode_ConfigNoFound
atlasConf, err := this.module.configure.GetPandoAtlasConf(req.Id)
if err != nil {
code = pb.ErrorCode_ConfigNoFound // 返回错误码
data.Message = err.Error()
return
}
list, _ := this.module.modelPandaAtlas.getPandaAtlasList(session.GetUserId())

View File

@ -2,6 +2,7 @@ package atlas
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
@ -52,11 +53,14 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
}
// 获取教习数据
func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxData) {
func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxData, err error) {
if v, err := this.GetConfigure(pandaJx); err == nil {
if configure, ok := v.(*cfg.GamePandamasJx); ok {
return configure.Get(id)
if conf = configure.Get(id); conf == nil {
err = comm.NewNotFoundConfErr("atlas", pandaJx, id)
this.module.Errorln(err)
}
}
} else {
err = fmt.Errorf("%T no is *cfg.GamePandamasJxData", v)
@ -65,15 +69,21 @@ func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxDa
}
// 获取武馆图鉴数据
func (this *configureComp) GetPandoAtlasConf(id string) (conf *cfg.GamePandamasTjData) {
if v, err := this.GetConfigure(pandaAtlas); err == nil {
func (this *configureComp) GetPandoAtlasConf(id string) (conf *cfg.GamePandamasTjData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(pandaAtlas); err == nil {
if configure, ok := v.(*cfg.GamePandamasTj); ok {
return configure.Get(id)
conf = configure.Get(id)
if nil == conf {
err = fmt.Errorf("GamePandamasTj not found key :%s", id)
}
} else {
err = fmt.Errorf("%T no is *cfg.GamePandamasTjData", v)
return
}
}
err = fmt.Errorf("%T no is *cfg.GetPandoAtlasConf", v)
return
}

View File

@ -11,6 +11,8 @@ import (
"go_dreamfactory/modules"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/sys/db"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
@ -45,17 +47,21 @@ func (this *PandaAtlas) OnInstallComp() {
this.modelPandaAtlas = this.RegisterComp(new(modelPandaAtlas)).(*modelPandaAtlas)
}
func (this *PandaAtlas) CheckActivatePandaAtlasCollect(uid string, id string) {
conf := this.configure.GetPandoAtlasConf(id)
if conf == nil {
func (this *PandaAtlas) CheckActivatePandaAtlasCollect(uid string, id string) (err error) {
var (
conf *cfg.GamePandamasTjData
model *db.DBModel
)
conf, err = this.configure.GetPandoAtlasConf(id)
if err != nil {
this.Errorf("GetPandoAtlasConf err:%d", id)
return
}
if this.IsCross() {
atlas := &pb.DBPandaAtlas{}
if model, err := this.GetDBModelByUid(uid, this.modelPandaAtlas.TableName); err == nil {
if model, err = this.GetDBModelByUid(uid, this.modelPandaAtlas.TableName); err == nil {
if err := model.Get(uid, atlas); err != nil { // 防止数据没有初始化情况
if err = model.Get(uid, atlas); err != nil { // 防止数据没有初始化情况
if mongo.ErrNoDocuments == err {
atlas.Id = primitive.NewObjectID().Hex()
atlas.Uid = uid
@ -86,7 +92,7 @@ func (this *PandaAtlas) CheckActivatePandaAtlasCollect(uid string, id string) {
}
update := make(map[string]interface{}, 0)
update["collect"] = atlas.Collect
if err := model.Change(uid, update); err != nil {
if err = model.Change(uid, update); err != nil {
this.Errorf("err:%v", err)
return
}

View File

@ -53,20 +53,27 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe
bFound := false
for _, v := range cityInfo.Special {
if v == k {
if cityConf := this.module.configure.GetCaravanCity(req.City); cityConf != nil {
if cityConf, err := this.module.configure.GetCaravanCity(req.City); err == nil {
price = cityConf.Specialnum * price / 1000
bFound = true
} else {
data.Message = err.Error()
code = pb.ErrorCode_ConfigNoFound
return
}
break
}
}
if !bFound {
if cityConf := this.module.configure.GetCaravanCity(req.City); cityConf != nil {
if cityConf, e := this.module.configure.GetCaravanCity(req.City); e == nil {
for _, v := range cityConf.Exspecial {
if v == k {
price = cityConf.Exspecialnum * price / 1000
}
}
} else {
code = pb.ErrorCode_DataNotFound
data.Message = e.Error()
}
}
addScore += price * v // 卖出收益

View File

@ -44,13 +44,16 @@ func (this *apiComp) GotoCity(session comm.IUserSession, req *pb.CaravanGotoCity
}
}
if bNewTask { // 到该城市随机一个新的任务
if newCity := this.module.configure.GetCaravanCity(req.City); newCity != nil {
if newCity, e := this.module.configure.GetCaravanCity(req.City); e == nil {
ipos := comm.GetRandW(newCity.Cityevent)
list.Eventid = newCity.Cityevent[ipos] // 新的任务
// list.Tasktime = configure.Now().Unix()
// if event := this.module.configure.GetCaravanEventById(list.Eventid); event != nil {
// list.Task = event.Worldtask // 对应世界任务组
// }
} else {
code = pb.ErrorCode_DataNotFound
data.Message = e.Error()
}
}
if list.Curcity == req.City {

View File

@ -1,6 +1,7 @@
package caravan
import (
"fmt"
"go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules"
@ -54,15 +55,20 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
}
// 获取列车货物信息
func (this *configureComp) GetCaravanCity(cityId int32) (data *cfg.GameCaravanCityData) {
if v, err := this.GetConfigure(game_caravan); err == nil {
func (this *configureComp) GetCaravanCity(cityId int32) (data *cfg.GameCaravanCityData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_caravan); err == nil {
if configure, ok := v.(*cfg.GameCaravanCity); ok {
data = configure.Get(cityId)
if data == nil {
err = fmt.Errorf("caravan GetCaravanCity conf not found key:%d", cityId)
}
return
}
} else {
log.Errorf("get GetCaravanCity conf err:%v", err)
}
err = fmt.Errorf("get GetCaravanCity conf err:%v", err)
return
}

View File

@ -136,7 +136,7 @@ func (this *Caravan) refreshCaravanCityInfo(uid string, caravan *pb.DBCaravan) {
if int32(configure.Now().Unix()-caravan.Citystime) >= changeTime {
bChange = true
for k, v := range caravan.City {
if c := this.configure.GetCaravanCity(k); c != nil {
if c, _ := this.configure.GetCaravanCity(k); c != nil {
v.Count = make(map[int32]int32) // 初始化城市信息
v.Special = []int32{}
if len(c.Special) > int(c.Citytypenum) {

View File

@ -108,8 +108,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
szTask = append(szTask, comm.GettaskParam(comm.Rtype122, _hero.JuexingLv, _hero.Star))
cfg := this.module.configure.GetHeroConfig(_hero.HeroID)
if cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype121, cfg.Race, utils.ToInt32(_hero.HeroID), _hero.JuexingLv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype121, 1, cfg.Race))
//xx英雄满级、共鸣、觉醒至最高状态
nextAwaken := this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)

View File

@ -1,6 +1,7 @@
package hunting
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
@ -43,6 +44,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
cfgHunting := this.module.configure.GetHuntingBossConfigData(req.BossType, req.Difficulty)
if cfgHunting == nil {
code = pb.ErrorCode_ConfigNoFound
data.Message = fmt.Sprintf("GetHuntingBossConfig No't Found:BossType = %d,Difficulty = %d", req.BossType, req.Difficulty)
return
}

View File

@ -61,16 +61,24 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.PracticeUpgradeR
}
switch pillar.Lv {
case 2:
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100002")
if err := this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100002"); err != nil {
data.Message = err.Error()
}
break
case 3:
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100003")
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100003"); err != nil {
data.Message = err.Error()
}
break
case 4:
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100004")
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100004"); err != nil {
data.Message = err.Error()
}
break
case 5:
this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100005")
if this.module.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100005"); err != nil {
data.Message = err.Error()
}
break
}
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{

View File

@ -63,7 +63,9 @@ func (this *modelPandata) queryUserMartialhall(uid string) (result *pb.DBPractic
this.module.Errorln(err)
return
}
this.module.atlas.CheckActivatePandaAtlasCollect(uid, "100001")
if err = this.module.atlas.CheckActivatePandaAtlasCollect(uid, "100001"); err != nil {
return
}
}
err = nil
return

View File

@ -17,6 +17,7 @@ func (this *apiComp) AtlasActivateCheck(session comm.IUserSession, req *pb.Smith
func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtlasActivateReq) (code pb.ErrorCode, data *pb.ErrorData) {
var (
addScore int32 // 更新图鉴增加的积分
szTask []*comm.TaskParam
)
code = this.AtlasActivateCheck(session, req)
if code != pb.ErrorCode_Success {
@ -59,7 +60,7 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
code = pb.ErrorCode_SmithyNoFoundAtlas
return
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype166, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype166, 1))
} else if conf.TypeId == 2 {
if v, ok := atlas.Collect[req.Id]; ok {
if !v.Activate { // 激活
@ -75,10 +76,10 @@ func (this *apiComp) AtlasActivate(session comm.IUserSession, req *pb.SmithyAtla
code = pb.ErrorCode_SmithyNoFoundAtlas
return
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype165, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype165, 1))
}
this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype167, atlas.Score))
szTask = append(szTask, comm.GettaskParam(comm.Rtype167, atlas.Score))
this.module.ModuleRtask.TriggerTask(session.GetUserId(), szTask...)
session.SendMsg(string(this.module.GetType()), "atlasactivate", &pb.SmithyAtlasActivateResp{Data: atlas})
return
}