Permalink
Browse files

Merge pull request #52 from zerodowned/master

EC Support Update
  • Loading branch information...
zerodowned committed Jul 20, 2016
2 parents f8c33a7 + c750725 commit 2f7c4a54d143dc3cb8c0159f762ebaf1d76ee9a2
Showing with 9,597 additions and 6,039 deletions.
  1. +2 −1 Scripts/Commands/HelpInfo.cs
  2. +46 −0 Scripts/Gumps/ConfirmReleaseDeadPetGump.cs
  3. +19 −17 Scripts/Gumps/ConfirmReleaseGump.cs
  4. +2 −0 Scripts/Gumps/Guilds/GuildAbbrvPrompt.cs
  5. +2 −0 Scripts/Gumps/Guilds/GuildCharterPrompt.cs
  6. +2 −0 Scripts/Gumps/Guilds/GuildDeclareWarPrompt.cs
  7. +2 −0 Scripts/Gumps/Guilds/GuildNamePrompt.cs
  8. +2 −0 Scripts/Gumps/Guilds/GuildTitlePrompt.cs
  9. +2 −0 Scripts/Gumps/Guilds/GuildWebsitePrompt.cs
  10. +1 −1 Scripts/Gumps/HeritageTokenGump.cs
  11. +49 −46 Scripts/Gumps/HouseDemolishGump.cs
  12. +174 −172 Scripts/Gumps/HouseGump.cs
  13. +293 −252 Scripts/Gumps/HouseGumpAOS.cs
  14. +20 −20 Scripts/Gumps/HouseTransferGump.cs
  15. +19 −18 Scripts/Gumps/NoticeGump.cs
  16. +25 −24 Scripts/Gumps/PetResurrectGump.cs
  17. +427 −438 Scripts/Gumps/PlayerVendorGumps.cs
  18. +144 −0 Scripts/Gumps/PolymorphGump.cs
  19. +3 −0 Scripts/Gumps/ReportMurderer.cs
  20. +56 −54 Scripts/Gumps/ResurrectGump.cs
  21. +505 −439 Scripts/Gumps/RunebookGump.cs
  22. +25 −25 Scripts/Gumps/SetSecureLevelGump.cs
  23. +48 −0 Scripts/Gumps/TithingGump.cs
  24. +20 −18 Scripts/Gumps/VendorInventoryGump.cs
  25. +182 −8 Scripts/Gumps/VendorRentalGumps.cs
  26. +2 −0 Scripts/Gumps/WhoGump.cs
  27. +29 −23 Scripts/Gumps/YoungGumps.cs
  28. +2 −2 Scripts/Items/- BaseClasses/BaseBoard.cs
  29. +4 −3 Scripts/Items/- BaseClasses/BasePiece.cs
  30. +4 −3 Scripts/Items/- BaseClasses/BaseWaterContainer.cs
  31. +18 −6 Scripts/Items/- Misc/Corpses/Corpse.cs
  32. +2 −2 Scripts/Items/- Misc/Gold.cs
  33. +2 −0 Scripts/Items/- Misc/Key.cs
  34. +2 −0 Scripts/Items/- Misc/PlayerBulletinBoards.cs
  35. +4 −3 Scripts/Items/- Misc/TrashBarrel.cs
  36. +4 −3 Scripts/Items/- Misc/TrashChest.cs
  37. +21 −3 Scripts/Items/Addons/BallotBox.cs
  38. +9 −4 Scripts/Items/Containers/Container.cs
  39. +4 −3 Scripts/Items/Containers/LockableContainer.cs
  40. +4 −3 Scripts/Items/Containers/MarkContainer.cs
  41. +3 −0 Scripts/Items/Guilds/GuildDeed.cs
  42. +2 −0 Scripts/Items/Skill Items/Magical/Misc/RecallRune.cs
  43. +178 −273 Scripts/Items/Special/8th Anniversary Items/FountainOfLife.cs
  44. +4 −3 Scripts/Items/Special/Evil Home Decor Collection/SacrificialAltar.cs
  45. +4 −3 Scripts/Items/Special/Mutation Core/PlagueBeastBackpack.cs
  46. +4 −2 Scripts/Items/Special/Mutation Core/PlagueBeastInnard.cs
  47. +106 −36 Scripts/Misc/BuffIcons.cs
  48. +7 −0 Scripts/Misc/CharacterCreation.cs
  49. +42 −0 Scripts/Misc/LoginStats.cs
  50. +126 −0 Scripts/Misc/RaceDefinitions.cs
  51. +1 −1 Scripts/Misc/ServerList.cs
  52. +8 −2 Scripts/Mobiles/AI/BaseAI.cs
  53. +245 −267 Scripts/Mobiles/Abilities/Abilities.cs
  54. +3 −3 Scripts/Mobiles/PlayerMobile.cs
  55. +2 −2 Scripts/Multis/Boats/Hold.cs
  56. +3,084 −2,797 Scripts/Multis/HouseFoundation.cs
  57. +49 −2 Scripts/Multis/PreviewHouse.cs
  58. +3 −2 Scripts/Quests/- Misc/FoolishGold.cs
  59. +4 −2 Scripts/Quests/Prism of Light/PrismOfLightAdmissionTicket.cs
  60. +4 −2 Scripts/Quests/Trammel/Unfading Memories/Items/PrismaticAmber.cs
  61. +4 −2 Scripts/Services/Quests/Core/Items/QuestItem.cs
  62. +1 −1 Scripts/Services/Toolbar/Core/ToolbarCore.cs
  63. +21 −4 Scripts/Services/Toolbar/Gumps/Toolbar.cs
  64. +1 −1 Scripts/Services/Toolbar/Gumps/ToolbarEdit.cs
  65. +4 −2 Scripts/Services/XMLSpawner/XMLSpawner Extras/XmlPoints/ChallengeGames/CTF.cs
  66. +4 −2 Scripts/Services/XMLSpawner/XMLSpawner Extras/XmlSockets/BaseTransmutationContainer.cs
  67. +3 −1 Scripts/Services/XMLSpawner/XmlSpawner Core/XmlQuest/XmlQuestHolder.cs
  68. +3 −1 Scripts/Services/XMLSpawner/XmlSpawner Core/XmlQuest/XmlQuestToken.cs
  69. +2 −2 Scripts/Spells/Gargoyle/SpellDefinitions/FlySpell.cs
  70. BIN Scripts/Users - Shortcut.lnk
  71. +26 −14 Server/ClientVersion.cs
  72. +8 −8 Server/Effects.cs
  73. +346 −133 Server/EventSink.cs
  74. +239 −222 Server/Gumps/Gump.cs
  75. +2 −12 Server/Gumps/GumpButton.cs
  76. +222 −0 Server/Gumps/GumpButtonTileArt.cs
  77. +27 −64 Server/Gumps/GumpEntry.cs
  78. +14 −3 Server/Gumps/GumpHtml.cs
  79. +38 −44 Server/Gumps/GumpHtmlLocalized.cs
  80. +2 −1 Server/Gumps/GumpImage.cs
  81. +2 −1 Server/Gumps/GumpItem.cs
  82. +3 −4 Server/Gumps/GumpItemProperty.cs
  83. +11 −3 Server/Gumps/GumpLabel.cs
  84. +14 −3 Server/Gumps/GumpTextEntry.cs
  85. +58 −29 Server/Gumps/GumpTextEntryLimited.cs
  86. +28 −4 Server/Gumps/GumpTooltip.cs
  87. +129 −0 Server/Gumps/KRGumpButton.cs
  88. +199 −0 Server/Gumps/KRGumpHtmlLocalized.cs
  89. +70 −0 Server/Gumps/KRGumpImage.cs
  90. +127 −0 Server/Gumps/KRGumpLabel.cs
  91. +79 −80 Server/Gumps/RelayInfo.cs
  92. +58 −17 Server/Item.cs
  93. +10 −5 Server/Items/BaseMulti.cs
  94. +85 −7 Server/Items/Container.cs
  95. +6 −5 Server/Items/Containers.cs
  96. +61 −0 Server/Items/VirtualHair.cs
  97. +300 −53 Server/Mobile.cs
  98. +84 −86 Server/MultiData.cs
  99. +26 −2 Server/Network/MessagePump.cs
  100. +17 −0 Server/Network/NetState.cs
  101. +378 −108 Server/Network/PacketHandlers.cs
  102. +430 −42 Server/Network/Packets.cs
  103. +63 −1 Server/Prompt.cs
  104. +74 −0 Server/PromptExtensions.cs
  105. +20 −0 Server/Race.cs
  106. +22 −1 Server/Region.cs
  107. +125 −0 Server/Season.cs
  108. +8 −1 Server/Server.csproj
  109. +56 −79 Server/TileMatrix.cs
  110. +26 −2 Server/Utility.cs
  111. +1 −1 startup.xml
