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
|
|
@ -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