示例#1
0
        ////////////////

        public override void Kill(double damage, int hitDirection, bool pvp, PlayerDeathReason damageSource)
        {
            if (this.player.whoAmI != Main.myPlayer)
            {
                return;
            }

            if (pvp)
            {
                this.Logic.PvpDeaths++;
            }
            this.Logic.TotalDeaths++;

            if (Main.netMode == 1 && this.player.whoAmI == Main.myPlayer)
            {
                PlayerStatisticsPlayer.AddKillForPlayer(damageSource.SourcePlayerIndex);
                SyncStatsProtocol.SendToAll(this.player, damageSource.SourcePlayerIndex);
            }
        }
        ////////////////

        internal void SetStats(int killerWho, int pvpKills, int pvpDeaths, int totalDeaths, string progress, int progressAmount)
        {
            this.Logic.SetStats(pvpKills, pvpDeaths, totalDeaths, progress, progressAmount);
            PlayerStatisticsPlayer.AddKillForPlayer(killerWho);
        }