Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
25
Scripts/Services/LoyaltySystem/LoyaltyRating.cs
Normal file
25
Scripts/Services/LoyaltySystem/LoyaltyRating.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Server.ContextMenus;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class LoyaltyRating : ContextMenuEntry
|
||||
{
|
||||
private PlayerMobile m_From;
|
||||
|
||||
public LoyaltyRating(PlayerMobile from)
|
||||
: base(1049594)
|
||||
{
|
||||
m_From = from;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (m_From != null)
|
||||
{
|
||||
m_From.CloseGump(typeof(LoyaltyRatingGump));
|
||||
m_From.SendGump(new LoyaltyRatingGump(m_From));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Scripts/Services/LoyaltySystem/LoyaltyRatingGump.cs
Normal file
67
Scripts/Services/LoyaltySystem/LoyaltyRatingGump.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using System.Linq;
|
||||
using Server.Network;
|
||||
using Server.Engines.CityLoyalty;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class LoyaltyRatingGump : Gump
|
||||
{
|
||||
public LoyaltyRatingGump(PlayerMobile pm)
|
||||
: base(120, 120)
|
||||
{
|
||||
AddImage(0, 0, 8000);
|
||||
AddImage(20, 37, 8001);
|
||||
AddImage(20, 107, 8002);
|
||||
AddImage(20, 177, 8001);
|
||||
AddImage(20, 247, 8002);
|
||||
AddImage(20, 317, 8001);
|
||||
AddImage(20, 387, 8003);
|
||||
|
||||
AddHtmlLocalized(0, 8, 345, 20, 1152187, false, false); // <center>Loyalty Ratings</center>
|
||||
|
||||
int y = 40;
|
||||
|
||||
foreach (var sys in PointsSystem.Systems.Where(sys => sys.ShowOnLoyaltyGump))
|
||||
{
|
||||
if (sys.Name.Number > 0)
|
||||
AddHtmlLocalized(50, y, 150, 20, sys.Name.Number, false, false);
|
||||
else if (sys.Name.String != null)
|
||||
AddHtml(50, y, 150, 20, sys.Name.String, false, false);
|
||||
|
||||
TextDefinition title = sys.GetTitle(pm);
|
||||
|
||||
if (title != null)
|
||||
{
|
||||
if (title.Number > 0)
|
||||
AddHtmlLocalized(68, y + 20, 100, 20, title.Number, false, false);
|
||||
else if (title.String != null)
|
||||
AddHtml(68, y + 20, 100, 20, title.String, false, false);
|
||||
}
|
||||
|
||||
AddHtmlLocalized(175, y + 20, 100, 20, 1095171, ((int)sys.GetPoints(pm)).ToString(), 0, false, false); // (~1_AMT~ points)
|
||||
|
||||
y += 45;
|
||||
}
|
||||
|
||||
AddHtmlLocalized(50, 285, 150, 20, 1115129, pm.Fame.ToString(), 0, false, false); // Fame: ~1_AMT~
|
||||
AddHtmlLocalized(50, 305, 150, 20, 1115130, pm.Karma.ToString(), 0, false, false); // Karma: ~1_AMT~}
|
||||
|
||||
if (CityLoyaltySystem.Enabled && CityLoyaltySystem.Cities != null)
|
||||
{
|
||||
AddHtmlLocalized(60, 395, 150, 20, 1152190, false, false); // City Loyalty
|
||||
AddButton(40, 400, 2103, 2104, 1, GumpButtonType.Reply, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
PlayerMobile pm = state.Mobile as PlayerMobile;
|
||||
|
||||
if (CityLoyaltySystem.Enabled && CityLoyaltySystem.Cities != null && pm != null && info.ButtonID == 1)
|
||||
BaseGump.SendGump(new CityLoyaltyGump(pm));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user