コード例 #1
0
        public override void NPCLoot(NPC npc)
        {
            ExtendedItemHooks.FinishScanningForLootDropsAndThenRunHooks();

            if (npc.lastInteraction >= 0 && npc.lastInteraction < Main.player.Length)
            {
                this.NPCKilledByPlayer(npc);
            }
        }
コード例 #2
0
ファイル: MyMod.cs プロジェクト: hamstar0/tml-ruineditems-mod
        public override void PostSetupContent()
        {
            var config = RuinedItemsConfig.Instance;

            if (config.Get <float>(nameof(config.NPCLootItemRuinPercentChance)) > 0f)
            {
                ExtendedItemHooks.AddNPCLootHook(this.RuinLootDropsIf);
            }
        }
コード例 #3
0
        public override bool PreNPCLoot(NPC npc)
        {
            ExtendedItemHooks.BeginScanningForLootDrops(npc);

            return(base.PreNPCLoot(npc));
        }