管卡编辑器掉落组修改
This commit is contained in:
parent
5019a65824
commit
0405e8682f
@ -1,6 +1,7 @@
|
|||||||
package combat
|
package combat
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
@ -70,7 +71,25 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (err
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
reward := this.module.configure.GetDropReward(box.Drop)
|
user, err := this.module.ModuleUser.GetUser(session.GetUserId())
|
||||||
|
if err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
reward := this.module.ModuleTools.GetGroupDataByLottery(box.Drop, user.Vip, user.Lv)
|
||||||
|
if len(reward) == 0 {
|
||||||
|
//if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
|
Message: fmt.Sprintf("Lottery no found!:%d", box.Drop),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
this.module.DispenseRes(session, reward, true)
|
this.module.DispenseRes(session, reward, true)
|
||||||
atns = make([]*pb.UserAssets, len(reward))
|
atns = make([]*pb.UserAssets, len(reward))
|
||||||
for i, v := range reward {
|
for i, v := range reward {
|
||||||
|
Loading…
Reference in New Issue
Block a user