优化
This commit is contained in:
parent
cca8a27f9a
commit
35499f2177
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user