Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
Conflicts: modules/equipment/api_upgrade.go
This commit is contained in:
commit
c820816bf0
@ -79,7 +79,7 @@
|
|||||||
},
|
},
|
||||||
"usetype": 1,
|
"usetype": 1,
|
||||||
"color": 5,
|
"color": 5,
|
||||||
"bagtype": 3,
|
"bagtype": 2,
|
||||||
"index": 2,
|
"index": 2,
|
||||||
"special_type": 0,
|
"special_type": 0,
|
||||||
"time": 0,
|
"time": 0,
|
||||||
@ -88,7 +88,7 @@
|
|||||||
"synthetize_num": 50,
|
"synthetize_num": 50,
|
||||||
"access": 0,
|
"access": 0,
|
||||||
"use_skip": 0,
|
"use_skip": 0,
|
||||||
"upper_limit": 999,
|
"upper_limit": -1,
|
||||||
"uselv": 0,
|
"uselv": 0,
|
||||||
"isani": 0,
|
"isani": 0,
|
||||||
"star": 6,
|
"star": 6,
|
||||||
@ -583,7 +583,7 @@
|
|||||||
},
|
},
|
||||||
"usetype": 1,
|
"usetype": 1,
|
||||||
"color": 5,
|
"color": 5,
|
||||||
"bagtype": 3,
|
"bagtype": 2,
|
||||||
"index": 17,
|
"index": 17,
|
||||||
"special_type": 0,
|
"special_type": 0,
|
||||||
"time": 0,
|
"time": 0,
|
||||||
@ -592,7 +592,7 @@
|
|||||||
"synthetize_num": 50,
|
"synthetize_num": 50,
|
||||||
"access": 0,
|
"access": 0,
|
||||||
"use_skip": 0,
|
"use_skip": 0,
|
||||||
"upper_limit": 999,
|
"upper_limit": -1,
|
||||||
"uselv": 0,
|
"uselv": 0,
|
||||||
"isani": 0,
|
"isani": 0,
|
||||||
"star": 6,
|
"star": 6,
|
||||||
@ -619,7 +619,7 @@
|
|||||||
},
|
},
|
||||||
"usetype": 1,
|
"usetype": 1,
|
||||||
"color": 5,
|
"color": 5,
|
||||||
"bagtype": 3,
|
"bagtype": 2,
|
||||||
"index": 18,
|
"index": 18,
|
||||||
"special_type": 0,
|
"special_type": 0,
|
||||||
"time": 0,
|
"time": 0,
|
||||||
@ -628,7 +628,7 @@
|
|||||||
"synthetize_num": 50,
|
"synthetize_num": 50,
|
||||||
"access": 0,
|
"access": 0,
|
||||||
"use_skip": 0,
|
"use_skip": 0,
|
||||||
"upper_limit": 999,
|
"upper_limit": -1,
|
||||||
"uselv": 0,
|
"uselv": 0,
|
||||||
"isani": 0,
|
"isani": 0,
|
||||||
"star": 6,
|
"star": 6,
|
||||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
//找到下一个等级的相关配置
|
//找到下一个等级的相关配置
|
||||||
if intensify, err = this.module.configure.GetEquipmentIntensifyConfigureById(equipment.Lv); err != nil || intensify.Need == nil || len(intensify.Need) == 0 {
|
if intensify, err = this.module.configure.GetEquipmentIntensifyConfigureById(conf.Star, equipment.Lv); err != nil || intensify.Need == nil || len(intensify.Need) == 0 {
|
||||||
this.module.Errorf("Equip_Check err:%v", err)
|
this.module.Errorf("Equip_Check err:%v", err)
|
||||||
code = pb.ErrorCode_EquipmentLvlimitReached
|
code = pb.ErrorCode_EquipmentLvlimitReached
|
||||||
return
|
return
|
||||||
|
@ -147,17 +147,22 @@ func (this *configureComp) GetEquipmentIntensifyConfigure() (configure *cfg.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
//获取武器等级消耗表
|
//获取武器等级消耗表
|
||||||
func (this *configureComp) GetEquipmentIntensifyConfigureById(Id int32) (configure *cfg.Game_equipIntensifyData, err error) {
|
func (this *configureComp) GetEquipmentIntensifyConfigureById(star, lv int32) (configure *cfg.Game_equipIntensifyData, err error) {
|
||||||
var (
|
var (
|
||||||
v interface{}
|
v interface{}
|
||||||
ok bool
|
|
||||||
)
|
)
|
||||||
if v, err = this.GetConfigure(equip_intensify); err != nil {
|
if v, err = this.GetConfigure(equip_intensify); err != nil {
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if configure, ok = v.(*cfg.Game_equipIntensify).GetDataMap()[Id]; !ok {
|
for _, v1 := range v.(*cfg.Game_equipIntensify).GetDataList() {
|
||||||
err = fmt.Errorf("EquipmentConfigure not found:%d ", Id)
|
|
||||||
|
if v1.Star == star && v1.Level == lv {
|
||||||
|
configure = v1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if configure == nil {
|
||||||
|
err = fmt.Errorf("EquipmentConfigure not found star :%d lv:%d", star, lv)
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string,
|
|||||||
return pb.ErrorCode_ReqParameterError
|
return pb.ErrorCode_ReqParameterError
|
||||||
}
|
}
|
||||||
hero, err := this.modelHero.createOneHero(session.GetUserId(), heroConfId)
|
hero, err := this.modelHero.createOneHero(session.GetUserId(), heroConfId)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return pb.ErrorCode_HeroCreate
|
return pb.ErrorCode_HeroCreate
|
||||||
}
|
}
|
||||||
hero.Lv = lv
|
hero.Lv = lv
|
||||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
sale := RandomProps(prop)
|
sale := RandomProps(prop)
|
||||||
if code = this.module.ModuleHero.GetSpecifiedHero(session, sale.Prize.T, sale.Star, 0, int32(req.Amount)); code != pb.ErrorCode_Success {
|
if code = this.module.ModuleHero.GetSpecifiedHero(session, sale.Prize.T, sale.Star, 1, int32(req.Amount)); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case 4: //自选宝箱
|
case 4: //自选宝箱
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
@ -38,5 +37,3 @@ func (table *Game_equipIntensify) GetDataList() []*Game_equipIntensifyData {
|
|||||||
func (table *Game_equipIntensify) Get(key int32) *Game_equipIntensifyData {
|
func (table *Game_equipIntensify) Get(key int32) *Game_equipIntensifyData {
|
||||||
return table._dataMap[key]
|
return table._dataMap[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user