Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
9a59cbb680
@ -488,8 +488,11 @@ func (this *ModelHero) PropertyCompute(hero *pb.DBHero) {
|
||||
comm.Cridam: int32(growCfg.Cridam), //暴击伤害
|
||||
comm.Effre: int32(growCfg.Effre), //效果抵抗
|
||||
}
|
||||
|
||||
if hero.Id != "" { // objID 为空表示是怪物对象 不享受天赋属性加成
|
||||
this.resetTalentProperty(hero)
|
||||
}
|
||||
}
|
||||
|
||||
//重新计算英雄属性
|
||||
func (this *ModelHero) ChangeHeroProperty(session comm.IUserSession, hero *pb.DBHero) (err error) {
|
||||
@ -688,7 +691,8 @@ func (this *ModelHero) GetRandHeroIdBypool(sz []int32) int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *ModelHero) InitTempHero(heroCfgId string, star, lv int32) *pb.DBHero {
|
||||
// 初始化怪物属性
|
||||
func (this *ModelHero) InitMonsterHero(heroCfgId string, star, lv int32) *pb.DBHero {
|
||||
heroCfg := this.moduleHero.configure.GetHeroConfig(heroCfgId)
|
||||
if heroCfg == nil {
|
||||
this.moduleHero.Errorf("%v hero not found from config %v", heroCfgId)
|
||||
@ -715,6 +719,7 @@ func (this *ModelHero) InitTempHero(heroCfgId string, star, lv int32) *pb.DBHero
|
||||
}
|
||||
this.PropertyCompute(newHero)
|
||||
this.initHeroSkill(newHero)
|
||||
|
||||
return newHero
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ func (this *Hero) KungFuHero(session comm.IUserSession, heroObjID string, bKongf
|
||||
|
||||
// 创建怪物英雄
|
||||
func (this *Hero) CreateMonster(heroCid string, star, lv int32) (hero *pb.DBHero) {
|
||||
hero = this.modelHero.InitTempHero(heroCid, star, lv)
|
||||
hero = this.modelHero.InitMonsterHero(heroCid, star, lv)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user