Exemple #1
0
        public virtual void OnAfterTeamMemberDeath(PvPTeam team, PlayerMobile pm)
        {
            RefreshStats(pm, true, true);

            if (!TryKickOnDeath(team, pm, true) && !TryRespawnOnDeath(team, pm, true))
            {
                TeleportToHomeBase(team, pm);

                team.Respawn(pm, false);
            }
        }
Exemple #2
0
        public virtual void OnAfterTeamMemberDeath(PvPTeam team, PlayerMobile pm)
        {
            RefreshStats(pm, true, true);

            if (team.KickOnDeath)
            {
                OnLose(pm);
                team.RemoveMember(pm, true);
                return;
            }

            if (team.RespawnOnDeath)
            {
                Timer.DelayCall(team.RespawnDelay, () => team.Respawn(pm));
            }
        }
Exemple #3
0
        public virtual bool TryRespawnOnDeath(PvPTeam team, PlayerMobile pm, bool isDelayed)
        {
            if (team.RespawnOnDeath)
            {
                if (isDelayed && team.RespawnDelay > TimeSpan.Zero)
                {
                    Timer.DelayCall(team.RespawnDelay, team.Respawn, pm);
                }
                else
                {
                    team.Respawn(pm);
                }

                return(true);
            }

            return(false);
        }