获奖记录
This commit is contained in:
parent
a7a25ef028
commit
ac1ee02c4d
|
|
@ -33,7 +33,13 @@ func (this *AwardLogManager) GetAwardLog(plt string, typeId int32) map[int32]int
|
|||
// 1 话费 2实物
|
||||
switch typeId {
|
||||
case 1:
|
||||
|
||||
for _, v := range srvdata.GameItemMgr.GetArr(plt) {
|
||||
if v.GetType() == common.ItemTypeChange {
|
||||
if d.AwardMap[v.GetId()] > 0 {
|
||||
ret[v.GetId()] += d.AwardMap[v.GetId()]
|
||||
}
|
||||
}
|
||||
}
|
||||
case 2:
|
||||
for _, v := range srvdata.GameItemMgr.GetArr(plt) {
|
||||
if v.GetType() == common.ItemTypeObjective {
|
||||
|
|
@ -62,7 +68,10 @@ func (this *AwardLogManager) GetAnnouncerLog(plt string, typeId int32) []model.A
|
|||
|
||||
// 已兑换数据
|
||||
func (this *AwardLogManager) UpdateAwardLog(plt string, itemId int32, num int64) {
|
||||
PlatformMgrSingleton.AddAwardItem(plt, itemId, num)
|
||||
if srvdata.GameItemMgr.Get(plt, itemId).Type == common.ItemTypeObjective ||
|
||||
srvdata.GameItemMgr.Get(plt, itemId).Type == common.ItemTypeChange {
|
||||
PlatformMgrSingleton.AddAwardItem(plt, itemId, num)
|
||||
}
|
||||
}
|
||||
|
||||
// 实时播报数据
|
||||
|
|
|
|||
|
|
@ -761,8 +761,8 @@ func (this *BagMgr) ItemExchangeCard(p *Player, itemId int32, money, cardType in
|
|||
if p != nil {
|
||||
p.AddMessage(newMsg)
|
||||
//已兑换log
|
||||
//itemData := srvdata.GameItemMgr.Get(p.Platform, itemId)
|
||||
//AwardLogMgr.UpdateAwardLog(itemData.Id, int32(1), itemData.Type)
|
||||
itemData := srvdata.GameItemMgr.Get(p.Platform, itemId)
|
||||
AwardLogMgr.UpdateAwardLog(p.Platform, itemData.Id, int64(1))
|
||||
}
|
||||
p.SendToClient(int(bag.SPacketID_PACKET_SC_ITEM_EXCHANGE_RES), pack)
|
||||
}), fmt.Sprintf("ItemExChange%d", p.SnId)).Start()
|
||||
|
|
|
|||
|
|
@ -924,7 +924,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
}*/
|
||||
item := srvdata.GameItemMgr.Get(p.Platform, cdata.ItemId)
|
||||
//已兑换记录
|
||||
//AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, int64(1))
|
||||
awardLog := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
|
|
@ -940,7 +940,7 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen
|
|||
item := srvdata.GameItemMgr.Get(p.Platform, cdata.ItemId)
|
||||
if item.Type == common.ItemTypeObjective {
|
||||
//已兑换记录
|
||||
//AwardLogMgr.UpdateAwardLog(item.Id, int32(1), item.Type)
|
||||
AwardLogMgr.UpdateAwardLog(p.Platform, item.Id, int64(1))
|
||||
awardLog := model.AnnouncerLog{
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue