Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a76c281e49
@ -354,3 +354,22 @@ func (this *MCompConfigure) GetEquipmentConfigureById(equipmentId string) (confi
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (this *MCompConfigure) GetAllItemConfigure() (item []*cfg.GameItemData) {
|
||||||
|
if v, err := this.GetConfigure(game_item); err == nil {
|
||||||
|
for _, v1 := range v.(*cfg.GameItem).GetDataMap() {
|
||||||
|
item = append(item, v1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MCompConfigure) GetAllEquipmentConfigure(equipmentId string) (configure []*cfg.GameEquipData) {
|
||||||
|
|
||||||
|
if v, err := this.GetConfigure(game_equip); err == nil {
|
||||||
|
for _, v1 := range v.(*cfg.GameEquip).GetDataMap() {
|
||||||
|
configure = append(configure, v1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -111,10 +111,15 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
var (
|
var (
|
||||||
res []*cfg.Gameatn
|
res []*cfg.Gameatn
|
||||||
)
|
)
|
||||||
if val, err := this.configure.GetYouDaddyConf(); err == nil {
|
|
||||||
for _, v := range val.GetDataList() {
|
|
||||||
res = append(res, v.Var...)
|
|
||||||
|
|
||||||
|
equip := this.configure.GetAllItemConfigure()
|
||||||
|
for _, v1 := range equip {
|
||||||
|
|
||||||
|
res = append(res, &cfg.Gameatn{
|
||||||
|
A: "equi",
|
||||||
|
T: v1.Id,
|
||||||
|
N: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
data := this.configure.GetHeroConfigData()
|
data := this.configure.GetHeroConfigData()
|
||||||
for _, v := range data {
|
for _, v := range data {
|
||||||
@ -126,11 +131,19 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 发所有道具
|
||||||
|
item := this.configure.GetAllItemConfigure()
|
||||||
|
for _, v := range item {
|
||||||
|
res = append(res, &cfg.Gameatn{
|
||||||
|
A: "item",
|
||||||
|
T: v.Id,
|
||||||
|
N: 100,
|
||||||
|
})
|
||||||
|
}
|
||||||
code = this.DispenseRes(session, res, true)
|
code = this.DispenseRes(session, res, true)
|
||||||
if code != pb.ErrorCode_Success {
|
if code != pb.ErrorCode_Success {
|
||||||
this.Errorf("资源发放失败,%v", code)
|
this.Errorf("资源发放失败,%v", code)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "param", Value: datas[0]},
|
log.Field{Key: "param", Value: datas[0]},
|
||||||
|
@ -336,8 +336,9 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
|||||||
N: 1,
|
N: 1,
|
||||||
}
|
}
|
||||||
if code, atno := this.module.DispenseAtno(session, []*cfg.Gameatn{res}, true); code == pb.ErrorCode_Success {
|
if code, atno := this.module.DispenseAtno(session, []*cfg.Gameatn{res}, true); code == pb.ErrorCode_Success {
|
||||||
var list *pb.AtnoData
|
|
||||||
list.Atno = atno
|
list := &pb.AtnoData{}
|
||||||
|
list.Atno = append(list.Atno, atno...)
|
||||||
rsp.Data = append(rsp.Data, list)
|
rsp.Data = append(rsp.Data, list)
|
||||||
for _, v := range atno {
|
for _, v := range atno {
|
||||||
if v.A == "hero" {
|
if v.A == "hero" {
|
||||||
|
@ -339,22 +339,22 @@ func (this *ModelHero) setEquipment(uid string, hero *pb.DBHero) (newHero *pb.DB
|
|||||||
suite2Star := hero.Suite2Star
|
suite2Star := hero.Suite2Star
|
||||||
suite1Lv := hero.Suite1Lv
|
suite1Lv := hero.Suite1Lv
|
||||||
suite2Lv := hero.Suite2Lv
|
suite2Lv := hero.Suite2Lv
|
||||||
if hero.SameCount > 1 {
|
// if hero.SameCount > 1 {
|
||||||
// 克隆一个新的
|
// // 克隆一个新的
|
||||||
hero.SameCount -= 1
|
// hero.SameCount -= 1
|
||||||
hero.Suite1Star = 0
|
// hero.Suite1Star = 0
|
||||||
hero.Suite2Star = 0
|
// hero.Suite2Star = 0
|
||||||
hero.Suite1Lv = 0
|
// hero.Suite1Lv = 0
|
||||||
hero.Suite2Lv = 0
|
// hero.Suite2Lv = 0
|
||||||
hero.SuiteId = 0
|
// hero.SuiteId = 0
|
||||||
hero.SuiteExtId = 0
|
// hero.SuiteExtId = 0
|
||||||
hero.EquipID = make([]string, 8)
|
// hero.EquipID = make([]string, 8)
|
||||||
newHero = this.CloneNewHero(uid, hero)
|
// newHero = this.CloneNewHero(uid, hero)
|
||||||
hero.EquipID = make([]string, 8)
|
// hero.EquipID = make([]string, 8)
|
||||||
hero.SameCount = 1
|
// hero.SameCount = 1
|
||||||
update["sameCount"] = 1
|
// update["sameCount"] = 1
|
||||||
update["horoscopeProperty"] = hero.HoroscopeProperty
|
// update["horoscopeProperty"] = hero.HoroscopeProperty
|
||||||
}
|
// }
|
||||||
// 修改装备属性 并更新
|
// 修改装备属性 并更新
|
||||||
update["suiteId"] = _suiteId
|
update["suiteId"] = _suiteId
|
||||||
update["suiteExtId"] = _suiteExtId
|
update["suiteExtId"] = _suiteExtId
|
||||||
@ -456,6 +456,7 @@ func (this *ModelHero) PropertyCompute(hero *pb.DBHero) {
|
|||||||
|
|
||||||
if hero.Id != "" { // objID 为空表示是怪物对象 不享受天赋属性加成
|
if hero.Id != "" { // objID 为空表示是怪物对象 不享受天赋属性加成
|
||||||
this.resetTalentProperty(hero)
|
this.resetTalentProperty(hero)
|
||||||
|
this.moduleHero.moduleHoroscope.ComputeHeroNumeric(hero.Uid, hero)
|
||||||
}
|
}
|
||||||
this.resetJuexingProperty(hero)
|
this.resetJuexingProperty(hero)
|
||||||
}
|
}
|
||||||
@ -467,6 +468,7 @@ func (this *ModelHero) ChangeHeroProperty(session comm.IUserSession, hero *pb.DB
|
|||||||
"property": hero.Property,
|
"property": hero.Property,
|
||||||
"talentProperty": hero.TalentProperty,
|
"talentProperty": hero.TalentProperty,
|
||||||
"juexProperty": hero.JuexProperty,
|
"juexProperty": hero.JuexProperty,
|
||||||
|
"horoscopeProperty": hero.HoroscopeProperty,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = this.ChangeList(session.GetUserId(), hero.Id, update); err != nil {
|
if err = this.ChangeList(session.GetUserId(), hero.Id, update); err != nil {
|
||||||
|
@ -344,15 +344,15 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
|
|||||||
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero})
|
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if _hero.SameCount > 1 {
|
// if _hero.SameCount > 1 {
|
||||||
_hero.SameCount -= 1
|
// _hero.SameCount -= 1
|
||||||
newHero := this.modelHero.CloneNewHero(session.GetUserId(), _hero)
|
// newHero := this.modelHero.CloneNewHero(session.GetUserId(), _hero)
|
||||||
_changeHero = append(_changeHero, newHero)
|
// _changeHero = append(_changeHero, newHero)
|
||||||
}
|
// }
|
||||||
_heroMap := map[string]interface{}{
|
_heroMap := map[string]interface{}{
|
||||||
"status": pb.HeroType_HeroTypeKongFu,
|
"status": pb.HeroType_HeroTypeKongFu,
|
||||||
"sameCount": 1,
|
"sameCount": 1,
|
||||||
"horoscopeProperty": _hero.HoroscopeProperty,
|
//"horoscopeProperty": _hero.HoroscopeProperty,
|
||||||
}
|
}
|
||||||
_hero.Status = pb.HeroType_HeroTypeKongFu
|
_hero.Status = pb.HeroType_HeroTypeKongFu
|
||||||
_hero.SameCount = 1
|
_hero.SameCount = 1
|
||||||
@ -667,6 +667,8 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
|||||||
"normalSkill": hero.NormalSkill,
|
"normalSkill": hero.NormalSkill,
|
||||||
"talentProperty": hero.TalentProperty,
|
"talentProperty": hero.TalentProperty,
|
||||||
"property": hero.Property,
|
"property": hero.Property,
|
||||||
|
"horoscopeProperty": hero.HoroscopeProperty,
|
||||||
|
"juexProperty": hero.JuexProperty,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存数据
|
// 保存数据
|
||||||
|
Loading…
Reference in New Issue
Block a user