This commit is contained in:
parent
8ff1a903a0
commit
14873aaa3e
78 changed files with 360 additions and 231 deletions
|
|
@ -5,6 +5,7 @@ using Server;
|
|||
using Server.Items;
|
||||
using Server.Engines.Harvest;
|
||||
using Server.ContextMenus;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
|
|
@ -80,7 +81,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( HarvestSystem == null )
|
||||
if ( HarvestSystem == null || Deleted )
|
||||
return;
|
||||
|
||||
Point3D loc = GetWorldLocation();
|
||||
|
|
@ -90,8 +91,13 @@ namespace Server.Items
|
|||
from.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !( HarvestSystem is Mining ) )
|
||||
else if ( !this.IsAccessibleTo( from ) )
|
||||
{
|
||||
this.PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !(this.HarvestSystem is Mining) )
|
||||
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
|
||||
|
||||
HarvestSystem.BeginHarvesting( from, this );
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Server.Items
|
|||
|
||||
if ( Core.AOS )
|
||||
return damage;
|
||||
|
||||
|
||||
int absorb = defender.MeleeDamageAbsorb;
|
||||
|
||||
if ( absorb > 0 )
|
||||
|
|
|
|||
|
|
@ -1243,6 +1243,10 @@ namespace Server.Items
|
|||
if ( Core.AOS )
|
||||
return AbsorbDamageAOS( attacker, defender, damage );
|
||||
|
||||
BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
|
||||
if ( shield != null )
|
||||
damage = shield.OnHit( this, damage );
|
||||
|
||||
double chance = Utility.RandomDouble();
|
||||
|
||||
Item armorItem;
|
||||
|
|
@ -1265,10 +1269,6 @@ namespace Server.Items
|
|||
if ( armor != null )
|
||||
damage = armor.OnHit( this, damage );
|
||||
|
||||
BaseShield shield = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield;
|
||||
if ( shield != null )
|
||||
damage = shield.OnHit( this, damage );
|
||||
|
||||
int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;
|
||||
|
||||
if ( virtualArmor > 0 )
|
||||
|
|
@ -2345,7 +2345,13 @@ namespace Server.Items
|
|||
if ( Core.AOS )
|
||||
return ComputeDamageAOS( attacker, defender );
|
||||
|
||||
return (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true );
|
||||
int damage = (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true );
|
||||
|
||||
// pre-AOS, halve damage if the defender is a player or the attacker is not a player
|
||||
if ( defender is PlayerMobile || !( attacker is PlayerMobile ) )
|
||||
damage = (int)(damage / 2.0);
|
||||
|
||||
return damage;
|
||||
}
|
||||
|
||||
public virtual void PlayHurtAnimation( Mobile from )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue