Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
25c168a479
@ -358,12 +358,16 @@ type (
|
||||
IGetReddot
|
||||
}
|
||||
IHunting interface {
|
||||
IGetReddot
|
||||
CompleteAllLevel(session IUserSession) (errdata *pb.ErrorData)
|
||||
CheckUserBaseHuntingInfo(uid string) (data []*pb.DBHuntingRank) // 查询玩家最佳通关记录
|
||||
IGetReddot
|
||||
}
|
||||
// 公会
|
||||
ISociaty interface {
|
||||
// 任务条件达成通知
|
||||
IBuriedUpdateNotify
|
||||
// 红点
|
||||
IGetReddot
|
||||
GetSociaty(uid string) *pb.DBSociaty
|
||||
//查询工会信息
|
||||
GetSociatys(sociatyIds []string) (result []*pb.DBSociaty, errdata *pb.ErrorData)
|
||||
@ -378,10 +382,8 @@ type (
|
||||
BingoSetExp(session IUserSession, exp int32) error
|
||||
// 设置工会活跃度
|
||||
BingoSetActivity(session IUserSession, activity int32) error
|
||||
// 任务条件达成通知
|
||||
IBuriedUpdateNotify
|
||||
// 红点
|
||||
IGetReddot
|
||||
//修改公会等级
|
||||
ModifySociatyLv(uid string, lv int32) (err error)
|
||||
}
|
||||
//星座图
|
||||
IHoroscope interface {
|
||||
|
@ -123,7 +123,6 @@ locp:
|
||||
Index: this.queueIndex,
|
||||
})
|
||||
err = this.WriteMsg(&pb.UserMessage{
|
||||
MsgId: msg.MsgId,
|
||||
MainType: string(comm.ModuleUser),
|
||||
SubType: "loginqueuechange",
|
||||
Data: data,
|
||||
|
@ -723,6 +723,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "0", Value: datas[0]},
|
||||
)
|
||||
|
||||
} else if len(datas) == 3 && (datas[0] == "changedragonlv") {
|
||||
var (
|
||||
err error
|
||||
@ -751,6 +752,25 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
return
|
||||
}
|
||||
|
||||
} else if len(datas) == 2 && (datas[0] == "sociatylv") {
|
||||
var (
|
||||
lv int
|
||||
err error
|
||||
)
|
||||
|
||||
module1, err := this.service.GetModule(comm.ModuleSociaty)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
lv, err = strconv.Atoi(datas[1])
|
||||
if err = module1.(comm.ISociaty).ModifySociatyLv(session.GetUserId(), int32(lv)); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ChatType_Moonfantasy.String(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
}
|
||||
>>>>>>> b15e4e2a3a601f09b5bd8577d94611771e4c807d
|
||||
this.Debug("使用bingo命令:uid = %s ",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "0", Value: datas[0]},
|
||||
|
@ -419,3 +419,18 @@ func (this *Sociaty) CreateSociaty(uid, sociatyName string) error {
|
||||
func (this *Sociaty) GetSociaty(uid string) *pb.DBSociaty {
|
||||
return this.modelSociaty.getUserSociaty(uid)
|
||||
}
|
||||
|
||||
func (this *Sociaty) ModifySociatyLv(uid string, lv int32) (err error) {
|
||||
var (
|
||||
sociaty *pb.DBSociaty
|
||||
)
|
||||
sociaty = this.modelSociaty.getUserSociaty(uid)
|
||||
if sociaty != nil {
|
||||
sociaty.Lv = lv
|
||||
this.modelSociaty.updateSociaty(sociaty.Id, map[string]interface{}{
|
||||
"lv": lv,
|
||||
})
|
||||
}
|
||||
err = fmt.Errorf("no fund sociaty!")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user