Compare commits

..

No commits in common. "45a5dd6852bfffc38e5290a83de292155b7dbc41" and "36cce9df01bb36fa4edf3ec200f544f9b386341d" have entirely different histories.

2 changed files with 27 additions and 0 deletions

View File

@ -2896,6 +2896,30 @@ func CSAwardLog(s *netlib.Session, packetId int, data interface{}, sid int64) er
if p == nil {
return nil
}
var items []*Item
item := &Item{
ItemId: 30011,
ItemNum: 1,
}
var cost []*model.ItemInfo
items = append(items, item)
item = &Item{
ItemId: 77006,
ItemNum: 1,
}
items = append(items, item)
BagMgrSingleton.AddItemsV2(&ItemParam{
P: p,
Change: items,
Cost: cost,
Add: 0,
GainWay: common.GainWaySign7Add,
Operator: "system",
Remark: "累计签到进阶奖励获得",
gameId: 0,
gameFreeId: 0,
noLog: false,
})
msg, ok := data.(*player_proto.CS_AwardLog)
if !ok {
return nil

View File

@ -54,6 +54,8 @@ func (this *AwardLogManager) UpdateAwardLog(plt string, itemId int32, num int64)
if srvdata.GameItemMgr.Get(plt, itemId).Type == common.ItemTypeObjective ||
srvdata.GameItemMgr.Get(plt, itemId).Type == common.ItemTypeChange {
typeId := int32(1)
aaa := srvdata.GameItemMgr.Get(plt, itemId).Type
logger.Logger.Trace("--------------------", aaa)
if srvdata.GameItemMgr.Get(plt, itemId).Type == common.ItemTypeObjective {
typeId = 2
}
@ -64,6 +66,7 @@ func (this *AwardLogManager) UpdateAwardLog(plt string, itemId int32, num int64)
this.AwardMap[plt][typeId] = make(map[int32]int64)
}
this.AwardMap[plt][typeId][itemId] += num
this.Save()
}
}