public void UseItem(BaseCharacterEntity characterEntity, short itemIndex, CharacterItem characterItem) { if (!characterEntity.CanUseItem() || characterItem.level <= 0 || !characterEntity.DecreaseItemsByIndex(itemIndex, 1)) { return; } characterEntity.FillEmptySlots(); characterEntity.ApplyBuff(DataId, BuffType.PotionBuff, characterItem.level, characterEntity.GetInfo()); characterEntity.RewardExp(new Reward() { exp = Exp }, 1, RewardGivenType.None); }