Permalink
Browse files

Fixes

- Fixed House Visits with proper era Checks
- Fixed Leatherwolf Skin ItemID and Hue
- Added more conditions for BladedItemTarget for cutting ICarvable Items inappropriately
- Reverted/hacked a fix for new housing tiles
  • Loading branch information...
kevin-10 committed Aug 19, 2017
1 parent 65f6bb1 commit 23b70c6a4fe03c070b9cca39a93b7879508b776a

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -314,7 +314,7 @@ public HouseGumpAOS(HouseGumpPageAOS page, Mobile from, BaseHouse house)
this.AddLabel(250, 330, LabelHue, house.Price.ToString());

this.AddHtmlLocalized(20, 360, 300, 20, 1011241, SelectedColor, false, false); // Number of visits this building has had:
this.AddLabel(350, 360, LabelHue, house.Visits.ToString());
this.AddLabel(350, 360, LabelHue, house.TotalVisits.ToString());

break;
}
@@ -103,8 +103,8 @@ public abstract class BaseHouseDoor : BaseDoor, ISecurable
public BaseHouseDoor(DoorFacing facing, int closedID, int openedID, int openedSound, int closedSound, Point3D offset)
: base(closedID, openedID, openedSound, closedSound, offset)
{
this.m_Facing = facing;
this.m_Level = SecureLevel.Anyone;
m_Facing = facing;
m_Level = SecureLevel.Anyone;
}

public BaseHouseDoor(Serial serial)
@@ -117,23 +117,23 @@ public DoorFacing Facing
{
get
{
return this.m_Facing;
return m_Facing;
}
set
{
this.m_Facing = value;
m_Facing = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public SecureLevel Level
{
get
{
return this.m_Level;
return m_Level;
}
set
{
this.m_Level = value;
m_Level = value;
}
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
@@ -146,17 +146,17 @@ public BaseHouse FindHouse()
{
Point3D loc;

if (this.Open)
loc = new Point3D(this.X - this.Offset.X, this.Y - this.Offset.Y, this.Z - this.Offset.Z);
if (Open)
loc = new Point3D(X - Offset.X, Y - Offset.Y, Z - Offset.Z);
else
loc = this.Location;
loc = Location;

return BaseHouse.FindHouseAt(loc, this.Map, 20);
return BaseHouse.FindHouseAt(loc, Map, 20);
}

public bool CheckAccess(Mobile m)
{
BaseHouse house = this.FindHouse();
BaseHouse house = FindHouse();

if (house == null)
return false;
@@ -167,31 +167,31 @@ public bool CheckAccess(Mobile m)
if (house.Public ? house.IsBanned(m) : !house.HasAccess(m))
return false;

return house.HasSecureAccess(m, this.m_Level);
return house.HasSecureAccess(m, m_Level);
}

public override void OnOpened(Mobile from)
{
BaseHouse house = this.FindHouse();
BaseHouse house = FindHouse();

if (house != null && house.IsFriend(from) && from.IsPlayer() && house.RefreshDecay())
from.SendLocalizedMessage(1043293); // Your house's age and contents have been refreshed.

if (house != null && house.Public && !house.IsFriend(from))
house.Visits++;
if (!Core.AOS && house != null && house.Public && !house.IsFriend(from))
house.AddVisit(from);
}

public override bool UseLocks()
{
BaseHouse house = this.FindHouse();
BaseHouse house = FindHouse();

return (house == null || !house.IsAosRules);
}

public override void Use(Mobile from)
{
if (!this.CheckAccess(from))
from.SendLocalizedMessage(1061637); // You are not allowed to access this.
if (!CheckAccess(from))
from.SendLocalizedMessage(1061637); // You are not allowed to access
else
base.Use(from);
}
@@ -202,9 +202,9 @@ public override void Serialize(GenericWriter writer)

writer.Write((int)1); // version

writer.Write((int)this.m_Level);
writer.Write((int)m_Level);

writer.Write((int)this.m_Facing);
writer.Write((int)m_Facing);
}

public override void Deserialize(GenericReader reader)
@@ -217,15 +217,15 @@ public override void Deserialize(GenericReader reader)
{
case 1:
{
this.m_Level = (SecureLevel)reader.ReadInt();
m_Level = (SecureLevel)reader.ReadInt();
goto case 0;
}
case 0:
{
if (version < 1)
this.m_Level = SecureLevel.Anyone;
m_Level = SecureLevel.Anyone;

this.m_Facing = (DoorFacing)reader.ReadInt();
m_Facing = (DoorFacing)reader.ReadInt();
break;
}
}
@@ -239,7 +239,7 @@ public override bool IsInside(Mobile from)
const int bs = r * 2 + 1;
const int ss = r + 1;

switch ( this.m_Facing )
switch ( m_Facing )
{
case DoorFacing.WestCW:
case DoorFacing.EastCCW:
@@ -275,9 +275,9 @@ public override bool IsInside(Mobile from)
return false;
}

int rx = from.X - this.X;
int ry = from.Y - this.Y;
int az = Math.Abs(from.Z - this.Z);
int rx = from.X - X;
int ry = from.Y - Y;
int az = Math.Abs(from.Z - Z);

return (rx >= x && rx < (x + w) && ry >= y && ry < (y + h) && az <= 4);
}
@@ -383,10 +383,12 @@ public LeatherWolfSkin()

[Constructable]
public LeatherWolfSkin(int amount)
: base(0x3189)
: base(0xDF8)
{
Stackable = true;
Amount = amount;

Hue = 248;
}

public LeatherWolfSkin(Serial serial)
@@ -405,14 +407,20 @@ public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);

writer.Write((int)0); // version
writer.Write((int)1); // version
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);

int version = reader.ReadInt();

if (version == 0)
{
ItemID = 0xDF8;
Hue = 248;
}
}
}

@@ -20,6 +20,7 @@ public SmugglersEdge()

WeaponAttributes.UseBestSkill = 1;
Attributes.SpellChanneling = 1;
Attributes.WeaponSpeed = 30;

if (!Siege.SiegeShard)
LootType = LootType.Blessed;
@@ -56,13 +57,16 @@ public override void GetProperties(ObjectPropertyList list)
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((int)1); // version
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
int version = reader.ReadInt();

if (version == 0)
Attributes.WeaponSpeed = 30;
}
}

@@ -77,6 +81,10 @@ public GargishSmugglersEdge()
{
Hue = 1461;

WeaponAttributes.UseBestSkill = 1;
Attributes.SpellChanneling = 1;
Attributes.WeaponSpeed = 30;

if (!Siege.SiegeShard)
LootType = LootType.Blessed;
}
@@ -112,13 +120,16 @@ public override void GetProperties(ObjectPropertyList list)
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((int)1); // version
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
int version = reader.ReadInt();

if (version == 0)
Attributes.WeaponSpeed = 30;
}
}
}
@@ -17,36 +17,36 @@ public class LeatherWolf : BaseCreature, IRepairableMobile

[Constructable]
public LeatherWolf()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
: base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a leather wolf";
this.Body = 739;
this.BaseSoundID = 0xE5;
Name = "a leather wolf";
Body = 739;
BaseSoundID = 0xE5;

this.SetStr(104, 125);
this.SetDex(102, 125);
this.SetInt(20, 34);
SetStr(104, 125);
SetDex(102, 125);
SetInt(20, 34);

this.SetHits(291, 329);
SetHits(291, 329);

this.SetDamage(12, 23);
SetDamage(12, 23);

this.SetDamageType(ResistanceType.Physical, 100);
SetDamageType(ResistanceType.Physical, 100);

this.SetResistance(ResistanceType.Physical, 40, 49);
this.SetResistance(ResistanceType.Fire, 20, 29);
this.SetResistance(ResistanceType.Cold, 30, 40);
this.SetResistance(ResistanceType.Poison, 21, 29);
this.SetResistance(ResistanceType.Energy, 20, 25);
SetResistance(ResistanceType.Physical, 40, 49);
SetResistance(ResistanceType.Fire, 20, 29);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 21, 29);
SetResistance(ResistanceType.Energy, 20, 25);

this.SetSkill(SkillName.MagicResist, 79.5, 94.9);
this.SetSkill(SkillName.Tactics, 80.6, 89.4);
this.SetSkill(SkillName.Wrestling, 70.9, 88.4);
SetSkill(SkillName.MagicResist, 79.5, 94.9);
SetSkill(SkillName.Tactics, 80.6, 89.4);
SetSkill(SkillName.Wrestling, 70.9, 88.4);

this.Fame = 4500;
this.Karma = -4500;
Fame = 4500;
Karma = -4500;

this.Tamable = false;
Tamable = false;
}

public LeatherWolf(Serial serial)
@@ -164,7 +164,7 @@ public override FoodType FavoriteFood
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Meager, 2);
AddLoot(LootPack.Meager, 2);
}

public override int GetIdleSound()
Oops, something went wrong.

0 comments on commit 23b70c6

Please sign in to comment.