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); } }
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)); } }
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); }