update
This commit is contained in:
parent
4b5ebf9268
commit
84720ed7f1
@ -20,7 +20,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq)
|
||||
sale []*pb.UserAssets
|
||||
mapitem map[string]int32
|
||||
)
|
||||
mapitem = map[string]int32{}
|
||||
mapitem = make(map[string]int32)
|
||||
if code = this.SellResCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
@ -32,7 +32,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq)
|
||||
}
|
||||
}
|
||||
if len(mapitem) > 0 {
|
||||
if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c != pb.ErrorCode_Success {
|
||||
if c, d := this.module.ModuleItems.SellItem(session, mapitem, true); c == pb.ErrorCode_Success {
|
||||
for _, v := range d {
|
||||
sale = append(sale, &pb.UserAssets{
|
||||
A: v.A,
|
||||
@ -46,7 +46,7 @@ func (this *apiComp) SellRes(session comm.IUserSession, req *pb.UserSellResReq)
|
||||
}
|
||||
}
|
||||
if len(equip) > 0 {
|
||||
if c, d := this.module.ModuleEquipment.SellEquipments(session, equip); c != pb.ErrorCode_Success {
|
||||
if c, d := this.module.ModuleEquipment.SellEquipments(session, equip); c == pb.ErrorCode_Success {
|
||||
for _, v := range d {
|
||||
sale = append(sale, &pb.UserAssets{
|
||||
A: v.A,
|
||||
|
Loading…
Reference in New Issue
Block a user