- IPTable update when deleting accounts, so the creation IP address gets a new account spot.
- Added AdminGump option for removing account access IP addresses. - Firebombs now cancel the target properly when exploding. - Fixed item placement bug when creating firebombs. - Added criminal check option to Teleporter. - Fixed item placement bug when opening MIBs. - Made SOS flipable. - Opening an SOS will no longer close other SOS gumps. - Corrected Leafblade to be a Fencing weapon. - Meer mages no longer cast plagues on pets, only on players. - Corrected skills typo in CorruptedSoul. - Movement induced by angering a monster during taming will now respect movement timers. - Teleporting into keep walls is no longer possible. - Removed the ability to have line of sight under a house plot through house walls. - Added the Frozen mobile flag, providing clients with information on when they are frozen. (The client then disallows movement.) - Fix for character statue redeeding issues.
This commit is contained in:
parent
a3f8cb5fc6
commit
c52504151b
18 changed files with 309 additions and 122 deletions
|
|
@ -11,6 +11,7 @@ namespace Server.Items
|
|||
private Timer m_Timer;
|
||||
private int m_Ticks = 0;
|
||||
private Mobile m_LitBy;
|
||||
private List<Mobile> m_Users;
|
||||
|
||||
[Constructable]
|
||||
public Firebomb() : this( 0x99B )
|
||||
|
|
@ -53,21 +54,27 @@ namespace Server.Items
|
|||
|
||||
if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
|
||||
{
|
||||
//to prevent exploiting for pvp
|
||||
from.SendLocalizedMessage( 1075857 ); // You can not use that while paralyzed.
|
||||
// to prevent exploiting for pvp
|
||||
from.SendLocalizedMessage( 1075857 ); // You cannot use that while paralyzed.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_Timer == null )
|
||||
{
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 1 ), TimeSpan.FromSeconds( 1 ), new TimerCallback( OnFirebombTimerTick ) );
|
||||
m_LitBy = from;
|
||||
from.SendLocalizedMessage( 1060581 ); //You light the firebomb! Throw it now!
|
||||
from.SendLocalizedMessage( 1060582 ); // You light the firebomb. Throw it now!
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1060582 ); //You've already lit it! Better throw it now!
|
||||
from.SendLocalizedMessage( 1060581 ); // You've already lit it! Better throw it now!
|
||||
|
||||
from.BeginTarget( 12, true, TargetFlags.None, new TargetCallback( OnFirebombTarget ) );
|
||||
if ( m_Users == null )
|
||||
m_Users = new List<Mobile>();
|
||||
|
||||
if ( !m_Users.Contains( from ) )
|
||||
m_Users.Add( from );
|
||||
|
||||
from.Target = new ThrowTarget( this );
|
||||
}
|
||||
|
||||
private void OnFirebombTimerTick()
|
||||
|
|
@ -103,10 +110,24 @@ namespace Server.Items
|
|||
if ( HeldBy != null )
|
||||
HeldBy.DropHolding();
|
||||
|
||||
if ( m_Users != null )
|
||||
{
|
||||
foreach ( Mobile m in m_Users )
|
||||
{
|
||||
ThrowTarget targ = m.Target as ThrowTarget;
|
||||
|
||||
if ( targ != null && targ.Bomb == this )
|
||||
Target.Cancel( m );
|
||||
}
|
||||
|
||||
m_Users.Clear();
|
||||
m_Users = null;
|
||||
}
|
||||
|
||||
if ( RootParent is Mobile )
|
||||
{
|
||||
Mobile parent = (Mobile)RootParent;
|
||||
parent.SendLocalizedMessage( 1060583 ); //The firebomb explodes in your hand!
|
||||
parent.SendLocalizedMessage( 1060583 ); // The firebomb explodes in your hand!
|
||||
AOS.Damage( parent, Utility.Random( 3 ) + 4, 0, 100, 0, 0, 0 );
|
||||
}
|
||||
else if ( RootParent == null )
|
||||
|
|
@ -181,6 +202,27 @@ namespace Server.Items
|
|||
|
||||
MoveToWorld( new Point3D( p ), map );
|
||||
}
|
||||
|
||||
private class ThrowTarget : Target
|
||||
{
|
||||
private Firebomb m_Bomb;
|
||||
|
||||
public Firebomb Bomb
|
||||
{
|
||||
get { return m_Bomb; }
|
||||
}
|
||||
|
||||
public ThrowTarget( Firebomb bomb )
|
||||
: base( 12, true, TargetFlags.None )
|
||||
{
|
||||
m_Bomb = bomb;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
m_Bomb.OnFirebombTarget( from, targeted );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class FirebombField : Item
|
||||
|
|
@ -205,7 +247,7 @@ namespace Server.Items
|
|||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
//Don't serialize these...
|
||||
// Don't serialize these...
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
|
|||
|
|
@ -61,15 +61,15 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( obj is Item && ((Item)obj).RootParent != from )
|
||||
{
|
||||
from.SendLocalizedMessage( 1005425 ); // You may only wipe down items you are holding or carrying.
|
||||
}
|
||||
else if ( obj is BaseWeapon )
|
||||
{
|
||||
BaseWeapon weapon = (BaseWeapon)obj;
|
||||
|
||||
if ( weapon.RootParent != from )
|
||||
{
|
||||
from.SendLocalizedMessage( 1005425 ); // You may only wipe down items you are holding or carrying.
|
||||
}
|
||||
else if ( weapon.Poison == null || weapon.PoisonCharges <= 0 )
|
||||
if ( weapon.Poison == null || weapon.PoisonCharges <= 0 )
|
||||
{
|
||||
from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1005422 ); // Hmmmm... this does not need to be cleaned.
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ namespace Server.Items
|
|||
from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1005422 ); // Hmmmm... this does not need to be cleaned.
|
||||
}
|
||||
}
|
||||
//Added for Firebomb
|
||||
#region Firebomb
|
||||
else if ( obj is BaseBeverage )
|
||||
{
|
||||
BaseBeverage beverage = (BaseBeverage) obj;
|
||||
|
|
@ -115,11 +115,9 @@ namespace Server.Items
|
|||
{
|
||||
Firebomb bomb = new Firebomb( beverage.ItemID );
|
||||
bomb.Name = beverage.Name;
|
||||
Point3D loc = beverage.Location;
|
||||
beverage.Delete();
|
||||
|
||||
from.AddToBackpack( bomb );
|
||||
bomb.Location = loc;
|
||||
beverage.ReplaceWith( bomb );
|
||||
|
||||
from.SendLocalizedMessage( 1060580 ); // You prepare a firebomb.
|
||||
Consume();
|
||||
}
|
||||
|
|
@ -128,7 +126,7 @@ namespace Server.Items
|
|||
{
|
||||
from.SendLocalizedMessage( 1060579 ); // That is already a firebomb!
|
||||
}
|
||||
//Firebomb end
|
||||
#endregion
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1005426 ); // The cloth will not work on that.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
{
|
||||
public class Teleporter : Item
|
||||
{
|
||||
private bool m_Active, m_Creatures, m_CombatCheck;
|
||||
private bool m_Active, m_Creatures, m_CombatCheck, m_CriminalCheck;
|
||||
private Point3D m_PointDest;
|
||||
private Map m_MapDest;
|
||||
private bool m_SourceEffect;
|
||||
|
|
@ -79,6 +79,13 @@ namespace Server.Items
|
|||
set { m_CombatCheck = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool CriminalCheck
|
||||
{
|
||||
get { return m_CriminalCheck; }
|
||||
set { m_CriminalCheck = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return 1026095; } } // teleporter
|
||||
|
||||
[Constructable]
|
||||
|
|
@ -103,6 +110,7 @@ namespace Server.Items
|
|||
m_Creatures = creatures;
|
||||
|
||||
m_CombatCheck = false;
|
||||
m_CriminalCheck = false;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
|
|
@ -183,7 +191,14 @@ namespace Server.Items
|
|||
if ( m_Active )
|
||||
{
|
||||
if ( !m_Creatures && !m.Player )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ( m_CriminalCheck && m.Criminal )
|
||||
{
|
||||
m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
|
||||
return true;
|
||||
}
|
||||
else if ( m_CombatCheck && SpellHelper.CheckCombat( m ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
|
||||
|
|
@ -205,8 +220,9 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 3 ); // version
|
||||
writer.Write( (int) 4 ); // version
|
||||
|
||||
writer.Write( (bool) m_CriminalCheck );
|
||||
writer.Write( (bool) m_CombatCheck );
|
||||
|
||||
writer.Write( (bool) m_SourceEffect );
|
||||
|
|
@ -229,6 +245,11 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 4:
|
||||
{
|
||||
m_CriminalCheck = reader.ReadBool();
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_CombatCheck = reader.ReadBool();
|
||||
|
|
|
|||
|
|
@ -102,8 +102,7 @@ namespace Server.Items
|
|||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
Consume();
|
||||
from.AddToBackpack( new SOS( m_TargetMap, m_Level ) );
|
||||
ReplaceWith( new SOS( m_TargetMap, m_Level ) );
|
||||
from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 501891 ); // You extract the message from the bottle.
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server.Gumps;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x14ED, 0x14EE )]
|
||||
public class SOS : Item
|
||||
{
|
||||
public override int LabelNumber
|
||||
|
|
@ -80,7 +81,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructable]
|
||||
public SOS( Map map, int level ) : base( 0x14ED )
|
||||
public SOS( Map map, int level ) : base( 0x14EE )
|
||||
{
|
||||
Weight = 1.0;
|
||||
|
||||
|
|
@ -167,7 +168,7 @@ namespace Server.Items
|
|||
else
|
||||
entry = MessageEntry.Entries[m_MessageIndex = Utility.Random( MessageEntry.Entries.Length )];
|
||||
|
||||
from.CloseGump( typeof( MessageGump ) );
|
||||
//from.CloseGump( typeof( MessageGump ) );
|
||||
from.SendGump( new MessageGump( entry, m_TargetMap, m_TargetLocation ) );
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ namespace Server.Items
|
|||
public override int OldSpeed{ get{ return 42; } }
|
||||
|
||||
public override int DefMissSound{ get{ return 0x239; } }
|
||||
public override SkillName DefSkill { get { return SkillName.Fencing; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 30; } } // TODO
|
||||
public override int InitMaxHits{ get{ return 60; } } // TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue