Runic sewing kits will no longer apply durability
http://www.uodemise.com/forum/showthread.php?t=133757 Vendor Look/Browse/View will now work properly http://www.uodemise.com/forum/showthread.php?t=135531 Stacked Eggbombs will now unstack correctly http://www.uodemise.com/forum/showthread.php?t=134321 Unbonded pets should logout too http://www.uodemise.com/forum/showthread.php?t=119262 Paragon chests placed on player vendors will now behave correctly http://www.uodemise.com/forum/showthread.php?t=116864 Proper party fame/karma sharing http://www.uodemise.com/forum/showthread.php?t=122749 Guild Alliance/War update bug fixed http://www.uodemise.com/forum/showthread.php?t=115236 Fukiya properties updates and loading bug fixed http://www.uodemise.com/forum/showthread.php?t=136042 Shuriken, same problems as fukiya http://www.uodemise.com/forum/showthread.php?t=120212 greater mongbats will now be recognised as quest objectives http://www.uodemise.com/forum/showthread.php?t=128072 divine fury sound tweaks. http://www.uodemise.com/forum/showthread.php?t=136489 pet stat gains fix http://www.uodemise.com/forum/showthread.php?t=134820 Pets follow speed corrected http://www.uodemise.com/forum/showthread.php?t=124774 E-fields no longer block in trammel rulesets. http://www.uodemise.com/forum/showthread.php?t=116680 Disguise kit timer fix http://www.uodemise.com/forum/showthread.php?t=133913 Meer Mage special abilities fixes. http://www.uodemise.com/forum/showthread.php?t=122134 Missing food property if eggs, in animal lore gump http://www.uodemise.com/forum/showthread.php?t=135258 Pets will follow after an attack is completed. http://www.uodemise.com/forum/showthread.php?t=135962 Hides should not be scissored whilst still on the corpse http://www.uodemise.com/forum/showthread.php?t=118799 Pet bonding changed to include jewelry skill adjustments. http://www.uodemise.com/forum/showthread.php?t=121060 Skinning knife can be used to cut corpses http://www.uodemise.com/forum/showthread.php?t=115248 PlayerVendors will correctly send update packets to the client when hair is changed http://www.uodemise.com/forum/showthread.php?t=120216 Corrections to house sign gump http://www.uodemise.com/forum/showthread.php?t=134406 pet "guarding" system message added http://www.uodemise.com/forum/showthread.php?t=134091 Giant toads should be aggressive http://www.uodemise.com/forum/showthread.php?t=133984 bardiche and halberds are axe tools. http://www.uodemise.com/forum/showthread.php?t=122739
This commit is contained in:
parent
d688c9e0f3
commit
208acafd7e
37 changed files with 1058 additions and 226 deletions
|
|
@ -5,9 +5,15 @@ namespace Server.Items
|
|||
{
|
||||
public class EggBomb : Item
|
||||
{
|
||||
[Constructable]
|
||||
public EggBomb() : base( 0x2809 )
|
||||
public override int LabelNumber
|
||||
{
|
||||
get { return 1030249; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EggBomb() : base( 0x2808 )
|
||||
{
|
||||
// Item ID should be 0x2809 - Temporary solution for clients 7.0.0.0 and up
|
||||
Stackable = Core.ML;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -68,6 +74,9 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( ItemID == 0x2809 ) // Temporary solution for clients 7.0.0.0 and up
|
||||
ItemID = 0x2808;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -153,17 +153,15 @@ namespace Server.Items
|
|||
if ( m_UsesRemaining < 1 )
|
||||
return;
|
||||
|
||||
--m_UsesRemaining;
|
||||
--UsesRemaining;
|
||||
|
||||
if ( m_PoisonCharges > 0 )
|
||||
{
|
||||
--m_PoisonCharges;
|
||||
--PoisonCharges;
|
||||
|
||||
if ( m_PoisonCharges == 0 )
|
||||
m_Poison = null;
|
||||
Poison = null;
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public void ResetUsing()
|
||||
|
|
@ -175,21 +173,19 @@ namespace Server.Items
|
|||
|
||||
public void Unload( Mobile from )
|
||||
{
|
||||
if ( UsesRemaining < 1 )
|
||||
if ( m_UsesRemaining < 1 )
|
||||
return;
|
||||
|
||||
FukiyaDarts darts = new FukiyaDarts( UsesRemaining );
|
||||
FukiyaDarts darts = new FukiyaDarts( m_UsesRemaining );
|
||||
|
||||
darts.Poison = m_Poison;
|
||||
darts.PoisonCharges = m_PoisonCharges;
|
||||
|
||||
from.AddToBackpack( darts );
|
||||
|
||||
m_UsesRemaining = 0;
|
||||
m_PoisonCharges = 0;
|
||||
m_Poison = null;
|
||||
|
||||
InvalidateProperties();
|
||||
UsesRemaining = 0;
|
||||
PoisonCharges = 0;
|
||||
Poison = null;
|
||||
}
|
||||
|
||||
public void Reload( Mobile from, FukiyaDarts darts )
|
||||
|
|
@ -203,49 +199,72 @@ namespace Server.Items
|
|||
}
|
||||
else if ( darts.UsesRemaining > 0 )
|
||||
{
|
||||
bool canload = false;
|
||||
bool poison = false;
|
||||
|
||||
if ( need > darts.UsesRemaining )
|
||||
need = darts.UsesRemaining;
|
||||
|
||||
if ( darts.Poison != null && darts.PoisonCharges > 0 )
|
||||
if( darts.Poison != null && darts.PoisonCharges > 0 )
|
||||
{
|
||||
if ( m_PoisonCharges <= 0 || m_Poison == null || m_Poison.Level <= darts.Poison.Level )
|
||||
{
|
||||
if ( m_Poison != null && m_Poison.Level < darts.Poison.Level )
|
||||
Unload( from );
|
||||
poison = true;
|
||||
|
||||
if( m_Poison == null || ( m_Poison.Level < darts.Poison.Level ))
|
||||
{
|
||||
Unload( from );
|
||||
canload = true;
|
||||
}
|
||||
else if( m_Poison != null && ( m_Poison.Level == darts.Poison.Level ))
|
||||
{
|
||||
canload = true;
|
||||
}
|
||||
}
|
||||
else if( darts.Poison == null || darts.PoisonCharges <= 0 )
|
||||
{
|
||||
if( m_Poison == null || m_PoisonCharges <= 0 )
|
||||
{
|
||||
canload = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( !canload )
|
||||
{
|
||||
from.SendLocalizedMessage( 1070767 ); // Loaded projectile is stronger, unload it first
|
||||
}
|
||||
else
|
||||
{
|
||||
if( poison )
|
||||
{
|
||||
if ( need > darts.PoisonCharges )
|
||||
{
|
||||
need = darts.PoisonCharges;
|
||||
}
|
||||
|
||||
if ( m_Poison == null || m_PoisonCharges <= 0 )
|
||||
m_PoisonCharges = need;
|
||||
{
|
||||
PoisonCharges = need;
|
||||
}
|
||||
else
|
||||
m_PoisonCharges += need;
|
||||
{
|
||||
PoisonCharges += need;
|
||||
}
|
||||
|
||||
m_Poison = darts.Poison;
|
||||
Poison = darts.Poison;
|
||||
|
||||
darts.PoisonCharges -= need;
|
||||
|
||||
if ( darts.PoisonCharges <= 0 )
|
||||
{
|
||||
darts.Poison = null;
|
||||
}
|
||||
}
|
||||
|
||||
m_UsesRemaining += need;
|
||||
darts.UsesRemaining -= need;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1070767 ); // Loaded projectile is stronger, unload it first
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_UsesRemaining += need;
|
||||
UsesRemaining += need;
|
||||
darts.UsesRemaining -= need;
|
||||
}
|
||||
|
||||
if ( darts.UsesRemaining <= 0 )
|
||||
darts.Delete();
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ using Server.ContextMenus;
|
|||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x2790, 0x27DB )]
|
||||
public class LeatherNinjaBelt : BaseWaist, IUsesRemaining
|
||||
public class LeatherNinjaBelt : BaseWaist, IUsesRemaining, IDyable
|
||||
{
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.RegularLeather; } }
|
||||
|
||||
|
|
@ -168,17 +168,15 @@ namespace Server.Items
|
|||
if ( m_UsesRemaining < 1 )
|
||||
return;
|
||||
|
||||
--m_UsesRemaining;
|
||||
--UsesRemaining;
|
||||
|
||||
if ( m_PoisonCharges > 0 )
|
||||
{
|
||||
--m_PoisonCharges;
|
||||
--PoisonCharges;
|
||||
|
||||
if ( m_PoisonCharges == 0 )
|
||||
m_Poison = null;
|
||||
Poison = null;
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public void ResetUsing()
|
||||
|
|
@ -190,21 +188,19 @@ namespace Server.Items
|
|||
|
||||
public void Unload( Mobile from )
|
||||
{
|
||||
if ( UsesRemaining < 1 )
|
||||
if ( m_UsesRemaining < 1 )
|
||||
return;
|
||||
|
||||
Shuriken shuriken = new Shuriken( UsesRemaining );
|
||||
Shuriken shuriken = new Shuriken( m_UsesRemaining );
|
||||
|
||||
shuriken.Poison = m_Poison;
|
||||
shuriken.PoisonCharges = m_PoisonCharges;
|
||||
|
||||
from.AddToBackpack( shuriken );
|
||||
|
||||
m_UsesRemaining = 0;
|
||||
m_PoisonCharges = 0;
|
||||
m_Poison = null;
|
||||
|
||||
InvalidateProperties();
|
||||
UsesRemaining = 0;
|
||||
PoisonCharges = 0;
|
||||
Poison = null;
|
||||
}
|
||||
|
||||
public void Reload( Mobile from, Shuriken shuriken )
|
||||
|
|
@ -218,49 +214,72 @@ namespace Server.Items
|
|||
}
|
||||
else if ( shuriken.UsesRemaining > 0 )
|
||||
{
|
||||
bool canload = false;
|
||||
bool poison = false;
|
||||
|
||||
if ( need > shuriken.UsesRemaining )
|
||||
need = shuriken.UsesRemaining;
|
||||
|
||||
if ( shuriken.Poison != null && shuriken.PoisonCharges > 0 )
|
||||
if( shuriken.Poison != null && shuriken.PoisonCharges > 0 )
|
||||
{
|
||||
if ( m_PoisonCharges <= 0 || m_Poison == shuriken.Poison )
|
||||
{
|
||||
if ( m_Poison != null && m_Poison.Level < shuriken.Poison.Level )
|
||||
Unload( from );
|
||||
poison = true;
|
||||
|
||||
if( m_Poison == null || ( m_Poison.Level < shuriken.Poison.Level ))
|
||||
{
|
||||
Unload( from );
|
||||
canload = true;
|
||||
}
|
||||
else if( m_Poison != null && ( m_Poison.Level == shuriken.Poison.Level ))
|
||||
{
|
||||
canload = true;
|
||||
}
|
||||
}
|
||||
else if( shuriken.Poison == null || shuriken.PoisonCharges <= 0 )
|
||||
{
|
||||
if( m_Poison == null || m_PoisonCharges <= 0 )
|
||||
{
|
||||
canload = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( !canload )
|
||||
{
|
||||
from.SendLocalizedMessage( 1070767 ); // Loaded projectile is stronger, unload it first
|
||||
}
|
||||
else
|
||||
{
|
||||
if( poison )
|
||||
{
|
||||
if ( need > shuriken.PoisonCharges )
|
||||
{
|
||||
need = shuriken.PoisonCharges;
|
||||
}
|
||||
|
||||
if ( m_Poison == null || m_PoisonCharges <= 0 )
|
||||
m_PoisonCharges = need;
|
||||
{
|
||||
PoisonCharges = need;
|
||||
}
|
||||
else
|
||||
m_PoisonCharges += need;
|
||||
{
|
||||
PoisonCharges += need;
|
||||
}
|
||||
|
||||
m_Poison = shuriken.Poison;
|
||||
Poison = shuriken.Poison;
|
||||
|
||||
shuriken.PoisonCharges -= need;
|
||||
|
||||
if ( shuriken.PoisonCharges <= 0 )
|
||||
{
|
||||
shuriken.Poison = null;
|
||||
}
|
||||
}
|
||||
|
||||
m_UsesRemaining += need;
|
||||
shuriken.UsesRemaining -= need;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1070767 ); // Loaded projectile is stronger, unload it first
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_UsesRemaining += need;
|
||||
UsesRemaining += need;
|
||||
shuriken.UsesRemaining -= need;
|
||||
}
|
||||
|
||||
if ( shuriken.UsesRemaining <= 0 )
|
||||
shuriken.Delete();
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,44 +224,13 @@ namespace Server.Items
|
|||
|
||||
m_From.SendGump( new DisguiseGump( m_From, m_Kit, hair, true ) );
|
||||
|
||||
StopTimer( m_From );
|
||||
|
||||
m_Timers[m_From] = Timer.DelayCall( TimeSpan.FromHours( 2.0 ), new TimerStateCallback( OnDisguiseExpire ), m_From );
|
||||
DisguiseTimers.RemoveTimer( m_From );
|
||||
|
||||
DisguiseTimers.CreateTimer( m_From, TimeSpan.FromHours( 2.0 ) );
|
||||
DisguiseTimers.StartTimer( m_From );
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnDisguiseExpire( object state )
|
||||
{
|
||||
Mobile m = (Mobile)state;
|
||||
|
||||
StopTimer( m );
|
||||
|
||||
m.NameMod = null;
|
||||
|
||||
if ( m is PlayerMobile )
|
||||
((PlayerMobile)m).SetHairMods( -1, -1 );
|
||||
}
|
||||
|
||||
public static bool IsDisguised( Mobile m )
|
||||
{
|
||||
return m_Timers.Contains( m );
|
||||
}
|
||||
|
||||
public static bool StopTimer( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Timers[m];
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
t.Stop();
|
||||
m_Timers.Remove( m );
|
||||
}
|
||||
|
||||
return ( t != null );
|
||||
}
|
||||
|
||||
private static Hashtable m_Timers = new Hashtable();
|
||||
|
||||
private static DisguiseEntry[] m_HairEntries = new DisguiseEntry[]
|
||||
{
|
||||
new DisguiseEntry( 8251, 50700, 0, 5, 1011052 ), // Short
|
||||
|
|
@ -306,4 +275,98 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DisguiseTimers
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
new DisguisePersistance();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Player;
|
||||
|
||||
public InternalTimer( Mobile m, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Player = m;
|
||||
Priority = TimerPriority.OneMinute;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Player.NameMod = null;
|
||||
|
||||
if ( m_Player is PlayerMobile )
|
||||
((PlayerMobile)m_Player).SetHairMods( -1, -1 );
|
||||
|
||||
DisguiseTimers.RemoveTimer( m_Player );
|
||||
}
|
||||
}
|
||||
|
||||
public static void CreateTimer( Mobile m, TimeSpan delay )
|
||||
{
|
||||
if ( m != null )
|
||||
if ( !m_Timers.Contains( m ) )
|
||||
m_Timers[m] = new InternalTimer( m, delay );
|
||||
}
|
||||
|
||||
public static void StartTimer( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Timers[m];
|
||||
|
||||
if ( t != null )
|
||||
t.Start();
|
||||
}
|
||||
|
||||
public static bool IsDisguised( Mobile m )
|
||||
{
|
||||
return m_Timers.Contains( m );
|
||||
}
|
||||
|
||||
public static bool StopTimer( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Timers[m];
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
t.Delay = t.Next - DateTime.Now;
|
||||
t.Stop();
|
||||
}
|
||||
|
||||
return ( t != null );
|
||||
}
|
||||
|
||||
public static bool RemoveTimer( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Timers[m];
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
t.Stop();
|
||||
m_Timers.Remove( m );
|
||||
}
|
||||
|
||||
return ( t != null );
|
||||
}
|
||||
|
||||
public static TimeSpan TimeRemaining( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Timers[m];
|
||||
|
||||
if ( t != null )
|
||||
{
|
||||
return t.Next - DateTime.Now;
|
||||
}
|
||||
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
private static Hashtable m_Timers = new Hashtable();
|
||||
|
||||
public static Hashtable Timers
|
||||
{
|
||||
get { return m_Timers; }
|
||||
}
|
||||
}
|
||||
}
|
||||
83
Scripts/Items/Skill Items/Thief/DisguisePersistance.cs
Normal file
83
Scripts/Items/Skill Items/Thief/DisguisePersistance.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DisguisePersistance : Item
|
||||
{
|
||||
private static DisguisePersistance m_Instance;
|
||||
|
||||
public static DisguisePersistance Instance{ get{ return m_Instance; } }
|
||||
|
||||
public override string DefaultName
|
||||
{
|
||||
get { return "Disguise Persistance - Internal"; }
|
||||
}
|
||||
|
||||
public DisguisePersistance() : base( 1 )
|
||||
{
|
||||
Movable = false;
|
||||
|
||||
if ( m_Instance == null || m_Instance.Deleted )
|
||||
m_Instance = this;
|
||||
else
|
||||
base.Delete();
|
||||
}
|
||||
|
||||
public DisguisePersistance( Serial serial ) : base( serial )
|
||||
{
|
||||
m_Instance = this;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
int timerCount = DisguiseTimers.Timers.Count;
|
||||
|
||||
writer.Write( timerCount );
|
||||
|
||||
foreach ( DictionaryEntry entry in DisguiseTimers.Timers )
|
||||
{
|
||||
Mobile m = (Mobile)entry.Key;
|
||||
|
||||
writer.Write( m );
|
||||
writer.Write( ((Timer)entry.Value).Next - DateTime.Now );
|
||||
writer.Write( m.NameMod );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
{
|
||||
Mobile m = reader.ReadMobile();
|
||||
DisguiseTimers.CreateTimer( m, reader.ReadTimeSpan() );
|
||||
m.NameMod = reader.ReadString();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -476,7 +476,10 @@ namespace Server.Items
|
|||
if ( !isShield && armor.MeditationAllowance == ArmorMeditationAllowance.All )
|
||||
m_Props.Set( 3, true ); // remove mage armor from possible properties
|
||||
if ( armor.Resource >= CraftResource.RegularLeather && armor.Resource <= CraftResource.BarbedLeather )
|
||||
{
|
||||
m_Props.Set( 0, true ); // remove lower requirements from possible properties for leather armor
|
||||
m_Props.Set( 2, true ); // remove durability bonus from possible properties
|
||||
}
|
||||
if ( armor.RequiredRace == Race.Elf )
|
||||
m_Props.Set( 7, true ); // elves inherently have night sight and elf only armor doesn't get night sight as a mod
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue