- Fixed Bola item drop bug for Core.SE.
- Added 'dead only' and 'no ethereals in pack' to ConditionTeleporter. - Fixed tournaments discarding leftover participants for participant numbers greater than 2. - Added support for the extended status packet. - Fixed items not being placeable on tiles occupied by hidden staff mobiles.
This commit is contained in:
parent
8818ffdc80
commit
030ad1db5b
8 changed files with 193 additions and 55 deletions
|
|
@ -36,7 +36,7 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
|
||||
}
|
||||
else if ( !Core.AOS && (from.FindItemOnLayer( Layer.OneHanded ) != null || from.FindItemOnLayer( Layer.TwoHanded ) != null) )
|
||||
else if ( !HasFreeHands( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
|
||||
}
|
||||
|
|
@ -52,17 +52,6 @@ namespace Server.Items
|
|||
{
|
||||
EtherealMount.StopMounting( from );
|
||||
|
||||
if ( Core.AOS ) {
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
}
|
||||
|
||||
from.Target = new BolaTarget( this );
|
||||
from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
|
||||
from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
|
||||
|
|
@ -115,6 +104,48 @@ namespace Server.Items
|
|||
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( ReleaseBolaLock ), from );
|
||||
}
|
||||
|
||||
private static bool HasFreeHands( Mobile from )
|
||||
{
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( Core.SE )
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
{
|
||||
if ( one != null && one.Movable )
|
||||
{
|
||||
pack.DropItem( one );
|
||||
one = null;
|
||||
}
|
||||
|
||||
if ( two != null && two.Movable )
|
||||
{
|
||||
pack.DropItem( two );
|
||||
two = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( Core.AOS )
|
||||
{
|
||||
if ( one != null && one.Movable )
|
||||
{
|
||||
from.AddToBackpack( one );
|
||||
one = null;
|
||||
}
|
||||
|
||||
if ( two != null && two.Movable )
|
||||
{
|
||||
from.AddToBackpack( two );
|
||||
two = null;
|
||||
}
|
||||
}
|
||||
|
||||
return ( one == null && two == null );
|
||||
}
|
||||
|
||||
public class BolaTarget : Target
|
||||
{
|
||||
private Bola m_Bola;
|
||||
|
|
@ -137,7 +168,7 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
|
||||
}
|
||||
else if ( !Core.AOS && (from.FindItemOnLayer( Layer.OneHanded ) != null || from.FindItemOnLayer( Layer.TwoHanded ) != null) )
|
||||
else if ( !HasFreeHands( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
|
||||
}
|
||||
|
|
@ -160,17 +191,6 @@ namespace Server.Items
|
|||
{
|
||||
EtherealMount.StopMounting( from );
|
||||
|
||||
if ( Core.AOS ) {
|
||||
Item one = from.FindItemOnLayer( Layer.OneHanded );
|
||||
Item two = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( one != null )
|
||||
from.AddToBackpack( one );
|
||||
|
||||
if ( two != null )
|
||||
from.AddToBackpack( two );
|
||||
}
|
||||
|
||||
from.DoHarmful( to );
|
||||
|
||||
m_Bola.Consume();
|
||||
|
|
|
|||
|
|
@ -910,14 +910,16 @@ namespace Server.Items
|
|||
[Flags]
|
||||
protected enum ConditionFlag
|
||||
{
|
||||
None = 0x00,
|
||||
DenyMounted = 0x01,
|
||||
DenyFollowers = 0x02,
|
||||
DenyPackContents = 0x04,
|
||||
DenyHolding = 0x08,
|
||||
DenyEquipment = 0x10,
|
||||
DenyTransformed = 0x20,
|
||||
StaffOnly = 0x40
|
||||
None = 0x000,
|
||||
DenyMounted = 0x001,
|
||||
DenyFollowers = 0x002,
|
||||
DenyPackContents = 0x004,
|
||||
DenyHolding = 0x008,
|
||||
DenyEquipment = 0x010,
|
||||
DenyTransformed = 0x020,
|
||||
StaffOnly = 0x040,
|
||||
DenyPackEthereals = 0x080,
|
||||
DeadOnly = 0x100
|
||||
}
|
||||
|
||||
private ConditionFlag m_Flags;
|
||||
|
|
@ -971,6 +973,20 @@ namespace Server.Items
|
|||
set { SetFlag(ConditionFlag.StaffOnly, value); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool DenyPackEthereals
|
||||
{
|
||||
get { return GetFlag(ConditionFlag.DenyPackEthereals); }
|
||||
set { SetFlag(ConditionFlag.DenyPackEthereals, value); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool DeadOnly
|
||||
{
|
||||
get { return GetFlag(ConditionFlag.DeadOnly); }
|
||||
set { SetFlag(ConditionFlag.DeadOnly, value); InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override bool CanTeleport(Mobile m)
|
||||
{
|
||||
if (!base.CanTeleport(m))
|
||||
|
|
@ -991,12 +1007,21 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
Container pack;
|
||||
Container pack = m.Backpack;
|
||||
|
||||
if (GetFlag(ConditionFlag.DenyPackContents) && (pack = m.Backpack) != null && pack.TotalItems != 0)
|
||||
if (pack != null)
|
||||
{
|
||||
m.SendMessage("You must empty your backpack before proceeding.");
|
||||
return false;
|
||||
if (GetFlag(ConditionFlag.DenyPackContents) && pack.TotalItems != 0)
|
||||
{
|
||||
m.SendMessage("You must empty your backpack before proceeding.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (GetFlag(ConditionFlag.DenyPackEthereals) && (pack.FindItemByType(typeof(EtherealMount)) != null || pack.FindItemByType(typeof(BaseImprisonedMobile)) != null))
|
||||
{
|
||||
m.SendMessage("You must empty your backpack of ethereal mounts before proceeding.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetFlag(ConditionFlag.DenyHolding) && m.Holding != null)
|
||||
|
|
@ -1034,6 +1059,12 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
if (GetFlag(ConditionFlag.DeadOnly) && m.Alive)
|
||||
{
|
||||
m.SendLocalizedMessage(1060014); // Only the dead may pass.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -1057,6 +1088,9 @@ namespace Server.Items
|
|||
if (GetFlag(ConditionFlag.DenyPackContents))
|
||||
props.Append("<BR>Deny Pack Contents");
|
||||
|
||||
if (GetFlag(ConditionFlag.DenyPackEthereals))
|
||||
props.Append("<BR>Deny Pack Ethereals");
|
||||
|
||||
if (GetFlag(ConditionFlag.DenyHolding))
|
||||
props.Append("<BR>Deny Holding");
|
||||
|
||||
|
|
@ -1069,6 +1103,9 @@ namespace Server.Items
|
|||
if (GetFlag(ConditionFlag.StaffOnly))
|
||||
props.Append("<BR>Staff Only");
|
||||
|
||||
if (GetFlag(ConditionFlag.DeadOnly))
|
||||
props.Append("<BR>Dead Only");
|
||||
|
||||
if (props.Length != 0)
|
||||
{
|
||||
props.Remove(0, 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue