Sets a default parameter for OnHit. More casting cleanup.
This commit is contained in:
parent
74f498c1c8
commit
d6c0bf2d4c
96 changed files with 350 additions and 579 deletions
|
|
@ -39,7 +39,7 @@ namespace Server.Items
|
|||
{
|
||||
m_Resource = value;
|
||||
Hue = CraftResources.GetHue( m_Resource );
|
||||
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ namespace Server.Items
|
|||
|
||||
if ( !map.CanFit( p3D.X, p3D.Y, p3D.Z, c.ItemData.Height, false, true, ( c.Z == 0 ) ) )
|
||||
return AddonFitResult.Blocked;
|
||||
else if ( !CheckHouse( from, p3D, map, c.ItemData.Height, ref house ) )
|
||||
if ( !CheckHouse( from, p3D, map, c.ItemData.Height, ref house ) )
|
||||
return AddonFitResult.NotInHouse;
|
||||
|
||||
if ( c.NeedsWall )
|
||||
|
|
@ -168,7 +168,7 @@ namespace Server.Items
|
|||
{
|
||||
Point3D addonLoc = new Point3D( p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z );
|
||||
int addonHeight = c.ItemData.CalcHeight;
|
||||
|
||||
|
||||
if ( Utility.InRange( doorLoc, addonLoc, 1 ) && (addonLoc.Z == doorLoc.Z || ((addonLoc.Z + addonHeight) > doorLoc.Z && (doorLoc.Z + doorHeight) > addonLoc.Z)) )
|
||||
return AddonFitResult.DoorTooClose;
|
||||
}
|
||||
|
|
@ -293,4 +293,4 @@ namespace Server.Items
|
|||
Weight = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue