Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -16,7 +16,7 @@ namespace Server.Items
public override void CraftInit(Mobile from)
{
double skillValue = from.Skills[SkillName.Cartography].Value;
double skillValue = from.Skills.Cartography.Value;
int dist = 64 + (int)(skillValue * 4);
if (dist < 200)

View file

@ -16,7 +16,7 @@ namespace Server.Items
public override void CraftInit(Mobile from)
{
double skillValue = from.Skills[SkillName.Cartography].Value;
double skillValue = from.Skills.Cartography.Value;
int dist = 64 + (int)(skillValue * 2);
SetDisplay(from.X - dist, from.Y - dist, from.X + dist, from.Y + dist, 200, 200);

View file

@ -196,9 +196,7 @@ namespace Server.Items
public virtual void AddWorldPin(int x, int y)
{
int mapX, mapY;
ConvertToMap(x, y, out mapX, out mapY);
ConvertToMap(x, y, out int mapX, out int mapY);
AddPin(mapX, mapY);
}
@ -285,7 +283,7 @@ namespace Server.Items
{
Mobile from = state.Mobile;
if (!(World.FindItem(pvSrc.ReadInt32()) is MapItem map))
if (!(World.FindItem(pvSrc.ReadUInt32()) is MapItem map))
return;
int command = pvSrc.ReadByte();

View file

@ -16,7 +16,7 @@ namespace Server.Items
public override void CraftInit(Mobile from)
{
double skillValue = from.Skills[SkillName.Cartography].Value;
double skillValue = from.Skills.Cartography.Value;
int dist = 64 + (int)(skillValue * 10);
if (dist < 200)

View file

@ -326,7 +326,7 @@ namespace Server.Items
from.SendLocalizedMessage(
503031); // You did not decode this map and have no clue where to look for the treasure.
}
else if (!from.CanBeginAction(typeof(TreasureMap)))
else if (!from.CanBeginAction<TreasureMap>())
{
from.SendLocalizedMessage(503020); // You are already digging treasure.
}
@ -390,7 +390,7 @@ namespace Server.Items
private bool HasRequiredSkill(Mobile from)
{
return from.Skills[SkillName.Cartography].Value >= GetMinSkillLevel();
return from.Skills.Cartography.Value >= GetMinSkillLevel();
}
public void Decode(Mobile from)
@ -410,7 +410,7 @@ namespace Server.Items
{
double minSkill = GetMinSkillLevel();
if (from.Skills[SkillName.Cartography].Value < minSkill)
if (from.Skills.Cartography.Value < minSkill)
from.SendLocalizedMessage(503013); // The map is too difficult to attempt to decode.
double maxSkill = minSkill + 60.0;
@ -591,7 +591,7 @@ namespace Server.Items
from.SendLocalizedMessage(
503031); // You did not decode this map and have no clue where to look for the treasure.
}
else if (!from.CanBeginAction(typeof(TreasureMap)))
else if (!from.CanBeginAction<TreasureMap>())
{
from.SendLocalizedMessage(503020); // You are already digging treasure.
}
@ -610,7 +610,7 @@ namespace Server.Items
Point3D targ3D = (p as Item)?.GetWorldLocation() ?? new Point3D(p);
int maxRange;
double skillValue = from.Skills[SkillName.Mining].Value;
double skillValue = from.Skills.Mining.Value;
if (skillValue >= 100.0)
maxRange = 4;
@ -637,10 +637,10 @@ namespace Server.Items
{
int z = map.GetAverageZ(x, y);
if (!map.CanFit(x, y, z, 16, true, true))
if (!map.CanFit(x, y, z, 16, true))
from.SendLocalizedMessage(
503021); // You have found the treasure chest but something is keeping it from being dug up.
else if (from.BeginAction(typeof(TreasureMap)))
else if (from.BeginAction<TreasureMap>())
new DigTimer(from, m_Map, new Point3D(x, y, z), map).Start();
else
from.SendLocalizedMessage(503020); // You are already digging treasure.
@ -738,7 +738,7 @@ namespace Server.Items
private void Terminate()
{
Stop();
m_From.EndAction(typeof(TreasureMap));
m_From.EndAction<TreasureMap>();
m_Chest?.Delete();
@ -823,7 +823,7 @@ namespace Server.Items
if (m_Chest != null && m_Chest.Location.Z >= m_Location.Z)
{
Stop();
m_From.EndAction(typeof(TreasureMap));
m_From.EndAction<TreasureMap>();
m_Chest.Temporary = false;
m_TreasureMap.Completed = true;

View file

@ -18,7 +18,7 @@ namespace Server.Items
{
// Unlike the others, world map is not based on crafted location
double skillValue = from.Skills[SkillName.Cartography].Value;
double skillValue = from.Skills.Cartography.Value;
int x20 = (int)(skillValue * 20);
int size = 25 + (int)(skillValue * 6.6);