parent
096d39609e
commit
8e9221bb5a
400 changed files with 3688 additions and 5969 deletions
|
|
@ -203,10 +203,8 @@ namespace Server.Engines.ConPVP
|
|||
public bool HasParticipant(Mobile mob)
|
||||
{
|
||||
for (int i = 0; i < Participants.Count; ++i)
|
||||
{
|
||||
if (Participants[i].Players.Contains(mob))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -369,10 +367,8 @@ namespace Server.Engines.ConPVP
|
|||
int rem = 0;
|
||||
|
||||
for (int i = 0; i < part.Context.Participants.Count; ++i)
|
||||
{
|
||||
if (part.Context.Participants[i]?.Eliminated == false)
|
||||
++rem;
|
||||
}
|
||||
|
||||
TourneyParticipant tp = part.TourneyPart;
|
||||
|
||||
|
|
@ -791,92 +787,92 @@ namespace Server.Engines.ConPVP
|
|||
continue;
|
||||
|
||||
for (int j = 0; j < part.Players.Count; ++j)
|
||||
part.Players[j].SendMessage("You have been disqualified from the tournament.");
|
||||
part.Players[j].SendMessage("You have been disqualified from the tournament.");
|
||||
|
||||
Undefeated.RemoveAt(i);
|
||||
Undefeated.RemoveAt(i);
|
||||
|
||||
if (Undefeated.Count == 1)
|
||||
if (Undefeated.Count == 1)
|
||||
{
|
||||
TourneyParticipant winner = Undefeated[0];
|
||||
|
||||
try
|
||||
{
|
||||
TourneyParticipant winner = Undefeated[0];
|
||||
|
||||
try
|
||||
if (EventController != null)
|
||||
{
|
||||
if (EventController != null)
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {EventController.GetTeamName(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner))} has won");
|
||||
}
|
||||
else if (TourneyType == TourneyType.RandomTeam)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
else if (TourneyType == TourneyType.Faction)
|
||||
{
|
||||
if (m_ParticipantsPerMatch == 4)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {EventController.GetTeamName(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner))} has won");
|
||||
}
|
||||
else if (TourneyType == TourneyType.RandomTeam)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
else if (TourneyType == TourneyType.Faction)
|
||||
{
|
||||
if (m_ParticipantsPerMatch == 4)
|
||||
{
|
||||
string name = "(null)";
|
||||
string name = "(null)";
|
||||
|
||||
switch (Pyramid.Levels[0].Matches[0]
|
||||
.Participants.IndexOf(winner))
|
||||
switch (Pyramid.Levels[0].Matches[0]
|
||||
.Participants.IndexOf(winner))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
name = "Minax";
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
name = "Council of Mages";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
name = "True Britannians";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
name = "Shadowlords";
|
||||
break;
|
||||
}
|
||||
name = "Minax";
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
name = "Council of Mages";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
name = "True Britannians";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
name = "Shadowlords";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Alert("The tournament has completed!", $"The {name} team has won!");
|
||||
}
|
||||
else if (m_ParticipantsPerMatch == 2)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"The {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Evil" : "Hero")} team has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
Alert("The tournament has completed!", $"The {name} team has won!");
|
||||
}
|
||||
else if (TourneyType == TourneyType.RedVsBlue)
|
||||
else if (m_ParticipantsPerMatch == 2)
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Red" : "Blue")} has won!");
|
||||
$"The {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Evil" : "Hero")} team has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"{winner.NameList} {(winner.Players.Count > 1 ? "are" : "is")} the champion{(winner.Players.Count == 1 ? "" : "s")}.");
|
||||
$"Team {Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) + 1} has won!");
|
||||
}
|
||||
}
|
||||
catch
|
||||
else if (TourneyType == TourneyType.RedVsBlue)
|
||||
{
|
||||
// ignored
|
||||
Alert("The tournament has completed!",
|
||||
$"Team {(Pyramid.Levels[0].Matches[0].Participants.IndexOf(winner) == 0 ? "Red" : "Blue")} has won!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("The tournament has completed!",
|
||||
$"{winner.NameList} {(winner.Players.Count > 1 ? "are" : "is")} the champion{(winner.Players.Count == 1 ? "" : "s")}.");
|
||||
}
|
||||
|
||||
GiveAwards();
|
||||
|
||||
CurrentStage = TournamentStage.Inactive;
|
||||
Undefeated.Clear();
|
||||
break;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
GiveAwards();
|
||||
|
||||
CurrentStage = TournamentStage.Inactive;
|
||||
Undefeated.Clear();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue