This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
|
|
@ -71,13 +70,17 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
CTFTeamInfo teamInfo = game.Controller.TeamInfo[i % 8];
|
||||
|
||||
if (teamInfo?.Flag != null)
|
||||
entries.Add(teamInfo);
|
||||
if (teamInfo?.Flag == null)
|
||||
continue;
|
||||
|
||||
entries.Add(teamInfo);
|
||||
}
|
||||
else
|
||||
entries.AddRange(section.Players.Values.Where(player => player.Score > 0));
|
||||
foreach (CTFPlayerInfo player in section.Players.Values)
|
||||
if (player.Score > 0)
|
||||
entries.Add(player);
|
||||
|
||||
entries.Sort((a, b) => b.Score - a.Score);
|
||||
entries.Sort(delegate(IRankedCTF a, IRankedCTF b) { return b.Score - a.Score; });
|
||||
|
||||
int height = 0;
|
||||
|
||||
|
|
@ -108,8 +111,7 @@ namespace Server.Engines.ConPVP
|
|||
if (section == null)
|
||||
for (int i = 0; i < entries.Count; ++i)
|
||||
{
|
||||
if (!(entries[i] is CTFTeamInfo teamInfo))
|
||||
continue;
|
||||
CTFTeamInfo teamInfo = entries[i] as CTFTeamInfo;
|
||||
|
||||
AddImage(30, 70 + i * 75, 10152);
|
||||
AddImage(30, 85 + i * 75, 10151);
|
||||
|
|
@ -192,7 +194,10 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private void AddColoredText(int x, int y, int width, int height, string text, int color)
|
||||
{
|
||||
AddHtml(x, y, width, height, color == 0 ? text : Color(text, color));
|
||||
if (color == 0)
|
||||
AddHtml(x, y, width, height, text);
|
||||
else
|
||||
AddHtml(x, y, width, height, Color(text, color));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -241,8 +246,10 @@ namespace Server.Engines.ConPVP
|
|||
else if (ourTeam == useTeam)
|
||||
{
|
||||
if (Location == m_TeamInfo.Origin && Map == m_TeamInfo.Game.Facet)
|
||||
Packets.SendUnicodeMessage(from.NetState, Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", Name,
|
||||
"Touch me not for I am chaste.");
|
||||
{
|
||||
from.Send(new UnicodeMessage(Serial, ItemID, MessageType.Regular, 0x3B2, 3, "ENU", Name,
|
||||
"Touch me not for I am chaste."));
|
||||
}
|
||||
else
|
||||
{
|
||||
CTFPlayerInfo playerInfo = useTeam[from];
|
||||
|
|
@ -299,7 +306,9 @@ namespace Server.Engines.ConPVP
|
|||
m_ReturnCount = Math.Min(m_ReturnCount, 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendHome();
|
||||
}
|
||||
}
|
||||
|
||||
private void StopCountdown()
|
||||
|
|
@ -408,7 +417,9 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x26, false, "Those are not my cookies.");
|
||||
}
|
||||
}
|
||||
else if (obj is Mobile passTo)
|
||||
{
|
||||
|
|
@ -932,8 +943,15 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (ourFlagCarrier != null && GetTeamInfo(ourFlagCarrier) == teamInfo)
|
||||
{
|
||||
if (ourFlagCarrier.Aggressors.Any(t => t.Defender == ourFlagCarrier && t.Attacker == mob))
|
||||
for (int j = 0; j < ourFlagCarrier.Aggressors.Count; ++j)
|
||||
{
|
||||
if (!(ourFlagCarrier.Aggressors[j] is AggressorInfo aggr) ||
|
||||
aggr.Defender != ourFlagCarrier || aggr.Attacker != mob)
|
||||
continue;
|
||||
|
||||
playerInfo.Score += 2; // helped defend guy capturing enemy flag
|
||||
break;
|
||||
}
|
||||
|
||||
if (mob.Map == ourFlagCarrier.Map && ourFlagCarrier.InRange(mob, 12))
|
||||
playerInfo.Score += 1; // helped defend guy capturing enemy flag
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue