月之秘境接口优化
This commit is contained in:
parent
6f91d840e3
commit
8f211c4ee7
@ -84,6 +84,11 @@ func (this *Moonfantasy) Trigger(session comm.IUserSession, source *pb.BattleRep
|
||||
triggerData *cfg.GameDreamlandTriggerData
|
||||
err error
|
||||
)
|
||||
if source == nil || source.Info == nil {
|
||||
this.Error("Trigger", log.Fields{"err": "source is nil"})
|
||||
return
|
||||
}
|
||||
this.Debug("Trigger", log.Fields{"session": session.ToString(), "ptype": source.Info.Ptype})
|
||||
if triggerData, err = this.configure.GettriggerData(int32(source.Info.Ptype)); err == nil && triggerData.Open {
|
||||
n, _ := rand.Int(rand.Reader, big.NewInt(1000))
|
||||
if int32(n.Int64()) < triggerData.DreamlandPro {
|
||||
|
Loading…
Reference in New Issue
Block a user