Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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);
                }
            }
        }