This commit is contained in:
meixiongfeng 2023-04-12 10:09:08 +08:00
commit 0d37725262
9 changed files with 371 additions and 137 deletions

View File

@ -170,7 +170,7 @@
"HeroCount": 5,
"readyScene": "scenesfight_role_interface_02",
"battleScenes": [
"scenesfight_03_02"
"scenesfight_07"
],
"DefaultHero": 0,
"DisableHero": [],

View File

@ -124,10 +124,10 @@
"lotteryid": 40001001,
"description": "随机蓝色英雄",
"type": 0,
"groupwt": 500,
"groupid": 1002,
"subtype": 2,
"groupnum": 1,
"groupwt": 0,
"groupid": 1001,
"subtype": 0,
"groupnum": 0,
"itemid": {
"a": "item",
"t": "132005",
@ -149,7 +149,7 @@
"description": "随机蓝色英雄",
"type": 0,
"groupwt": 0,
"groupid": 1002,
"groupid": 1001,
"subtype": 0,
"groupnum": 0,
"itemid": {
@ -173,7 +173,7 @@
"description": "随机蓝色英雄",
"type": 0,
"groupwt": 0,
"groupid": 1002,
"groupid": 1001,
"subtype": 0,
"groupnum": 0,
"itemid": {
@ -197,7 +197,7 @@
"description": "随机蓝色英雄",
"type": 0,
"groupwt": 0,
"groupid": 1002,
"groupid": 1001,
"subtype": 0,
"groupnum": 0,
"itemid": {
@ -221,7 +221,7 @@
"description": "随机蓝色英雄",
"type": 0,
"groupwt": 0,
"groupid": 1002,
"groupid": 1001,
"subtype": 0,
"groupnum": 0,
"itemid": {

View File

@ -23,26 +23,26 @@
{
"Id": "120001",
"weight": 500,
"score": 1,
"score": 5,
"effectType": 1
},
{
"Id": "120002",
"weight": 200,
"score": 5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120003",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120004",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -55,21 +55,21 @@
"standard_yield": [
{
"a": "item",
"t": "100001",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100001",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100001",
"t": "100006",
"n": 7
}
]
@ -96,8 +96,8 @@
{
"Id": "120001",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120002",
@ -108,14 +108,14 @@
{
"Id": "120003",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120004",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -128,21 +128,21 @@
"standard_yield": [
{
"a": "item",
"t": "100002",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100002",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100002",
"t": "100006",
"n": 7
}
]
@ -169,26 +169,26 @@
{
"Id": "120001",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120002",
"weight": 200,
"score": -5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120003",
"weight": 200,
"score": 5,
"effectType": 2
"effectType": 1
},
{
"Id": "120004",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -201,21 +201,21 @@
"standard_yield": [
{
"a": "item",
"t": "100003",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100003",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100003",
"t": "100006",
"n": 7
}
]
@ -242,26 +242,26 @@
{
"Id": "120001",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120002",
"weight": 200,
"score": -5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120003",
"weight": 200,
"score": 5,
"score": -1,
"effectType": 2
},
{
"Id": "120004",
"weight": 100,
"score": 10,
"effectType": 3
"score": 5,
"effectType": 1
}
],
"material": [
@ -274,21 +274,21 @@
"standard_yield": [
{
"a": "item",
"t": "100004",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100004",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100004",
"t": "100006",
"n": 7
}
]
@ -315,26 +315,26 @@
{
"Id": "120005",
"weight": 500,
"score": 1,
"score": 5,
"effectType": 1
},
{
"Id": "120006",
"weight": 200,
"score": -5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120007",
"weight": 200,
"score": 5,
"score": -1,
"effectType": 2
},
{
"Id": "120008",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -347,21 +347,21 @@
"standard_yield": [
{
"a": "item",
"t": "100005",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100005",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100005",
"t": "100006",
"n": 7
}
]
@ -388,26 +388,26 @@
{
"Id": "120005",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120006",
"weight": 200,
"score": -5,
"score": 5,
"effectType": 1
},
{
"Id": "120007",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120008",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -461,26 +461,26 @@
{
"Id": "120005",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120006",
"weight": 200,
"score": 5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120007",
"weight": 200,
"score": 5,
"effectType": 2
"effectType": 1
},
{
"Id": "120008",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -493,21 +493,21 @@
"standard_yield": [
{
"a": "item",
"t": "100007",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100007",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100007",
"t": "100006",
"n": 7
}
]
@ -534,26 +534,26 @@
{
"Id": "120005",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120006",
"weight": 200,
"score": 5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120007",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120008",
"weight": 100,
"score": 10,
"effectType": 3
"score": 5,
"effectType": 1
}
],
"material": [
@ -566,21 +566,21 @@
"standard_yield": [
{
"a": "item",
"t": "100008",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100008",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100008",
"t": "100006",
"n": 7
}
]
@ -607,26 +607,26 @@
{
"Id": "120009",
"weight": 500,
"score": 1,
"score": 5,
"effectType": 1
},
{
"Id": "120101",
"weight": 200,
"score": 5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120102",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120103",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -639,21 +639,21 @@
"standard_yield": [
{
"a": "item",
"t": "100009",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100009",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100009",
"t": "100006",
"n": 7
}
]
@ -680,26 +680,26 @@
{
"Id": "120009",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120101",
"weight": 200,
"score": 5,
"effectType": 1
"effectType": 2
},
{
"Id": "120102",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120103",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -712,21 +712,21 @@
"standard_yield": [
{
"a": "item",
"t": "100010",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100010",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100010",
"t": "100006",
"n": 7
}
]
@ -753,14 +753,14 @@
{
"Id": "120009",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120101",
"weight": 200,
"score": -5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120102",
@ -771,8 +771,8 @@
{
"Id": "120103",
"weight": 100,
"score": 10,
"effectType": 3
"score": -1,
"effectType": 2
}
],
"material": [
@ -785,21 +785,21 @@
"standard_yield": [
{
"a": "item",
"t": "100011",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100011",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100011",
"t": "100006",
"n": 7
}
]
@ -826,26 +826,26 @@
{
"Id": "120009",
"weight": 500,
"score": 1,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120101",
"weight": 200,
"score": 5,
"effectType": 1
"score": -1,
"effectType": 2
},
{
"Id": "120102",
"weight": 200,
"score": -5,
"score": -1,
"effectType": 2
},
{
"Id": "120103",
"weight": 100,
"score": 10,
"effectType": 3
"score": 5,
"effectType": 2
}
],
"material": [
@ -858,21 +858,21 @@
"standard_yield": [
{
"a": "item",
"t": "100012",
"t": "100006",
"n": 3
}
],
"low_yield": [
{
"a": "item",
"t": "100012",
"t": "100006",
"n": 1
}
],
"high_yield": [
{
"a": "item",
"t": "100012",
"t": "100006",
"n": 7
}
]

View File

@ -28793,5 +28793,149 @@
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021111,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 1,
"Argu": [
1,
4,
1000
],
"FollowSK": [
211021112
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021112,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 3,
"Argu": [
390001007,
1000,
1,
2
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021211,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 1,
"Argu": [
1,
4,
1200
],
"FollowSK": [
211021212
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021212,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 3,
"Argu": [
390001105,
1000,
1,
2
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021311,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 1,
"Argu": [
1,
4,
2000
],
"FollowSK": [
211021312
],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
},
{
"Id": 211021312,
"EmitPR": 1000,
"From": 2,
"Where": [],
"Order": "",
"Limit": 10,
"ExecuteCnt": 1,
"Type": 29,
"Argu": [
200
],
"FollowSK": [],
"SucFollowSK": [],
"FailFollowSK": [],
"MustHit": false,
"DpsRevisiType": 0,
"DpsCondition": "",
"RevisiCondition": "",
"RevisiParams": []
}
]

View File

@ -15200,5 +15200,89 @@
},
"buffid": [],
"map": ""
},
{
"id": 111021111,
"level": 1,
"MaxLV": 1,
"UnavailablePlayTypes": [],
"Name": {
"key": "skillname_111021111",
"text": "悲痛之爪"
},
"ico": "jn_44002_1",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_1",
"Type": 1,
"CD": 0,
"Target": 2,
"ChildSkill": {
"Id": [
211021111
]
},
"Desc": {
"key": "skill_1110211111",
"text": "巨怪对全体敌方造成一次AOE伤害并附带2回合防御下降"
},
"buffid": [],
"map": ""
},
{
"id": 111021211,
"level": 1,
"MaxLV": 1,
"UnavailablePlayTypes": [],
"Name": {
"key": "skillname_111021211",
"text": "愤怒一击"
},
"ico": "jn_44002_2",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_2",
"Type": 1,
"CD": 2,
"Target": 2,
"ChildSkill": {
"Id": [
211021211
]
},
"Desc": {
"key": "skill_1110212111",
"text": "巨怪对全体敌方造成一次震击并附带2回合眩晕"
},
"buffid": [],
"map": ""
},
{
"id": 111021311,
"level": 1,
"MaxLV": 1,
"UnavailablePlayTypes": [],
"Name": {
"key": "skillname_111021311",
"text": "死灵射线"
},
"ico": "jn_44002_3",
"CorrectPos": 0,
"IsMelee": 0,
"act": "Skill_3",
"Type": 1,
"CD": 5,
"Target": 2,
"ChildSkill": {
"Id": [
211021311
]
},
"Desc": {
"key": "skill_1110213111",
"text": "巨怪对全体敌方发出死灵射线并恢复造成伤害20%的血量"
},
"buffid": [],
"map": ""
}
]

View File

@ -11,7 +11,7 @@
}
],
"title_text": {
"key": "1",
"key": "newsmithy_stove_title_text1",
"text": "冶炼炉lv.1"
}
},
@ -27,7 +27,7 @@
}
],
"title_text": {
"key": "2",
"key": "newsmithy_stove_title_text2",
"text": "冶炼炉lv.2"
}
},
@ -43,7 +43,7 @@
}
],
"title_text": {
"key": "3",
"key": "newsmithy_stove_title_text3",
"text": "冶炼炉lv.3"
}
},
@ -59,7 +59,7 @@
}
],
"title_text": {
"key": "4",
"key": "newsmithy_stove_title_text4",
"text": "冶炼炉lv.4"
}
},
@ -75,7 +75,7 @@
}
],
"title_text": {
"key": "5",
"key": "newsmithy_stove_title_text5",
"text": "冶炼炉lv.5"
}
},
@ -91,7 +91,7 @@
}
],
"title_text": {
"key": "6",
"key": "newsmithy_stove_title_text6",
"text": "冶炼炉lv.6"
}
},
@ -107,7 +107,7 @@
}
],
"title_text": {
"key": "7",
"key": "newsmithy_stove_title_text7",
"text": "冶炼炉lv.7"
}
},
@ -123,7 +123,7 @@
}
],
"title_text": {
"key": "8",
"key": "newsmithy_stove_title_text8",
"text": "冶炼炉lv.8"
}
},
@ -139,7 +139,7 @@
}
],
"title_text": {
"key": "9",
"key": "newsmithy_stove_title_text9",
"text": "冶炼炉lv.9"
}
},
@ -155,7 +155,7 @@
}
],
"title_text": {
"key": "10",
"key": "newsmithy_stove_title_text10",
"text": "冶炼炉lv.10"
}
}

