Modernization Fixes & Updates to Default Values (#3)
This commit is contained in:
parent
445eddff68
commit
dcf64091b1
768 changed files with 10507 additions and 14196 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Accounting;
|
||||
using Server.ContextMenus;
|
||||
|
|
@ -615,7 +614,7 @@ namespace Server.Mobiles
|
|||
m_Maker.Delete();
|
||||
statue.Sculpt(from);
|
||||
|
||||
from.CloseGump(typeof(CharacterStatueGump));
|
||||
from.CloseGump<CharacterStatueGump>();
|
||||
from.SendGump(new CharacterStatueGump(m_Maker, statue, from));
|
||||
}
|
||||
else if (result == AddonFitResult.Blocked)
|
||||
|
|
@ -640,7 +639,7 @@ namespace Server.Mobiles
|
|||
|
||||
public static AddonFitResult CouldFit(Point3D p, Map map, Mobile from, ref BaseHouse house)
|
||||
{
|
||||
if (!map.CanFit(p.X, p.Y, p.Z, 20, true, true, true))
|
||||
if (!map.CanFit(p.X, p.Y, p.Z, 20, true))
|
||||
return AddonFitResult.Blocked;
|
||||
if (!BaseAddon.CheckHouse(from, p, map, 20, ref house))
|
||||
return AddonFitResult.NotInHouse;
|
||||
|
|
@ -650,11 +649,11 @@ namespace Server.Mobiles
|
|||
|
||||
public static AddonFitResult CheckDoors(Point3D p, int height, BaseHouse house)
|
||||
{
|
||||
ArrayList doors = house.Doors;
|
||||
List<BaseDoor> doors = house.Doors;
|
||||
|
||||
for (int i = 0; i < doors.Count; i++)
|
||||
{
|
||||
BaseDoor door = doors[i] as BaseDoor;
|
||||
BaseDoor door = doors[i];
|
||||
|
||||
Point3D doorLoc = door.GetWorldLocation();
|
||||
int doorHeight = door.ItemData.CalcHeight;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ namespace Server.Items
|
|||
{
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace Server.Gumps
|
|||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Engines.VeteranRewards
|
|||
{
|
||||
m_From = from;
|
||||
|
||||
from.CloseGump(typeof(RewardChoiceGump));
|
||||
from.CloseGump<RewardChoiceGump>();
|
||||
|
||||
RenderBackground();
|
||||
RenderCategories();
|
||||
|
|
@ -59,9 +59,7 @@ namespace Server.Engines.VeteranRewards
|
|||
"To read more about these rewards before making a selection, feel free to visit the uo.com site at " +
|
||||
"<A HREF=\"http://www.uo.com/rewards\">http://www.uo.com/rewards</A>.", true, true);
|
||||
|
||||
int cur, max;
|
||||
|
||||
RewardSystem.ComputeRewardInfo(m_From, out cur, out max);
|
||||
RewardSystem.ComputeRewardInfo(m_From, out int cur, out int max);
|
||||
|
||||
AddHtmlLocalized(60, 105, 300, 35, 1006006, false, false); // Your current total of rewards to choose:
|
||||
AddLabel(370, 107, 50, (max - cur).ToString());
|
||||
|
|
@ -100,9 +98,9 @@ namespace Server.Engines.VeteranRewards
|
|||
private int PagesPerCategory(RewardCategory category)
|
||||
{
|
||||
List<RewardEntry> entries = category.Entries;
|
||||
int j = 0, i = 0;
|
||||
int i = 0;
|
||||
|
||||
for (j = 0; j < entries.Count; j++)
|
||||
for (int j = 0; j < entries.Count; j++)
|
||||
if (RewardSystem.HasAccess(m_From, entries[j]))
|
||||
i++;
|
||||
|
||||
|
|
@ -160,9 +158,7 @@ namespace Server.Engines.VeteranRewards
|
|||
|
||||
if (buttonID == 0)
|
||||
{
|
||||
int cur, max;
|
||||
|
||||
RewardSystem.ComputeRewardInfo(m_From, out cur, out max);
|
||||
RewardSystem.ComputeRewardInfo(m_From, out int cur, out int max);
|
||||
|
||||
if (cur < max)
|
||||
m_From.SendGump(new RewardNoticeGump(m_From));
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Engines.VeteranRewards
|
|||
m_From = from;
|
||||
m_Entry = entry;
|
||||
|
||||
from.CloseGump(typeof(RewardConfirmGump));
|
||||
from.CloseGump<RewardConfirmGump>();
|
||||
|
||||
AddPage(0);
|
||||
|
||||
|
|
@ -61,9 +61,7 @@ namespace Server.Engines.VeteranRewards
|
|||
}
|
||||
}
|
||||
|
||||
int cur, max;
|
||||
|
||||
RewardSystem.ComputeRewardInfo(m_From, out cur, out max);
|
||||
RewardSystem.ComputeRewardInfo(m_From, out int cur, out int max);
|
||||
|
||||
if (cur < max)
|
||||
m_From.SendGump(new RewardNoticeGump(m_From));
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Gumps
|
|||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddBackground(0, 0, 220, 170, 0x13BE);
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ namespace Server.Engines.VeteranRewards
|
|||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Engines.VeteranRewards
|
|||
{
|
||||
m_From = from;
|
||||
|
||||
from.CloseGump(typeof(RewardNoticeGump));
|
||||
from.CloseGump<RewardNoticeGump>();
|
||||
|
||||
AddPage(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ namespace Server.Engines.VeteranRewards
|
|||
|
||||
public static bool HasAccess(Mobile mob, RewardEntry entry)
|
||||
{
|
||||
if (Core.Expansion < entry.RequiredExpansion) return false;
|
||||
if (Core.Expansion < entry.RequiredExpansion)
|
||||
return false;
|
||||
|
||||
TimeSpan ts;
|
||||
return HasAccess(mob, entry.List, out ts);
|
||||
return HasAccess(mob, entry.List, out TimeSpan _);
|
||||
}
|
||||
|
||||
public static bool HasAccess(Mobile mob, RewardList list, out TimeSpan ts)
|
||||
|
|
@ -184,45 +184,43 @@ namespace Server.Engines.VeteranRewards
|
|||
{
|
||||
RewardList list = m_Lists[i];
|
||||
RewardEntry[] entries = list.Entries;
|
||||
TimeSpan ts;
|
||||
|
||||
for (int j = 0; j < entries.Length; ++j)
|
||||
if (entries[j].ItemType == type)
|
||||
{
|
||||
if (entries[j].ItemType != type)
|
||||
continue;
|
||||
|
||||
if (args == null && entries[j].Args.Length == 0)
|
||||
{
|
||||
if (args == null && entries[j].Args.Length == 0)
|
||||
{
|
||||
if ((!isRelaxedRules || i > 0) && !HasAccess(from, list, out ts))
|
||||
{
|
||||
from.SendLocalizedMessage(1008126, true,
|
||||
Math.Ceiling(ts.TotalDays / 30.0)
|
||||
.ToString()); // Your account is not old enough to use this item. Months until you can use this item :
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isRelaxedRules && i <= 0 || HasAccess(from, list, out TimeSpan ts))
|
||||
return true;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(1008126, true,
|
||||
Math.Ceiling(ts.TotalDays / 30.0)
|
||||
.ToString()); // Your account is not old enough to use this item. Months until you can use this item :
|
||||
return false;
|
||||
|
||||
if (args.Length == entries[j].Args.Length)
|
||||
{
|
||||
bool match = true;
|
||||
|
||||
for (int k = 0; match && k < args.Length; ++k)
|
||||
match = args[k].Equals(entries[j].Args[k]);
|
||||
|
||||
if (match)
|
||||
{
|
||||
if ((!isRelaxedRules || i > 0) && !HasAccess(from, list, out ts))
|
||||
{
|
||||
from.SendLocalizedMessage(1008126, true,
|
||||
Math.Ceiling(ts.TotalDays / 30.0)
|
||||
.ToString()); // Your account is not old enough to use this item. Months until you can use this item :
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (args?.Length != entries[j].Args.Length)
|
||||
continue;
|
||||
|
||||
bool match = true;
|
||||
|
||||
for (int k = 0; match && k < args.Length; ++k)
|
||||
match = args[k].Equals(entries[j].Args[k]);
|
||||
|
||||
if (match)
|
||||
{
|
||||
if (isRelaxedRules && i <= 0 || HasAccess(from, list, out TimeSpan ts))
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage(1008126, true,
|
||||
Math.Ceiling(ts.TotalDays / 30.0)
|
||||
.ToString()); // Your account is not old enough to use this item. Months until you can use this item :
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// no entry?
|
||||
|
|
@ -474,9 +472,7 @@ namespace Server.Engines.VeteranRewards
|
|||
if (!e.Mobile.Alive)
|
||||
return;
|
||||
|
||||
int cur, max, level;
|
||||
|
||||
ComputeRewardInfo(e.Mobile, out cur, out max, out level);
|
||||
ComputeRewardInfo(e.Mobile, out int cur, out int max, out int level);
|
||||
|
||||
if (e.Mobile.SkillsCap == 7000 || e.Mobile.SkillsCap == 7050 || e.Mobile.SkillsCap == 7100 ||
|
||||
e.Mobile.SkillsCap == 7150 || e.Mobile.SkillsCap == 7200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue