集卡活动
This commit is contained in:
parent
f67df3c8df
commit
9a8b5d25ef
|
@ -92,6 +92,20 @@ func (this *CSUpBagInfoHandler) Process(s *netlib.Session, packetid int, data in
|
|||
return nil
|
||||
}
|
||||
|
||||
if common.Config.IsDevMode {
|
||||
if msg.GetOpt() == -1 {
|
||||
items := []*Item{{
|
||||
ItemId: msg.ItemId,
|
||||
ItemNum: int64(msg.ItemNum),
|
||||
}}
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_AddBag, "system", "测试")
|
||||
for _, v := range items {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, v.Name, v.ItemNum, "测试")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
pack := &bag.SCUpBagInfo{RetCode: bag.OpResultCode_OPRC_Error}
|
||||
send := func() {
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_ALL_BAG_USE), pack)
|
||||
|
@ -328,6 +342,7 @@ func CSExchangeList(s *netlib.Session, packetid int, data interface{}, sid int64
|
|||
})
|
||||
}
|
||||
pack.Infos = append(pack.Infos, &bag.ExchangeInfo{
|
||||
Id: v.Id,
|
||||
CostItems: costItems,
|
||||
GainItems: gainItems,
|
||||
})
|
||||
|
@ -398,7 +413,7 @@ func CSPropExchange(s *netlib.Session, packetid int, data interface{}, sid int64
|
|||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemConsume, item.ItemId, item.Name, item.ItemNum, "集卡活动兑换使用")
|
||||
}
|
||||
// 增加背包物品
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_Collect, "player", "集卡活动兑换")
|
||||
BagMgrSingleton.AddJybBagInfo(p, items, 0, common.GainWay_Collect, "system", "集卡活动兑换")
|
||||
for _, v := range items {
|
||||
BagMgrSingleton.RecordItemLog(p.Platform, p.SnId, ItemObtain, v.ItemId, v.Name, v.ItemNum, "集卡活动兑换获得")
|
||||
pack.Items = append(pack.Items, &bag.PropInfo{
|
||||
|
|
Loading…
Reference in New Issue