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,
|
||||
"color": 5,
|
||||
"bagtype": 3,
|
||||
"bagtype": 2,
|
||||
"index": 2,
|
||||
"special_type": 0,
|
||||
"time": 0,
|
||||
@ -88,7 +88,7 @@
|
||||
"synthetize_num": 50,
|
||||
"access": 0,
|
||||
"use_skip": 0,
|
||||
"upper_limit": 999,
|
||||
"upper_limit": -1,
|
||||
"uselv": 0,
|
||||
"isani": 0,
|
||||
"star": 6,
|
||||
@ -583,7 +583,7 @@
|
||||
},
|
||||
"usetype": 1,
|
||||
"color": 5,
|
||||
"bagtype": 3,
|
||||
"bagtype": 2,
|
||||
"index": 17,
|
||||
"special_type": 0,
|
||||
"time": 0,
|
||||
@ -592,7 +592,7 @@
|
||||
"synthetize_num": 50,
|
||||
"access": 0,
|
||||
"use_skip": 0,
|
||||
"upper_limit": 999,
|
||||
"upper_limit": -1,
|
||||
"uselv": 0,
|
||||
"isani": 0,
|
||||
"star": 6,
|
||||
@ -619,7 +619,7 @@
|
||||
},
|
||||
"usetype": 1,
|
||||
"color": 5,
|
||||
"bagtype": 3,
|
||||
"bagtype": 2,
|
||||
"index": 18,
|
||||
"special_type": 0,
|
||||
"time": 0,
|
||||
@ -628,7 +628,7 @@
|
||||
"synthetize_num": 50,
|
||||
"access": 0,
|
||||
"use_skip": 0,
|
||||
"upper_limit": 999,
|
||||
"upper_limit": -1,
|
||||
"uselv": 0,
|
||||
"isani": 0,
|
||||
"star": 6,
|
||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.EquipmentUpgrade
|
||||
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)
|
||||
code = pb.ErrorCode_EquipmentLvlimitReached
|
||||
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 (
|
||||
v interface{}
|
||||
ok bool
|
||||
)
|
||||
if v, err = this.GetConfigure(equip_intensify); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
} else {
|
||||
if configure, ok = v.(*cfg.Game_equipIntensify).GetDataMap()[Id]; !ok {
|
||||
err = fmt.Errorf("EquipmentConfigure not found:%d ", Id)
|
||||
for _, v1 := range v.(*cfg.Game_equipIntensify).GetDataList() {
|
||||
|
||||
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)
|
||||
return
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ func (this *Hero) GetSpecifiedHero(session comm.IUserSession, heroConfId string,
|
||||
return pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
hero, err := this.modelHero.createOneHero(session.GetUserId(), heroConfId)
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
return pb.ErrorCode_HeroCreate
|
||||
}
|
||||
hero.Lv = lv
|
||||
|
@ -49,7 +49,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
case 4: //自选宝箱
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -24,7 +23,7 @@ func NewGame_equipIntensify(_buf []map[string]interface{}) (*Game_equipIntensify
|
||||
dataMap[_v.Key] = _v
|
||||
}
|
||||
}
|
||||
return &Game_equipIntensify{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
return &Game_equipIntensify{_dataList: _dataList, _dataMap: dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *Game_equipIntensify) GetDataMap() map[int32]*Game_equipIntensifyData {
|
||||
@ -38,5 +37,3 @@ func (table *Game_equipIntensify) GetDataList() []*Game_equipIntensifyData {
|
||||
func (table *Game_equipIntensify) Get(key int32) *Game_equipIntensifyData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user