上传好友驱逐代码

This commit is contained in:
liwei1dao 2023-03-31 20:13:29 +08:00
parent b47afba64e
commit f54b48bb14

View File

@ -22,7 +22,7 @@ func (this *apiComp) ExpulsionCheck(session comm.IUserSession, req *pb.PracticeE
func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpulsionReq) (code pb.ErrorCode, data proto.Message) {
var (
err error
ok bool
// ok bool
room *pb.DBPracticeRoom
froom *pb.DBPracticeRoom
pillar *pb.DBPracticePillar
@ -180,17 +180,17 @@ func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpuls
defer func() {
this.module.PutUserSession(_session)
}()
if _session, ok = this.module.GetUserSession(pillar.Uid); ok {
if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success {
return
}
if code = this.module.DispenseRes(_session, append(ants1, ants2...), true); code != pb.ErrorCode_Success {
return
}
if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success {
return
}
} else {
// if _session, ok = this.module.GetUserSession(pillar.Uid); ok {
// if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success {
// return
// }
// if code = this.module.DispenseRes(_session, append(ants1, ants2...), true); code != pb.ErrorCode_Success {
// return
// }
// if code = this.module.ModuleHero.KungFuHero(_session, pillar.Hero, false, ""); code != pb.ErrorCode_Success {
// return
// }
// } else {
if _, code = this.module.ModuleHero.AddHeroExp(_session, pillar.Hero, exp); code != pb.ErrorCode_Success {
return
}
@ -217,7 +217,7 @@ func (this *apiComp) Expulsion(session comm.IUserSession, req *pb.PracticeExpuls
CreateTime: uint64(configure.Now().Unix()),
Items: res,
}, pillar.Uid)
}
// }
froom.Knapsack[pillar.Teacher] = 0
froom.Knapsack[pillar.Prop] = 0