private void OnStruckNpcKilled(object sender, StruckNpcKilledEventArgs args)
        {
            //Debug.Print("OnStruckNpcKilled!");

            var reward = new KillingReward(args.PlayerStrikeInfo, args.NpcGivenOrTypeName, args.NpcHitPoints, args.NpcSpawnedFromStatue);

            RewardDistributor.EnqueueReward(reward);
        }
Example #2
0
        public void OnNpcKilled(NPC npc, int spawnHp)
        {
            var npcIndex = npc.whoAmI;

            if (npcStrikes.TryGetValue(npcIndex, out var strikes))
            {
                //npcStrikes.Remove(npcIndex);
                npcStrikes.TryRemove(npcIndex, out var psi);
                if (StruckNpcKilled != null)
                {
                    var args = new StruckNpcKilledEventArgs(npc, spawnHp, strikes);
                    StruckNpcKilled(this, args);
                }
            }
        }