View File

@ -20,10 +20,11 @@ const (
)
var (
ItemNotEnoughError = errors.New("item not enough!") //物品不足
NoFoundGirdError = errors.New("no found gvrid!") //未找到格子
PackGridNumUpper = errors.New("grid amount upper!") //背包格子达到上限
GirdAmountUpper = errors.New("grid amount upper!") //格子容量达到上限
NoFoundItemConfig = errors.New("no found itemconfig!") //道具配置未找到
ItemNotEnoughError = errors.New("item not enough!") //物品不足
NoFoundGirdError = errors.New("no found gvrid!") //未找到格子
PackGridNumUpper = errors.New("grid amount upper!") //背包格子达到上限
GirdAmountUpper = errors.New("grid amount upper!") //格子容量达到上限
)
//随机权重宝箱

View File

@ -228,7 +228,9 @@ func (this *ModelItemsComp) AddItemToUserPack(uId string, itemId string, addnum
return
}
change = make([]*pb.DB_UserItemData, 0)
add, update, del, leftnum = this.addItemToUserPack(uId, itmes, itemId, addnum)
if add, update, del, leftnum, err = this.addItemToUserPack(uId, itmes, itemId, addnum); err != nil {
return
}
if leftnum < 0 {
err = ItemNotEnoughError
return
@ -275,7 +277,9 @@ func (this *ModelItemsComp) AddItemsToUserPack(uId string, items map[string]int3
}
change = make([]*pb.DB_UserItemData, 0)
for k, v := range items {
add, update, del, leftnum = this.addItemToUserPack(uId, itmes, k, v)
if add, update, del, leftnum, err = this.addItemToUserPack(uId, itmes, k, v); err != nil {
return
}
if leftnum < 0 {
err = ItemNotEnoughError
return
@ -352,9 +356,8 @@ func (this *ModelItemsComp) AddItemToUserPackByGrid(uId string, gridid string, a
}
///添加移除物品到用户背包
func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserItemData, itemId string, addnum int32) (add, update, del []*pb.DB_UserItemData, leftnum int64) {
func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserItemData, itemId string, addnum int32) (add, update, del []*pb.DB_UserItemData, leftnum int64, err error) {
var (
err error
conf *cfg.GameItemData
num int64
isNew bool
@ -364,6 +367,7 @@ func (this *ModelItemsComp) addItemToUserPack(uid string, items []*pb.DB_UserIte
}
if conf, err = this.module.configure.GetItemConfigure(itemId); err != nil {
this.module.Errorln(err)
err = NoFoundItemConfig
return
}
if conf.UpperLimit == 0 {

View File

@ -148,6 +148,8 @@ func (this *Items) AddItems(session comm.IUserSession, items map[string]int32, b
code = pb.ErrorCode_ItemsNoEnough
} else if err == PackGridNumUpper {
code = pb.ErrorCode_ItemsGridNumUpper
} else if err == NoFoundItemConfig {
code = pb.ErrorCode_ConfigNoFound
} else {
code = pb.ErrorCode_Unknown
}
@ -192,7 +194,6 @@ func (this *Items) RecoverTicket(session comm.IUserSession) (code pb.ErrorCode)
//Evens--------------------------------------------------------------------------------------------------------------------------------
//推送道具变化消息
func (this *Items) itemsChangePush(session comm.IUserSession, items []*pb.DB_UserItemData) (err error) {
session.SendMsg(string(this.GetType()), "change", &pb.ItemsChangePush{Grids: items})
return
}