上传代码
This commit is contained in:
parent
d3d402fc1e
commit
80e414f988
@ -55,6 +55,7 @@ func (this *configureComp) getMaxHoroscopes() (result map[int32]*cfg.GameHorosco
|
|||||||
} else {
|
} else {
|
||||||
result = make(map[int32]*cfg.GameHoroscopeData)
|
result = make(map[int32]*cfg.GameHoroscopeData)
|
||||||
for _, v := range v.(*cfg.GameHoroscope).GetDataMap() {
|
for _, v := range v.(*cfg.GameHoroscope).GetDataMap() {
|
||||||
|
if v.Type == 1 {
|
||||||
if _, ok = result[v.NodeId]; !ok {
|
if _, ok = result[v.NodeId]; !ok {
|
||||||
result[v.NodeId] = v
|
result[v.NodeId] = v
|
||||||
}
|
}
|
||||||
@ -63,6 +64,7 @@ func (this *configureComp) getMaxHoroscopes() (result map[int32]*cfg.GameHorosco
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +77,7 @@ func (this *configureComp) getHoroscopebylv(nodeid, lv int32) (result *cfg.GameH
|
|||||||
this.module.Errorln(err)
|
this.module.Errorln(err)
|
||||||
} else {
|
} else {
|
||||||
for _, v := range v.(*cfg.GameHoroscope).GetDataMap() {
|
for _, v := range v.(*cfg.GameHoroscope).GetDataMap() {
|
||||||
if v.NodeId == nodeid && v.Lv == lv {
|
if v.Type == 1 && v.NodeId == nodeid && v.Lv == lv {
|
||||||
result = v
|
result = v
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -169,11 +169,13 @@ func (this *modelHoroscope) reddot(session comm.IUserSession) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range horoscope.GetDataList() {
|
for _, v := range horoscope.GetDataList() {
|
||||||
|
if v.Type == 1 {
|
||||||
if lv, ok := info.Nodes[v.NodeId]; !ok && v.Lv > lv {
|
if lv, ok := info.Nodes[v.NodeId]; !ok && v.Lv > lv {
|
||||||
if errdata = this.module.CheckRes(session, v.CostItem); errdata == nil {
|
if errdata = this.module.CheckRes(session, v.CostItem); errdata == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,13 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
game_puggsyevent = "game_puggsyevent.json"
|
game_puggsyevent = "game_puggsyevent.json"
|
||||||
game_puggsyskill = "game_puggsyskill.json"
|
// game_puggsyskill = "game_puggsyskill.json"
|
||||||
game_puggsyfight = "game_puggsyfight.json"
|
game_puggsyfight = "game_puggsyfight.json"
|
||||||
game_puggsyscore = "game_puggsyscore.json"
|
game_puggsyscore = "game_puggsyscore.json"
|
||||||
game_passcheck = "game_passcheck.json"
|
game_passcheck = "game_passcheck.json"
|
||||||
game_puggsystar = "game_puggsystar.json"
|
game_puggsystar = "game_puggsystar.json"
|
||||||
game_puggsyrecruit = "game_puggsyrecruit.json"
|
game_puggsyrecruit = "game_puggsyrecruit.json"
|
||||||
|
game_horoscope = "game_horoscope.json" //购买挑战记录
|
||||||
)
|
)
|
||||||
|
|
||||||
// /背包配置管理组件
|
// /背包配置管理组件
|
||||||
@ -30,12 +31,14 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
|
|||||||
this.MCompConfigure.Init(service, module, comp, options)
|
this.MCompConfigure.Init(service, module, comp, options)
|
||||||
this.module = module.(*IsLand)
|
this.module = module.(*IsLand)
|
||||||
err = this.LoadConfigure(game_puggsyevent, cfg.NewGamePuggsyEvent)
|
err = this.LoadConfigure(game_puggsyevent, cfg.NewGamePuggsyEvent)
|
||||||
err = this.LoadConfigure(game_puggsyskill, cfg.NewGamePuggsySkill)
|
// err = this.LoadConfigure(game_puggsyskill, cfg.NewGamePuggsySkill)
|
||||||
err = this.LoadConfigure(game_puggsyfight, cfg.NewGamePuggsyFight)
|
err = this.LoadConfigure(game_puggsyfight, cfg.NewGamePuggsyFight)
|
||||||
err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore)
|
err = this.LoadConfigure(game_puggsyscore, cfg.NewGamePuggsyScore)
|
||||||
err = this.LoadConfigure(game_passcheck, cfg.NewGamePassCheck)
|
err = this.LoadConfigure(game_passcheck, cfg.NewGamePassCheck)
|
||||||
err = this.LoadConfigure(game_puggsystar, cfg.NewGamePuggsyStar)
|
err = this.LoadConfigure(game_puggsystar, cfg.NewGamePuggsyStar)
|
||||||
err = this.LoadConfigure(game_puggsyrecruit, cfg.NewGamePuggsyRecruit)
|
err = this.LoadConfigure(game_puggsyrecruit, cfg.NewGamePuggsyRecruit)
|
||||||
|
|
||||||
|
err = this.LoadConfigure(game_horoscope, cfg.NewGameHoroscope)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +86,7 @@ func (this *ConfigureComp) getGamePuggsySkillData(id int32) (configure *cfg.Game
|
|||||||
v interface{}
|
v interface{}
|
||||||
ok bool
|
ok bool
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(game_puggsyskill); err != nil {
|
if v, err = this.GetConfigure(game_horoscope); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
@ -97,16 +100,16 @@ func (this *ConfigureComp) getGamePuggsySkillData(id int32) (configure *cfg.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
//技能节点
|
//技能节点
|
||||||
func (this *ConfigureComp) getGamePuggsySkilllvData(nid, lv int32) (conf *cfg.GamePuggsySkillData, err error) {
|
func (this *ConfigureComp) getGamePuggsySkilllvData(nid, lv int32) (conf *cfg.GameHoroscopeData, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(game_puggsyskill); err != nil {
|
if v, err = this.GetConfigure(game_horoscope); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
for _, v := range v.(*cfg.GamePuggsySkill).GetDataList() {
|
for _, v := range v.(*cfg.GameHoroscope).GetDataList() {
|
||||||
if v.NodeId == nid && v.Lv == lv {
|
if v.Type == 2 && v.NodeId == nid && v.Lv == lv {
|
||||||
conf = v
|
conf = v
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ func (this *modelComp) getmodel(uid string) (result *pb.DBIsland, err error) {
|
|||||||
//计算属性
|
//计算属性
|
||||||
func (this *modelComp) compute(info *pb.DBIsland, heros []*pb.DBHero) (err error) {
|
func (this *modelComp) compute(info *pb.DBIsland, heros []*pb.DBHero) (err error) {
|
||||||
var (
|
var (
|
||||||
node *cfg.GamePuggsySkillData
|
node *cfg.GameHoroscopeData
|
||||||
property map[int32]int32 = make(map[int32]int32)
|
property map[int32]int32 = make(map[int32]int32)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user