Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
94a685b38a
@ -70,13 +70,16 @@ func (this *apiComp) Fusion(session comm.IUserSession, req *pb.HeroFusionReq) (c
|
|||||||
}
|
}
|
||||||
ChangeList = append(ChangeList, _costMaphero[k])
|
ChangeList = append(ChangeList, _costMaphero[k])
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得新卡
|
// 获得新卡
|
||||||
newHero, err := this.module.modelHero.createHeroOverlying(session.GetUserId(), conf.Hero, 1)
|
newHero, err := this.module.modelHero.createHeroOverlying(session.GetUserId(), conf.Hero, 1)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero})
|
|
||||||
ChangeList = append(ChangeList, newHero)
|
ChangeList = append(ChangeList, newHero)
|
||||||
|
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: ChangeList})
|
||||||
|
} else {
|
||||||
|
this.module.Errorf("err:%v,create hero:%s,uid,%ss", err, conf.Hero, session.GetUserId())
|
||||||
|
code = pb.ErrorCode_HeroCreate // 创建新英雄失败
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), "change", &pb.HeroChangePush{List: ChangeList})
|
session.SendMsg(string(this.module.GetType()), HeroFusionResp, &pb.HeroFusionResp{Heroid: conf.Hero})
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package hero
|
package hero
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
|
||||||
@ -13,8 +14,14 @@ func (this *apiComp) TalentListCheck(session comm.IUserSession, req *pb.HeroTale
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode, data proto.Message) {
|
func (this *apiComp) TalentList(session comm.IUserSession, req *pb.HeroTalentListReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
|
var (
|
||||||
|
err error
|
||||||
|
)
|
||||||
rsp := &pb.HeroTalentListResp{}
|
rsp := &pb.HeroTalentListResp{}
|
||||||
rsp.Telnet, _ = this.module.modelTalent.GetHerotalent(session.GetUserId())
|
if rsp.Telnet, err = this.module.modelTalent.GetHerotalent(session.GetUserId()); err != nil {
|
||||||
|
fmt.Printf("GetHerotalenterr: %v\n", err)
|
||||||
|
code = pb.ErrorCode_DBError
|
||||||
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
|
session.SendMsg(string(this.module.GetType()), HeroTalentListResp, rsp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ func (this *configureComp) GetPrivilegeCard(id string) (configure *cfg.GamePrivi
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if configure, ok = v.(*cfg.GamePrivilegeCard).GetDataMap()[id]; !ok {
|
if configure, ok = v.(*cfg.GamePrivilegeCard).GetDataMap()[id]; !ok {
|
||||||
err = fmt.Errorf("GamePrivilegeCardData not found:%d ", id)
|
err = fmt.Errorf("GamePrivilegeCardData not found:%s ", id)
|
||||||
this.module.Errorf("err:%v", err)
|
this.module.Errorf("err:%v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,6 @@ func (this *SeasonPagoda) TimerSeasonOver() {
|
|||||||
func (this *SeasonPagoda) TimerSeasonStar() {
|
func (this *SeasonPagoda) TimerSeasonStar() {
|
||||||
this.module.Debugf("TimerSeasonStar:%d", configure.Now().Unix())
|
this.module.Debugf("TimerSeasonStar:%d", configure.Now().Unix())
|
||||||
//star := configure.Now()
|
//star := configure.Now()
|
||||||
|
|
||||||
if !db.IsCross() { // 删除本服的赛季塔数据
|
if !db.IsCross() { // 删除本服的赛季塔数据
|
||||||
conn, err := db.Cross() // 获取跨服的链接对象
|
conn, err := db.Cross() // 获取跨服的链接对象
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -186,7 +186,7 @@ func (this *Troll) SellAllItem(uid string, troll *pb.DBTrollTrain, price map[int
|
|||||||
troll.Price = make(map[int32]int32, 0) // 原来的价格也清除
|
troll.Price = make(map[int32]int32, 0) // 原来的价格也清除
|
||||||
troll.GridNum = 0 // 清空格子
|
troll.GridNum = 0 // 清空格子
|
||||||
// 写统计
|
// 写统计
|
||||||
if gold > 0 {
|
if gold != 0 {
|
||||||
this.record.AddTrollRecord(uid, gold, tarinPos)
|
this.record.AddTrollRecord(uid, gold, tarinPos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ func (this *DBModel) ChangeList(uid string, _id string, data map[string]interfac
|
|||||||
if option.IsMgoLog {
|
if option.IsMgoLog {
|
||||||
if uid == "" {
|
if uid == "" {
|
||||||
err = this.UpdateModelLogs(this.TableName, uid, bson.M{"_id": _id}, data)
|
err = this.UpdateModelLogs(this.TableName, uid, bson.M{"_id": _id}, data)
|
||||||
}else{
|
} else {
|
||||||
err = this.UpdateModelLogs(this.TableName, uid, bson.M{"_id": _id, "uid": uid}, data)
|
err = this.UpdateModelLogs(this.TableName, uid, bson.M{"_id": _id, "uid": uid}, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user