@@ -272,7 +272,7 @@ public CommandListGump(int page, Mobile from, List<CommandInfo> list)

int last = (int)AccessLevel.Player - 1;

for (int i = m_Page * EntriesPerPage, line = 0; line < EntriesPerPage && i < m_List.Count; ++i, ++line)
for (int i = m_Page * EntriesPerPage, line = 0, extra = 0; line < EntriesPerPage && i < m_List.Count; ++i, ++line)
{
CommandInfo c = m_List[i];
if (from.AccessLevel >= c.AccessLevel)
@@ -284,6 +284,7 @@ public CommandListGump(int page, Mobile from, List<CommandInfo> list)
AddEntryHtml(20 + OffsetSize + 160, Color(c.AccessLevel.ToString(), 0xFF0000));
AddEntryHeader(20);
line++;
extra++;
}

last = (int)c.AccessLevel;
@@ -0,0 +1,46 @@
using System;
using Server;
using Server.Mobiles;
using Server.Network;

namespace Server.Gumps
{
public class ConfirmReleaseDeadPetGump : Gump
{
public override int TypeID { get { return 0x259; } }

private Mobile m_From;
private BaseCreature m_Pet;

public ConfirmReleaseDeadPetGump( Mobile from, BaseCreature pet )
: base( 50, 50 )
{
m_From = from;
m_Pet = pet;

m_From.CloseGump( typeof( ConfirmReleaseDeadPetGump ) );

AddBackground( 0, 0, 270, 120, 0x13BE );

AddHtmlLocalized( 10, 10, 250, 75, 1049669, true, false ); // <div align=center>Releasing a ghost pet will destroy it, with no chance of recovery. Do you wish to continue?</div>

AddHtmlLocalized( 55, 90, 75, 20, 1011011, false, false ); // CONTINUE
AddButton( 20, 90, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );

AddHtmlLocalized( 170, 90, 75, 20, 1011012, false, false ); // CANCEL
AddButton( 135, 90, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
}

public override void OnResponse( NetState sender, RelayInfo info )
{
if ( info.ButtonID == 2 )
{
if ( !m_Pet.Deleted && m_Pet.Controlled && m_From == m_Pet.ControlMaster && m_From.CheckAlive() )
{
if ( m_Pet.Map == m_From.Map && m_Pet.InRange( m_From, 14 ) )
m_Pet.Delete();
}
}
}
}
}
@@ -1,44 +1,46 @@
using System;
using Server.Mobiles;
using Server.Network;

namespace Server.Gumps
{
public class ConfirmReleaseGump : Gump
{
public override int TypeID { get { return 0x259; } }

private readonly Mobile m_From;
private readonly BaseCreature m_Pet;

public ConfirmReleaseGump(Mobile from, BaseCreature pet)
: base(50, 50)
{
this.m_From = from;
this.m_Pet = pet;

this.m_From.CloseGump(typeof(ConfirmReleaseGump));
m_From = from;
m_Pet = pet;

this.AddPage(0);
m_From.CloseGump(typeof(ConfirmReleaseGump));

this.AddBackground(0, 0, 270, 120, 5054);
this.AddBackground(10, 10, 250, 100, 3000);
AddBackground(0, 0, 270, 120, 5054);
AddBackground(10, 10, 250, 100, 3000);

this.AddHtmlLocalized(20, 15, 230, 60, 1046257, true, true); // Are you sure you want to release your pet?
AddHtmlLocalized(20, 15, 230, 60, 1046257, true, true); // Are you sure you want to release your pet?

this.AddButton(20, 80, 4005, 4007, 2, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(55, 80, 75, 20, 1011011, false, false); // CONTINUE
AddHtmlLocalized(55, 80, 75, 20, 1011011, false, false); // CONTINUE
AddButton(20, 80, 4005, 4007, 2, GumpButtonType.Reply, 0);

this.AddButton(135, 80, 4005, 4007, 1, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(170, 80, 75, 20, 1011012, false, false); // CANCEL
AddHtmlLocalized(170, 80, 75, 20, 1011012, false, false); // CANCEL
AddButton(135, 80, 4005, 4007, 1, GumpButtonType.Reply, 0);
}

public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
public override void OnResponse(NetState sender, RelayInfo info)
{
if (info.ButtonID == 2)
{
if (!this.m_Pet.Deleted && this.m_Pet.Controlled && this.m_From == this.m_Pet.ControlMaster && this.m_From.CheckAlive() /*&& m_Pet.CheckControlChance( m_From )*/)
if (!m_Pet.Deleted && m_Pet.Controlled && m_From == m_Pet.ControlMaster && m_From.CheckAlive())
{
if (this.m_Pet.Map == this.m_From.Map && this.m_Pet.InRange(this.m_From, 14))
if (m_Pet.Map == m_From.Map && m_Pet.InRange(this.m_From, 14))
{
this.m_Pet.ControlTarget = null;
this.m_Pet.ControlOrder = OrderType.Release;
m_Pet.ControlTarget = null;
m_Pet.ControlOrder = OrderType.Release;
}
}
}
@@ -6,6 +6,8 @@ namespace Server.Gumps
{
public class GuildAbbrvPrompt : Prompt
{
// Enter new guild abbreviation (3 characters max):
public override int MessageCliloc { get { return 1013061; } }
private readonly Mobile m_Mobile;
private readonly Guild m_Guild;
public GuildAbbrvPrompt(Mobile m, Guild g)
@@ -6,6 +6,8 @@ namespace Server.Gumps
{
public class GuildCharterPrompt : Prompt
{
// Enter the new guild charter (50 characters max):
public override int MessageCliloc { get { return 1013071; } }
private readonly Mobile m_Mobile;
private readonly Guild m_Guild;
public GuildCharterPrompt(Mobile m, Guild g)
@@ -7,6 +7,8 @@ namespace Server.Gumps
{
public class GuildDeclareWarPrompt : Prompt
{
// Declare war through search - Enter Guild Name:
public override int MessageCliloc { get { return 1018001; } }
private readonly Mobile m_Mobile;
private readonly Guild m_Guild;
public GuildDeclareWarPrompt(Mobile m, Guild g)
@@ -6,6 +6,8 @@ namespace Server.Gumps
{
public class GuildNamePrompt : Prompt
{
// Enter new guild name (40 characters max):
public override int MessageCliloc { get { return 1013060; } }
private readonly Mobile m_Mobile;
private readonly Guild m_Guild;
public GuildNamePrompt(Mobile m, Guild g)
@@ -6,6 +6,8 @@ namespace Server.Gumps
{
public class GuildTitlePrompt : Prompt
{
// Enter the new title for this guild member or 'none' to remove a title:
public override int MessageCliloc { get { return 1011128; } }
private readonly Mobile m_Leader;
private readonly Mobile m_Target;
private readonly Guild m_Guild;
@@ -6,6 +6,8 @@ namespace Server.Gumps
{
public class GuildWebsitePrompt : Prompt
{
// Enter the new website for the guild (50 characters max):
public override int MessageCliloc { get { return 1013072; } }
private readonly Mobile m_Mobile;
private readonly Guild m_Guild;
public GuildWebsitePrompt(Mobile m, Guild g)
@@ -318,7 +318,7 @@ public override void OnResponse(NetState sender, RelayInfo info)
cliloc = 1075196;
break;
case 0x6E:
types.Add(typeof(FountainOfLifeDeed));
types.Add(typeof(FountainOfLife));
cliloc = 1075197;
break;
case 0x6F:
@@ -9,107 +9,110 @@ namespace Server.Gumps
{
public class HouseDemolishGump : Gump
{
public override int TypeID { get { return 0x9E6; } }

private readonly Mobile m_Mobile;
private readonly BaseHouse m_House;

public HouseDemolishGump(Mobile mobile, BaseHouse house)
: base(110, 100)
{
this.m_Mobile = mobile;
this.m_House = house;
m_Mobile = mobile;
m_House = house;

mobile.CloseGump(typeof(HouseDemolishGump));

this.Closable = false;
Closable = false;

this.AddPage(0);
AddPage(0);

this.AddBackground(0, 0, 420, 280, 5054);
AddBackground(0, 0, 420, 280, 5054);

this.AddImageTiled(10, 10, 400, 20, 2624);
this.AddAlphaRegion(10, 10, 400, 20);
AddImageTiled(10, 10, 400, 20, 2624);
AddAlphaRegion(10, 10, 400, 20);

this.AddHtmlLocalized(10, 10, 400, 20, 1060635, 30720, false, false); // <CENTER>WARNING</CENTER>
AddHtmlLocalized(10, 10, 400, 20, 1060635, 30720, false, false); // <CENTER>WARNING</CENTER>

this.AddImageTiled(10, 40, 400, 200, 2624);
this.AddAlphaRegion(10, 40, 400, 200);
AddImageTiled(10, 40, 400, 200, 2624);
AddAlphaRegion(10, 40, 400, 200);

this.AddHtmlLocalized(10, 40, 400, 200, 1061795, 32512, false, true); /* You are about to demolish your house.
AddHtmlLocalized(10, 40, 400, 200, 1061795, 32512, false, true); /* You are about to demolish your house.
* You will be refunded the house's value directly to your bank box.
* All items in the house will remain behind and can be freely picked up by anyone.
* Once the house is demolished, anyone can attempt to place a new house on the vacant land.
* This action will not un-condemn any other houses on your account, nor will it end your 7-day waiting period (if it applies to you).
* Are you sure you wish to continue?
*/

this.AddImageTiled(10, 250, 400, 20, 2624);
this.AddAlphaRegion(10, 250, 400, 20);
AddImageTiled(10, 250, 400, 20, 2624);
AddAlphaRegion(10, 250, 400, 20);

this.AddButton(10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(40, 250, 170, 20, 1011036, 32767, false, false); // OKAY
AddButton(10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(40, 250, 170, 20, 1011036, 32767, false, false); // OKAY

this.AddButton(210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(240, 250, 170, 20, 1011012, 32767, false, false); // CANCEL
AddButton(210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0);
AddHtmlLocalized(240, 250, 170, 20, 1011012, 32767, false, false); // CANCEL
}

public override void OnResponse(NetState state, RelayInfo info)
{
if (info.ButtonID == 1 && !this.m_House.Deleted)
if (info.ButtonID == 1 && !m_House.Deleted)
{
if (this.m_House.IsOwner(this.m_Mobile))
if (m_House.IsOwner(m_Mobile))
{
if (this.m_House.MovingCrate != null || this.m_House.InternalizedVendors.Count > 0)
if (m_House.MovingCrate != null || m_House.InternalizedVendors.Count > 0)
{
return;
}
else if (!Guilds.Guild.NewGuildSystem && this.m_House.FindGuildstone() != null)
else if (!Guilds.Guild.NewGuildSystem && m_House.FindGuildstone() != null)
{
this.m_Mobile.SendLocalizedMessage(501389); // You cannot redeed a house with a guildstone inside.
m_Mobile.SendLocalizedMessage(501389); // You cannot redeed a house with a guildstone inside.
return;
}
/*else if ( m_House.PlayerVendors.Count > 0 )
{
m_Mobile.SendLocalizedMessage( 503236 ); // You need to collect your vendor's belongings before moving.
return;
}*/
else if (this.m_House.HasRentedVendors && this.m_House.VendorInventories.Count > 0)
else if (m_House.HasRentedVendors && m_House.VendorInventories.Count > 0)
{
this.m_Mobile.SendLocalizedMessage(1062679); // You cannot do that that while you still have contract vendors or unclaimed contract vendor inventory in your house.
m_Mobile.SendLocalizedMessage(1062679); // You cannot do that that while you still have contract vendors or unclaimed contract vendor inventory in your house.
return;
}
else if (this.m_House.HasRentedVendors)
else if (m_House.HasRentedVendors)
{
this.m_Mobile.SendLocalizedMessage(1062680); // You cannot do that that while you still have contract vendors in your house.
m_Mobile.SendLocalizedMessage(1062680); // You cannot do that that while you still have contract vendors in your house.
return;
}
else if (this.m_House.VendorInventories.Count > 0)
else if (m_House.VendorInventories.Count > 0)
{
this.m_Mobile.SendLocalizedMessage(1062681); // You cannot do that that while you still have unclaimed contract vendor inventory in your house.
m_Mobile.SendLocalizedMessage(1062681); // You cannot do that that while you still have unclaimed contract vendor inventory in your house.
return;
}

if (this.m_Mobile.AccessLevel >= AccessLevel.GameMaster)
if (m_Mobile.AccessLevel >= AccessLevel.GameMaster)
{
this.m_Mobile.SendMessage("You do not get a refund for your house as you are not a player");
this.m_House.RemoveKeys(this.m_Mobile);
this.m_House.Delete();
m_Mobile.SendMessage("You do not get a refund for your house as you are not a player");
m_House.RemoveKeys(m_Mobile);
m_House.Delete();
}
else
{
Item toGive;

if (this.m_House.IsAosRules)
if (m_House.IsAosRules)
{
if (this.m_House.Price > 0)
toGive = new BankCheck(this.m_House.Price);
if (m_House.Price > 0)
toGive = new BankCheck(m_House.Price);
else
toGive = this.m_House.GetDeed();
toGive = m_House.GetDeed();
}
else
{
toGive = this.m_House.GetDeed();
toGive = m_House.GetDeed();

if (toGive == null && this.m_House.Price > 0)
toGive = new BankCheck(this.m_House.Price);
if (toGive == null && m_House.Price > 0)
toGive = new BankCheck(m_House.Price);
}
if (AccountGold.Enabled && toGive is BankCheck)
{
@@ -132,29 +135,29 @@ public override void OnResponse(NetState state, RelayInfo info)
{
var box = m_Mobile.BankBox;

if (box.TryDropItem(this.m_Mobile, toGive, false))
if (box.TryDropItem(m_Mobile, toGive, false))
{
if (toGive is BankCheck)
this.m_Mobile.SendLocalizedMessage(1060397, ((BankCheck)toGive).Worth.ToString("#,0")); // ~1_AMOUNT~ gold has been deposited into your bank box.
m_Mobile.SendLocalizedMessage(1060397, ((BankCheck)toGive).Worth.ToString("#,0")); // ~1_AMOUNT~ gold has been deposited into your bank box.

this.m_House.RemoveKeys(this.m_Mobile);
this.m_House.Delete();
m_House.RemoveKeys(m_Mobile);
m_House.Delete();
}
else
{
toGive.Delete();
this.m_Mobile.SendLocalizedMessage(500390); // Your bank box is full.
m_Mobile.SendLocalizedMessage(500390); // Your bank box is full.
}
}
else
{
this.m_Mobile.SendMessage("Unable to refund house.");
m_Mobile.SendMessage("Unable to refund house.");
}
}
}
else
{
this.m_Mobile.SendLocalizedMessage(501320); // Only the house owner may do this.
m_Mobile.SendLocalizedMessage(501320); // Only the house owner may do this.
}
}
}
Oops, something went wrong.

0 comments on commit 2f7c4a5

Please sign in to comment.