예제 #1
0
        static ItemAsset.ItemObject GetCanEatItemFromPackage(PeEntity entity, int[] eatIds)
        {
            if (entity.UseItem == null)
            {
                return(null);
            }

            ItemAsset.ItemObject item = null;
            if (eatIds != null && eatIds.Length > 0)
            {
                for (int i = 0; i < eatIds.Length; i++)
                {
                    item = entity.GetBagItemObj(eatIds[i]);
                    if (item != null)
                    {
                        break;
                    }
                }
            }
            return(item);
        }