Beispiel #1
0
        private static List <ItemDrop.ItemData> GetDropListItems(DropTable dropTable)
        {
            try
            {
                var context = DropLinkCache.GetLink(dropTable);

                var dropTemplates = DropConfigManager.GetPossibleDrops(context, dropTable);

#if DEBUG
                Log.LogDebug("Potential drops: " + dropTemplates.Count);
                foreach (var drop in dropTemplates)
                {
                    Log.LogDebug("\t" + drop.Drop.m_item.name);
                }
#endif

                if (dropTemplates.Count == 0)
                {
                    return(new(0));
                }

                return(DropTableManager.GetItemDrops(dropTable, context));
            }
            catch (Exception e)
            {
                Log.LogError("Error during calculation of item drops", e);
                return(new(0));
            }
        }
Beispiel #2
0
        private static List <GameObject> GetDropList(DropTable dropTable, int dropCount)
        {
            try
            {
                var context = DropLinkCache.GetLink(dropTable);

                var dropTemplates = DropConfigManager.GetPossibleDrops(context, dropTable);

                if (dropTemplates.Count == 0)
                {
                    return(new(0));
                }

                return(DropTableManager.GetDrops(dropTable, context));
            }
            catch (Exception e)
            {
                Log.LogError("Error during calculation of item drops", e);
                return(new(0));
            }
        }
Beispiel #3
0
 private static bool UseOriginal(DropTable dropTable)
 {
     return(DropLinkCache.GetLink(dropTable)?.EntityConfig is null);
 }