fur数据埋点
This commit is contained in:
parent
df9139cec8
commit
698aec8556
@ -39,6 +39,14 @@ func GetFurShopTag(id int) int {
|
||||
return gamedata.GetIntValue(data, "TAG")
|
||||
}
|
||||
|
||||
func GetFurShopName(id int) string {
|
||||
data, err := gamedata.GetDataByIntKey(CFG_FUR_SHOP, id)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return gamedata.GetStringValue(data, "Name")
|
||||
}
|
||||
|
||||
func GetFurShopItem(id int) []*item.Item {
|
||||
data, err := gamedata.GetDataByIntKey(CFG_FUR_SHOP, id)
|
||||
if err != nil {
|
||||
@ -55,3 +63,11 @@ func GetFurShopItem(id int) []*item.Item {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func GetFurShopCostNum(id int) int {
|
||||
item := GetFurShopCost(id)
|
||||
if len(item) == 0 {
|
||||
return 0
|
||||
}
|
||||
return item[0].Num
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import (
|
||||
activityCfg "server/conf/activity"
|
||||
cardCfg "server/conf/card"
|
||||
chargeCfg "server/conf/charge"
|
||||
fur_cfg "server/conf/fur"
|
||||
guesscolorCfg "server/conf/guess_color"
|
||||
itemCfg "server/conf/item"
|
||||
limitedTimeEventCfg "server/conf/limited_time_event"
|
||||
@ -900,6 +901,11 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
|
||||
Effect := itemCfg.GetItemEffect(v.Id)
|
||||
FurMod.AddFurInfo(Effect, GoUtil.Now(), 0)
|
||||
BackDataType[item.ITEM_TYPE_PET_FUR] = struct{}{}
|
||||
p.TeLog("pro_pet_fur_get", map[string]interface{}{
|
||||
"pet_fur_name": fur_cfg.GetFurShopName(v.Id),
|
||||
"fur_coin_cost": fur_cfg.GetFurShopCostNum(v.Id),
|
||||
"pet_fur_get_type": Label,
|
||||
})
|
||||
default:
|
||||
err := ItemMod.AddItem(v.Id, v.Num)
|
||||
p.TeLog("asset_change", map[string]interface{}{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user