英雄觉醒 配置支持增加多条属性
This commit is contained in:
parent
94cdd0a0de
commit
246bb80bf3
File diff suppressed because it is too large
Load Diff
@ -13857,7 +13857,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 0,
|
"use_skip": 0,
|
||||||
"upper_limit": 0,
|
"upper_limit": 0,
|
||||||
"img": "attr_gold",
|
"img": "item_10000035",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_355",
|
"key": "item_item_intr_355",
|
||||||
"text": "用于商城购买消耗的礼卷"
|
"text": "用于商城购买消耗的礼卷"
|
||||||
@ -13931,7 +13931,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "wp_icon_jjcq",
|
"img": "item_14020028",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_357",
|
"key": "item_item_intr_357",
|
||||||
"text": "原始鸵鸟产的蛋,具有极高的营养价值。"
|
"text": "原始鸵鸟产的蛋,具有极高的营养价值。"
|
||||||
@ -13968,7 +13968,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020029",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_358",
|
"key": "item_item_intr_358",
|
||||||
"text": "海螺响起时,可能是传递一种信号,也可能是传递一种思念。"
|
"text": "海螺响起时,可能是传递一种信号,也可能是传递一种思念。"
|
||||||
@ -14005,7 +14005,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020030",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_359",
|
"key": "item_item_intr_359",
|
||||||
"text": "长途旅行过程中,可以把颈枕放在脖子后,缓解疲劳感。"
|
"text": "长途旅行过程中,可以把颈枕放在脖子后,缓解疲劳感。"
|
||||||
@ -14042,7 +14042,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020031",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_360",
|
"key": "item_item_intr_360",
|
||||||
"text": "用原始世界各种造型的贝壳串联起来的项链。"
|
"text": "用原始世界各种造型的贝壳串联起来的项链。"
|
||||||
@ -14079,7 +14079,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020032",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_361",
|
"key": "item_item_intr_361",
|
||||||
"text": "平先生做的阳春面,深受和平谷居民的欢迎。"
|
"text": "平先生做的阳春面,深受和平谷居民的欢迎。"
|
||||||
@ -14116,7 +14116,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020033",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_362",
|
"key": "item_item_intr_362",
|
||||||
"text": "一个绑满鞭炮的椅子,能够达到一飞冲天的效果。"
|
"text": "一个绑满鞭炮的椅子,能够达到一飞冲天的效果。"
|
||||||
@ -14153,7 +14153,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020034",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_363",
|
"key": "item_item_intr_363",
|
||||||
"text": "神龙大侠诞生之后,繁衍出的应援物。"
|
"text": "神龙大侠诞生之后,繁衍出的应援物。"
|
||||||
@ -14190,7 +14190,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020035",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_364",
|
"key": "item_item_intr_364",
|
||||||
"text": "传统手工艺品,逢年过节挂上灯笼,增添节日氛围。"
|
"text": "传统手工艺品,逢年过节挂上灯笼,增添节日氛围。"
|
||||||
@ -14227,7 +14227,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020036",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_365",
|
"key": "item_item_intr_365",
|
||||||
"text": "闻名于坏蛋联盟的世界名画。"
|
"text": "闻名于坏蛋联盟的世界名画。"
|
||||||
@ -14264,7 +14264,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020037",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_366",
|
"key": "item_item_intr_366",
|
||||||
"text": "用来提升室内装潢高级感的摆件。"
|
"text": "用来提升室内装潢高级感的摆件。"
|
||||||
@ -14301,7 +14301,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020038",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_367",
|
"key": "item_item_intr_367",
|
||||||
"text": "用于庆祝一年中最重要的一天。"
|
"text": "用于庆祝一年中最重要的一天。"
|
||||||
@ -14338,7 +14338,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020039",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_368",
|
"key": "item_item_intr_368",
|
||||||
"text": "一种冰棒,吃完会让人心情愉悦。"
|
"text": "一种冰棒,吃完会让人心情愉悦。"
|
||||||
@ -14375,7 +14375,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020040",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_369",
|
"key": "item_item_intr_369",
|
||||||
"text": "被赋予魔法的毛毯,把人带到想去的地方。"
|
"text": "被赋予魔法的毛毯,把人带到想去的地方。"
|
||||||
@ -14412,7 +14412,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020041",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_370",
|
"key": "item_item_intr_370",
|
||||||
"text": "传说,只要喝下幸福药水,就能和所爱之人幸福的生活在一起。"
|
"text": "传说,只要喝下幸福药水,就能和所爱之人幸福的生活在一起。"
|
||||||
@ -14449,7 +14449,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020042",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_371",
|
"key": "item_item_intr_371",
|
||||||
"text": "一种击打乐器,经常在具有地方特色的庆典活动中出现。"
|
"text": "一种击打乐器,经常在具有地方特色的庆典活动中出现。"
|
||||||
@ -14486,7 +14486,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020043",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_372",
|
"key": "item_item_intr_372",
|
||||||
"text": "这是一面能窥探到人内心深处欲望的镜子。"
|
"text": "这是一面能窥探到人内心深处欲望的镜子。"
|
||||||
@ -14523,7 +14523,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020044",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_373",
|
"key": "item_item_intr_373",
|
||||||
"text": "这本书里记载了各种龙的信息,爱龙人士的首选。"
|
"text": "这本书里记载了各种龙的信息,爱龙人士的首选。"
|
||||||
@ -14560,7 +14560,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020045",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_374",
|
"key": "item_item_intr_374",
|
||||||
"text": "维京人纯手工打造的龙牙,坚硬无比。"
|
"text": "维京人纯手工打造的龙牙,坚硬无比。"
|
||||||
@ -14597,7 +14597,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020046",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_375",
|
"key": "item_item_intr_375",
|
||||||
"text": "猎龙人研发的弩箭,是龙的天敌。"
|
"text": "猎龙人研发的弩箭,是龙的天敌。"
|
||||||
@ -14634,7 +14634,7 @@
|
|||||||
"access": [],
|
"access": [],
|
||||||
"use_skip": 11001,
|
"use_skip": 11001,
|
||||||
"upper_limit": 999,
|
"upper_limit": 999,
|
||||||
"img": "icon_st03",
|
"img": "item_14020047",
|
||||||
"intr": {
|
"intr": {
|
||||||
"key": "item_item_intr_376",
|
"key": "item_item_intr_376",
|
||||||
"text": "龙骑士驯龙时安置在龙身上的护具。"
|
"text": "龙骑士驯龙时安置在龙身上的护具。"
|
||||||
|
@ -30,6 +30,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
|||||||
_heroMap map[string]interface{}
|
_heroMap map[string]interface{}
|
||||||
err error
|
err error
|
||||||
bManAwaken bool // 是否达到满级共鸣
|
bManAwaken bool // 是否达到满级共鸣
|
||||||
|
bPropertyChange bool // 属性变化
|
||||||
)
|
)
|
||||||
_heroMap = make(map[string]interface{}, 0)
|
_heroMap = make(map[string]interface{}, 0)
|
||||||
chanegCard = make([]*pb.DBHero, 0)
|
chanegCard = make([]*pb.DBHero, 0)
|
||||||
@ -82,21 +83,23 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
_hero.JuexingLv += 1
|
_hero.JuexingLv += 1
|
||||||
_value, ok := strconv.Atoi(awakenData.Phasebonus[0])
|
for _, v := range awakenData.Phasebonus {
|
||||||
|
_value, ok := strconv.Atoi(v.S)
|
||||||
if ok == nil { // 升级技能
|
if ok == nil { // 升级技能
|
||||||
for pos, v := range _hero.NormalSkill {
|
for pos, v1 := range _hero.NormalSkill {
|
||||||
value, err := strconv.Atoi(awakenData.Phasebonus[1])
|
if int32(pos) == v.D {
|
||||||
if err == nil {
|
v1.SkillID = int32(_value)
|
||||||
if pos == value {
|
|
||||||
v.SkillID = int32(_value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_heroMap["normalSkill"] = _hero.NormalSkill
|
_heroMap["normalSkill"] = _hero.NormalSkill
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
} else { // 加属性
|
} else { // 加属性
|
||||||
|
bPropertyChange = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if bPropertyChange {
|
||||||
this.module.modelHero.resetJuexingProperty(_hero)
|
this.module.modelHero.resetJuexingProperty(_hero)
|
||||||
}
|
}
|
||||||
|
|
||||||
_heroMap["juexingLv"] = _hero.JuexingLv
|
_heroMap["juexingLv"] = _hero.JuexingLv
|
||||||
_heroMap["juexProperty"] = _hero.JuexProperty
|
_heroMap["juexProperty"] = _hero.JuexProperty
|
||||||
// 保存数据
|
// 保存数据
|
||||||
|
@ -22,6 +22,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime/trace"
|
"runtime/trace"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -113,6 +114,8 @@ type sumy struct {
|
|||||||
|
|
||||||
func Test_Main(t *testing.T) {
|
func Test_Main(t *testing.T) {
|
||||||
|
|
||||||
|
value, err := strconv.Atoi("944005411")
|
||||||
|
fmt.Printf("%v,%v", value, err)
|
||||||
ids := utils.RandomNumbers(0, 10, 5)
|
ids := utils.RandomNumbers(0, 10, 5)
|
||||||
for _, v := range ids {
|
for _, v := range ids {
|
||||||
fmt.Printf("%d", v)
|
fmt.Printf("%d", v)
|
||||||
|
@ -203,12 +203,13 @@ func (this *ModelHero) resetJuexingProperty(hero *pb.DBHero) {
|
|||||||
if len(awakenData.Phasebonus) != 2 {
|
if len(awakenData.Phasebonus) != 2 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
key := awakenData.Phasebonus[0]
|
for _, v := range awakenData.Phasebonus {
|
||||||
value, err := strconv.Atoi(awakenData.Phasebonus[1])
|
value, err := strconv.Atoi(v.S)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch key {
|
|
||||||
|
switch v.S {
|
||||||
case comm.Hp:
|
case comm.Hp:
|
||||||
hero.JuexProperty[comm.Hp] += int32(value)
|
hero.JuexProperty[comm.Hp] += int32(value)
|
||||||
case comm.Def:
|
case comm.Def:
|
||||||
@ -226,9 +227,11 @@ func (this *ModelHero) resetJuexingProperty(hero *pb.DBHero) {
|
|||||||
case comm.ResonanceDefPro:
|
case comm.ResonanceDefPro:
|
||||||
hero.JuexProperty[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def])))
|
hero.JuexProperty[comm.Def] += int32(math.Floor((float64(value) / 1000) * float64(hero.Property[comm.Def])))
|
||||||
default:
|
default:
|
||||||
this.module.Errorf("unkonw Resonance property:%s", key)
|
this.module.Errorf("unkonw Resonance property:%s", v.S)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
37
sys/configure/structs/Game.compare.go
Normal file
37
sys/configure/structs/Game.compare.go
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
package cfg
|
||||||
|
|
||||||
|
import "errors"
|
||||||
|
|
||||||
|
type Gamecompare struct {
|
||||||
|
S string
|
||||||
|
D int32
|
||||||
|
}
|
||||||
|
|
||||||
|
const TypeId_Gamecompare = -229713143
|
||||||
|
|
||||||
|
func (*Gamecompare) GetTypeId() int32 {
|
||||||
|
return -229713143
|
||||||
|
}
|
||||||
|
|
||||||
|
func (_v *Gamecompare)Deserialize(_buf map[string]interface{}) (err error) {
|
||||||
|
{ var _ok_ bool; if _v.S, _ok_ = _buf["s"].(string); !_ok_ { err = errors.New("s error"); return } }
|
||||||
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["d"].(float64); !_ok_ { err = errors.New("d error"); return }; _v.D = int32(_tempNum_) }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func DeserializeGamecompare(_buf map[string]interface{}) (*Gamecompare, error) {
|
||||||
|
v := &Gamecompare{}
|
||||||
|
if err := v.Deserialize(_buf); err == nil {
|
||||||
|
return v, nil
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
@ -15,7 +15,7 @@ type GameHeroAwakenData struct {
|
|||||||
Hid string
|
Hid string
|
||||||
Phase int32
|
Phase int32
|
||||||
Name string
|
Name string
|
||||||
Phasebonus []string
|
Phasebonus []*Gamecompare
|
||||||
Describe string
|
Describe string
|
||||||
Icon string
|
Icon string
|
||||||
Condition int32
|
Condition int32
|
||||||
@ -39,11 +39,11 @@ func (_v *GameHeroAwakenData)Deserialize(_buf map[string]interface{}) (err error
|
|||||||
var _ok_ bool
|
var _ok_ bool
|
||||||
if _arr_, _ok_ = _buf["phasebonus"].([]interface{}); !_ok_ { err = errors.New("phasebonus error"); return }
|
if _arr_, _ok_ = _buf["phasebonus"].([]interface{}); !_ok_ { err = errors.New("phasebonus error"); return }
|
||||||
|
|
||||||
_v.Phasebonus = make([]string, 0, len(_arr_))
|
_v.Phasebonus = make([]*Gamecompare, 0, len(_arr_))
|
||||||
|
|
||||||
for _, _e_ := range _arr_ {
|
for _, _e_ := range _arr_ {
|
||||||
var _list_v_ string
|
var _list_v_ *Gamecompare
|
||||||
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
|
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGamecompare(_x_); err != nil { return } }
|
||||||
_v.Phasebonus = append(_v.Phasebonus, _list_v_)
|
_v.Phasebonus = append(_v.Phasebonus, _list_v_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user