This commit is contained in:
hahwu 2025-09-09 11:44:33 +08:00
parent cca8a27f9a
commit 35499f2177

View File

@ -501,6 +501,9 @@ func (p *Player) HandleItem(itemList []*item.Item, Label string) error {
change_type = "gain"
}
IType := itemCfg.GetItemType(v.Id)
if IType == 0 {
return errors.New("item type error, item id :" + strconv.Itoa(v.Id))
}
switch IType {
case item.ITEM_TYPE_ENERGY: // 能量
err := p.GetPlayerBaseMod().AddEnergy(p, v.Num)