// Things like townNPC and I think traps will trigger this in Server. In SP, all is done here.
        public override void OnHitByProjectile(NPC npc, Projectile projectile, int damage, float knockback, bool crit)
        {
            //TODO, owner could be -1?
            try
            {
                //System.Console.WriteLine("OnHitByProjectile " + projectile.owner);

                NPC damagedNPC = npc;
                if (npc.realLife >= 0)
                {
                    damagedNPC = Main.npc[damagedNPC.realLife];
                }
                DPSExtremeGlobalNPC info = damagedNPC.GetGlobalNPC <DPSExtremeGlobalNPC>();
                info.damageDone[projectile.owner] += damage;
                if (info.onDeathBed)
                {
                    info.SendStats(damagedNPC);
                    info.onDeathBed = false;
                }

                //damageDone[projectile.owner] += damage;
                //if (onDeathBed)
                //{
                //	SendStats(npc);
                //}
            }
            catch (Exception e)
            {
                //ErrorLogger.Log("OnHitByProjectile" + e.Message);
            }
        }
        // Things like townNPC and I think traps will trigger this in Server. In SP, all is done here.
        public override void OnHitByItem(NPC npc, Player player, Item item, int damage, float knockback, bool crit)
        {
            try
            {
                //System.Console.WriteLine("OnHitByItem " + player.whoAmI);

                NPC damagedNPC = npc;
                if (npc.realLife >= 0)
                {
                    damagedNPC = Main.npc[damagedNPC.realLife];
                }
                DPSExtremeGlobalNPC info = damagedNPC.GetGlobalNPC <DPSExtremeGlobalNPC>();
                info.damageDone[player.whoAmI] += damage;
                if (info.onDeathBed)                 // oh wait, is this the same as .active in this case? probably not.
                {
                    info.SendStats(damagedNPC);
                    info.onDeathBed = false;                     // multiple things can hit while on deathbed.
                }

                //damageDone[player.whoAmI] += damage;
                //if (onDeathBed)
                //{
                //	SendStats(npc);
                //}
            }
            catch (Exception e)
            {
                //ErrorLogger.Log("OnHitByItem" + e.Message);
            }
        }