Пример #1
0
        ////////////////

        /// @private
        void ILoadable.OnModsLoad()
        {
            LoadHooks.AddPostContentLoadHook(() => {
                this.BannerItemTypesToNpcTypes = new Dictionary <int, ISet <int> >();
                this.NpcTypesToBannerItemTypes = NPCBannerLibraries.GetNpcToBannerItemTypes();

                foreach (var kv in this.NpcTypesToBannerItemTypes)
                {
                    if (!this.BannerItemTypesToNpcTypes.ContainsKey(kv.Value))
                    {
                        this.BannerItemTypesToNpcTypes[kv.Value] = new HashSet <int>();
                    }
                    this.BannerItemTypesToNpcTypes[kv.Value].Add(kv.Key);
                }

                this.BannerItemTypes = new HashSet <int>(this.BannerItemTypesToNpcTypes.Keys);
            });
        }