上传gm命令
This commit is contained in:
parent
146eb77f4e
commit
8e579dde24
@ -360,12 +360,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)
|
||||
@ -380,10 +384,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 {
|
||||
|
@ -719,6 +719,28 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
||||
|
||||
module1.(comm.ILibrary).GMCreateFavorability(session.GetUserId())
|
||||
|
||||
this.Debug("使用bingo命令:uid = %s ",
|
||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||
log.Field{Key: "0", Value: datas[0]},
|
||||
)
|
||||
} 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(),
|
||||
}
|
||||
}
|
||||
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