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
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Movement
|
||||
{
|
||||
|
|
@ -14,9 +15,11 @@ namespace Server.Movement
|
|||
|
||||
private static bool m_AlwaysIgnoreDoors;
|
||||
private static bool m_IgnoreMovableImpassables;
|
||||
private static bool m_IgnoreSpellFields;
|
||||
|
||||
public static bool AlwaysIgnoreDoors{ get{ return m_AlwaysIgnoreDoors; } set{ m_AlwaysIgnoreDoors = value; } }
|
||||
public static bool IgnoreMovableImpassables{ get{ return m_IgnoreMovableImpassables; } set{ m_IgnoreMovableImpassables = value; } }
|
||||
public static bool IgnoreSpellFields{ get{ return m_IgnoreSpellFields; } set{ m_IgnoreSpellFields = value; } }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
|
|
@ -27,7 +30,7 @@ namespace Server.Movement
|
|||
{
|
||||
}
|
||||
|
||||
private bool IsOk( bool ignoreDoors, int ourZ, int ourTop, Tile[] tiles, List<Item> items )
|
||||
private bool IsOk( bool ignoreDoors, bool ignoreSpellFields, int ourZ, int ourTop, Tile[] tiles, List<Item> items )
|
||||
{
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
|
|
@ -56,6 +59,9 @@ namespace Server.Movement
|
|||
if ( ignoreDoors && ((flags & TileFlag.Door) != 0 || itemID == 0x692 || itemID == 0x846 || itemID == 0x873 || (itemID >= 0x6F5 && itemID <= 0x6F6)) )
|
||||
continue;
|
||||
|
||||
if ( ignoreSpellFields && ( itemID == 0x82 || itemID == 0x3946 || itemID == 0x3956 ) )
|
||||
continue;
|
||||
|
||||
int checkZ = item.Z;
|
||||
int checkTop = checkZ + itemData.CalcHeight;
|
||||
|
||||
|
|
@ -100,6 +106,7 @@ namespace Server.Movement
|
|||
int checkTop = startZ + PersonHeight;
|
||||
|
||||
bool ignoreDoors = ( m_AlwaysIgnoreDoors || !m.Alive || m.Body.BodyID == 0x3DB || m.IsDeadBondedPet );
|
||||
bool ignoreSpellFields = m is PlayerMobile && map != Map.Felucca;
|
||||
|
||||
#region Tiles
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
|
|
@ -145,7 +152,7 @@ namespace Server.Movement
|
|||
if ( considerLand && landCheck < landCenter && landCenter > ourZ && testTop > landZ )
|
||||
continue;
|
||||
|
||||
if ( IsOk( ignoreDoors, ourZ, testTop, tiles, items ) )
|
||||
if ( IsOk( ignoreDoors, ignoreSpellFields, ourZ, testTop, tiles, items ) )
|
||||
{
|
||||
newZ = ourZ;
|
||||
moveIsOk = true;
|
||||
|
|
@ -199,7 +206,7 @@ namespace Server.Movement
|
|||
if ( considerLand && landCheck < landCenter && landCenter > ourZ && testTop > landZ )
|
||||
continue;
|
||||
|
||||
if ( IsOk( ignoreDoors, ourZ, testTop, tiles, items ) )
|
||||
if ( IsOk( ignoreDoors, ignoreSpellFields, ourZ, testTop, tiles, items ) )
|
||||
{
|
||||
newZ = ourZ;
|
||||
moveIsOk = true;
|
||||
|
|
@ -229,7 +236,7 @@ namespace Server.Movement
|
|||
shouldCheck = false;
|
||||
}
|
||||
|
||||
if ( shouldCheck && IsOk( ignoreDoors, ourZ, testTop, tiles, items ) )
|
||||
if ( shouldCheck && IsOk( ignoreDoors, ignoreSpellFields, ourZ, testTop, tiles, items ) )
|
||||
{
|
||||
newZ = ourZ;
|
||||
moveIsOk = true;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace Server.Engines.Quests.Collector
|
|||
if ( targeted is Mobile )
|
||||
{
|
||||
ImageType image;
|
||||
CaptureResponse response = obj.CaptureImage( targeted.GetType(), out image );
|
||||
CaptureResponse response = obj.CaptureImage(( targeted.GetType().Name=="GreaterMongbat" ? new Mongbat().GetType() : targeted.GetType() ), out image );
|
||||
|
||||
switch ( response )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Engines.Quests.Hag
|
|||
// rabbit's foot
|
||||
new IngredientInfo( 1055021, 5, typeof( Rabbit ), typeof( JackRabbit ) ),
|
||||
// mongbat wing
|
||||
new IngredientInfo( 1055022, 5, typeof( Mongbat ) ),
|
||||
new IngredientInfo( 1055022, 5, typeof( Mongbat ), typeof( GreaterMongbat ) ),
|
||||
// chicken gizzard
|
||||
new IngredientInfo( 1055023, 5, typeof( Chicken ) ),
|
||||
// rat tail
|
||||
|
|
|
|||
|
|
@ -182,8 +182,19 @@ namespace Server.Guilds
|
|||
return true;
|
||||
|
||||
AllianceInfo alliance = guild.Alliance;
|
||||
if( alliance != null && alliance.IsPendingMember( g ) )
|
||||
return true;
|
||||
|
||||
if( alliance != null )
|
||||
{
|
||||
Guild leader = alliance.Leader;
|
||||
|
||||
if ( leader != null )
|
||||
{
|
||||
if ( guild == leader && alliance.IsPendingMember( g ) || g == leader && alliance.IsPendingMember( guild ) )
|
||||
return true;
|
||||
}
|
||||
else if ( alliance.IsPendingMember( g ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,11 @@ namespace Server.Guilds
|
|||
|
||||
public override void PopulateGump()
|
||||
{
|
||||
WarDeclaration war = guild.FindPendingWar( m_Other );
|
||||
WarDeclaration activeWar = guild.FindActiveWar( m_Other );
|
||||
Guild g = Guild.GetAllianceLeader( guild );
|
||||
Guild other = Guild.GetAllianceLeader( m_Other );
|
||||
|
||||
WarDeclaration war = g.FindPendingWar( other );
|
||||
WarDeclaration activeWar = g.FindActiveWar( other );
|
||||
|
||||
AllianceInfo alliance = guild.Alliance;
|
||||
AllianceInfo otherAlliance = m_Other.Alliance;
|
||||
|
|
@ -200,13 +203,16 @@ namespace Server.Guilds
|
|||
return;
|
||||
|
||||
RankDefinition playerRank = pm.GuildRank;
|
||||
|
||||
Guild guildLeader = Guild.GetAllianceLeader( guild );
|
||||
Guild otherGuild = Guild.GetAllianceLeader( m_Other );
|
||||
|
||||
WarDeclaration war = guild.FindPendingWar( m_Other );
|
||||
WarDeclaration activeWar = guild.FindActiveWar( m_Other );
|
||||
WarDeclaration otherWar = m_Other.FindPendingWar( guild );
|
||||
WarDeclaration war = guildLeader.FindPendingWar( otherGuild );
|
||||
WarDeclaration activeWar = guildLeader.FindActiveWar( otherGuild );
|
||||
WarDeclaration otherWar = otherGuild.FindPendingWar( guildLeader );
|
||||
|
||||
AllianceInfo alliance = guild.Alliance;
|
||||
AllianceInfo otherAlliance = m_Other.Alliance;
|
||||
AllianceInfo otherAlliance = otherGuild.Alliance;
|
||||
|
||||
switch( info.ButtonID )
|
||||
{
|
||||
|
|
@ -219,6 +225,11 @@ namespace Server.Guilds
|
|||
{
|
||||
pm.SendLocalizedMessage( 1063440 ); // You don't have permission to negotiate wars.
|
||||
}
|
||||
else if( alliance != null && alliance.Leader != guild )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1063239, String.Format( "{0}\t{1}", guild.Name, alliance.Name ) ); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
pm.SendLocalizedMessage( 1070707, alliance.Leader.Name ); // You need to negotiate via ~1_val~ instead.
|
||||
}
|
||||
else
|
||||
{
|
||||
//Accept the war
|
||||
|
|
@ -226,31 +237,31 @@ namespace Server.Guilds
|
|||
war.WarBeginning = DateTime.Now;
|
||||
guild.AcceptedWars.Add( war );
|
||||
|
||||
if( guild.Alliance != null && guild.Alliance.IsMember( guild ) )
|
||||
if( alliance != null && alliance.IsMember( guild ) )
|
||||
{
|
||||
guild.Alliance.AllianceMessage( 1070769, ((m_Other.Alliance != null) ? m_Other.Alliance.Name : m_Other.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
guild.Alliance.InvalidateMemberProperties();
|
||||
alliance.AllianceMessage( 1070769, ((otherAlliance != null) ? otherAlliance.Name : otherGuild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
alliance.InvalidateMemberProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
guild.GuildMessage( 1070769, ((m_Other.Alliance != null) ? m_Other.Alliance.Name : m_Other.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
guild.GuildMessage( 1070769, ((otherAlliance != null) ? otherAlliance.Name : otherGuild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
guild.InvalidateMemberProperties();
|
||||
}
|
||||
//Technically SHOULD say Your guild is now at war w/out any info, intentional diff.
|
||||
|
||||
m_Other.PendingWars.Remove( otherWar );
|
||||
otherGuild.PendingWars.Remove( otherWar );
|
||||
otherWar.WarBeginning = DateTime.Now;
|
||||
m_Other.AcceptedWars.Add( otherWar );
|
||||
otherGuild.AcceptedWars.Add( otherWar );
|
||||
|
||||
if( m_Other.Alliance != null && m_Other.Alliance.IsMember( m_Other ) )
|
||||
if( otherAlliance != null && m_Other.Alliance.IsMember( m_Other ) )
|
||||
{
|
||||
m_Other.Alliance.AllianceMessage( 1070769, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
m_Other.Alliance.InvalidateMemberProperties();
|
||||
otherAlliance.AllianceMessage( 1070769, ((alliance != null) ? alliance.Name : guild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
otherAlliance.InvalidateMemberProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Other.GuildMessage( 1070769, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
m_Other.InvalidateMemberProperties();
|
||||
otherGuild.GuildMessage( 1070769, ((alliance != null) ? alliance.Name : guild.Name) ); // Guild Message: Your guild is now at war with ~1_GUILDNAME~
|
||||
otherGuild.InvalidateMemberProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -265,9 +276,14 @@ namespace Server.Guilds
|
|||
{
|
||||
pm.SendLocalizedMessage( 1063440 ); // You don't have permission to negotiate wars.
|
||||
}
|
||||
else if( alliance != null && alliance.Leader != guild )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1063239, String.Format( "{0}\t{1}", guild.Name, alliance.Name ) ); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
pm.SendLocalizedMessage( 1070707, alliance.Leader.Name ); // You need to negotiate via ~1_val~ instead.
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.SendGump( new WarDeclarationGump( pm, guild, m_Other ) );
|
||||
pm.SendGump( new WarDeclarationGump( pm, guild, otherGuild ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -280,11 +296,16 @@ namespace Server.Guilds
|
|||
{
|
||||
pm.SendLocalizedMessage( 1063440 ); // You don't have permission to negotiate wars.
|
||||
}
|
||||
else if( alliance != null && alliance.Leader != guild )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1063239, String.Format( "{0}\t{1}", guild.Name, alliance.Name ) ); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
pm.SendLocalizedMessage( 1070707, alliance.Leader.Name ); // You need to negotiate via ~1_val~ instead.
|
||||
}
|
||||
else
|
||||
{
|
||||
//Dismiss the war
|
||||
guild.PendingWars.Remove( war );
|
||||
m_Other.PendingWars.Remove( otherWar );
|
||||
otherGuild.PendingWars.Remove( otherWar );
|
||||
pm.SendLocalizedMessage( 1070752 ); // The proposal has been updated.
|
||||
//Messages to opposing guild? (Testing on OSI says no)
|
||||
}
|
||||
|
|
@ -297,35 +318,40 @@ namespace Server.Guilds
|
|||
{
|
||||
pm.SendLocalizedMessage( 1063440 ); // You don't have permission to negotiate wars.
|
||||
}
|
||||
else if( alliance != null && alliance.Leader != guild )
|
||||
{
|
||||
pm.SendLocalizedMessage( 1063239, String.Format( "{0}\t{1}", guild.Name, alliance.Name ) ); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
pm.SendLocalizedMessage( 1070707, alliance.Leader.Name ); // You need to negotiate via ~1_val~ instead.
|
||||
}
|
||||
else
|
||||
{
|
||||
if( activeWar != null )
|
||||
{
|
||||
if( guild.Alliance != null && guild.Alliance.IsMember( guild ) )
|
||||
if( alliance != null && alliance.IsMember( guild ) )
|
||||
{
|
||||
guild.Alliance.AllianceMessage( 1070740, ((m_Other.Alliance != null) ? m_Other.Alliance.Name : m_Other.Name) );// You have lost the war with ~1_val~.
|
||||
guild.Alliance.InvalidateMemberProperties();
|
||||
alliance.AllianceMessage( 1070740, ((otherAlliance != null) ? otherAlliance.Name : otherGuild.Name) );// You have lost the war with ~1_val~.
|
||||
alliance.InvalidateMemberProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
guild.GuildMessage( 1070740, ((m_Other.Alliance != null) ? m_Other.Alliance.Name : m_Other.Name) );// You have lost the war with ~1_val~.
|
||||
guild.GuildMessage( 1070740, ((otherAlliance != null) ? otherAlliance.Name : otherGuild.Name) );// You have lost the war with ~1_val~.
|
||||
guild.InvalidateMemberProperties();
|
||||
}
|
||||
|
||||
guild.AcceptedWars.Remove( activeWar );
|
||||
|
||||
if( m_Other.Alliance != null && m_Other.Alliance.IsMember( m_Other ) )
|
||||
if( otherAlliance != null && otherAlliance.IsMember( otherGuild ) )
|
||||
{
|
||||
m_Other.Alliance.AllianceMessage( 1070739, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) );// You have won the war against ~1_val~!
|
||||
m_Other.Alliance.InvalidateMemberProperties();
|
||||
otherAlliance.AllianceMessage( 1070739, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) );// You have won the war against ~1_val~!
|
||||
otherAlliance.InvalidateMemberProperties();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Other.GuildMessage( 1070739, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) );// You have won the war against ~1_val~!
|
||||
m_Other.InvalidateMemberProperties();
|
||||
otherGuild.GuildMessage( 1070739, ((guild.Alliance != null) ? guild.Alliance.Name : guild.Name) );// You have won the war against ~1_val~!
|
||||
otherGuild.InvalidateMemberProperties();
|
||||
}
|
||||
|
||||
m_Other.AcceptedWars.Remove( m_Other.FindActiveWar( guild ) );
|
||||
otherGuild.AcceptedWars.Remove( otherGuild.FindActiveWar( guild ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -455,6 +481,10 @@ namespace Server.Guilds
|
|||
{
|
||||
guild.Alliance = null; //Calls alliance.Removeguild
|
||||
// alliance.RemoveGuild( guild );
|
||||
|
||||
m_Other.InvalidateWarNotoriety();
|
||||
|
||||
guild.InvalidateMemberNotoriety();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -471,6 +501,10 @@ namespace Server.Guilds
|
|||
else if( alliance != null && alliance.IsMember( guild ) && alliance.IsMember( m_Other ) )
|
||||
{
|
||||
m_Other.Alliance = null;
|
||||
|
||||
m_Other.InvalidateMemberNotoriety();
|
||||
|
||||
guild.InvalidateWarNotoriety();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,8 +104,9 @@ namespace Server.Gumps
|
|||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
int offset = index % 10;
|
||||
int page = 1 + (index / 10);
|
||||
int xoffset = ((index % 20) / 10) * 200;
|
||||
int yoffset = (index % 10) * 20;
|
||||
int page = 1 + (index / 20);
|
||||
|
||||
if ( page != lastPage )
|
||||
{
|
||||
|
|
@ -148,7 +149,7 @@ namespace Server.Gumps
|
|||
continue;
|
||||
|
||||
if ( button != -1 )
|
||||
AddButton( 10, 150 + (offset * 20), 4005, 4007, GetButtonID( button, i ), GumpButtonType.Reply, 0 );
|
||||
AddButton( 10 + xoffset, 150 + yoffset, 4005, 4007, GetButtonID( button, i ), GumpButtonType.Reply, 0 );
|
||||
|
||||
if ( accountOf && m.Player && m.Account != null )
|
||||
name = "Account of " + name;
|
||||
|
|
@ -156,7 +157,7 @@ namespace Server.Gumps
|
|||
if ( leadingStar )
|
||||
name = "* " + name;
|
||||
|
||||
AddLabel( button > 0 ? 45 : 10, 150 + (offset * 20), labelHue, name );
|
||||
AddLabel( button > 0 ? 45 + xoffset : 10 + xoffset, 150 + yoffset, labelHue, name );
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -896,6 +896,8 @@ namespace Server.Gumps
|
|||
}
|
||||
default:
|
||||
{
|
||||
int hairhue = 0;
|
||||
|
||||
if ( (info.ButtonID & 0x100) != 0 ) // Hair style selected
|
||||
{
|
||||
int index = info.ButtonID & 0xFF;
|
||||
|
|
@ -905,8 +907,15 @@ namespace Server.Gumps
|
|||
|
||||
HairOrBeard hairStyle = m_HairStyles[index];
|
||||
|
||||
hairhue = m_Vendor.HairHue;
|
||||
|
||||
m_Vendor.HairItemID = 0;
|
||||
m_Vendor.ProcessDelta();
|
||||
|
||||
m_Vendor.HairItemID = hairStyle.ItemID;
|
||||
|
||||
m_Vendor.HairHue = hairhue;
|
||||
|
||||
from.SendGump( new NewPlayerVendorCustomizeGump( m_Vendor ) );
|
||||
}
|
||||
else if ( (info.ButtonID & 0x200) != 0 ) // Beard style selected
|
||||
|
|
@ -921,8 +930,15 @@ namespace Server.Gumps
|
|||
|
||||
HairOrBeard beardStyle = m_BeardStyles[index];
|
||||
|
||||
hairhue = m_Vendor.FacialHairHue;
|
||||
|
||||
m_Vendor.FacialHairItemID = 0;
|
||||
m_Vendor.ProcessDelta();
|
||||
|
||||
m_Vendor.FacialHairItemID = beardStyle.ItemID;
|
||||
|
||||
m_Vendor.FacialHairHue = hairhue;
|
||||
|
||||
from.SendGump( new NewPlayerVendorCustomizeGump( m_Vendor ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ namespace Server.Items
|
|||
[Flipable]
|
||||
public class ParagonChest : LockableContainer
|
||||
{
|
||||
public override int LabelNumber{ get{ return 3000541; } }
|
||||
|
||||
private static int[] m_ItemIDs = new int[]
|
||||
{
|
||||
0x9AB, 0xE40, 0xE41, 0xE7C
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,7 @@ namespace Server.Items
|
|||
}
|
||||
else if ( dead is BaseCreature )
|
||||
{
|
||||
((BaseCreature)dead).OnCarve( from, this );
|
||||
((BaseCreature)dead).OnCarve( from, this, item );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -147,6 +147,11 @@ namespace Server.Items
|
|||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
base.ScissorHelper( from, new Leather(), 1 );
|
||||
|
||||
return true;
|
||||
|
|
@ -190,6 +195,12 @@ namespace Server.Items
|
|||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new SpinedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
|
|
@ -233,6 +244,12 @@ namespace Server.Items
|
|||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new HornedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
|
|
@ -276,6 +293,12 @@ namespace Server.Items
|
|||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
if ( !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new BarbedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Server.Items
|
|||
public class LegacyOfTheDreadLord : Bardiche
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1060860; } } // Legacy of the Dread Lord
|
||||
public override int ArtifactRarity{ get{ return 11; } }
|
||||
public override int ArtifactRarity{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ namespace Server.Guilds
|
|||
|
||||
m_PendingMembers.Remove( g );
|
||||
m_Members.Add( g );
|
||||
g.InvalidateMemberProperties();
|
||||
g.Alliance.InvalidateMemberProperties();
|
||||
}
|
||||
|
||||
public void RemoveGuild( Guild g )
|
||||
|
|
@ -528,7 +528,6 @@ namespace Server.Guilds
|
|||
if( m_Opponent.FindPendingWar( m_Guild ) != null && m_Guild.FindPendingWar( m_Opponent ) != null )
|
||||
return WarStatus.Pending;
|
||||
|
||||
|
||||
if( w == null )
|
||||
return WarStatus.Win;
|
||||
|
||||
|
|
@ -796,6 +795,16 @@ namespace Server.Guilds
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Guild GetAllianceLeader( Guild g )
|
||||
{
|
||||
AllianceInfo alliance = g.Alliance;
|
||||
|
||||
if ( alliance != null && alliance.Leader != null && alliance.IsMember( g ) )
|
||||
return alliance.Leader;
|
||||
|
||||
return g;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
@ -837,8 +846,6 @@ namespace Server.Guilds
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void CheckExpiredWars()
|
||||
{
|
||||
for( int i = 0; i < AcceptedWars.Count; i++ )
|
||||
|
|
@ -924,15 +931,20 @@ namespace Server.Guilds
|
|||
if( killer == null || victim.Guild == null || killer.Guild == null )
|
||||
return;
|
||||
|
||||
Guild victimGuild = victim.Guild as Guild;
|
||||
Guild killerGuild = killer.Guild as Guild;
|
||||
|
||||
Guild victimGuild = GetAllianceLeader( victim.Guild as Guild );
|
||||
Guild killerGuild = GetAllianceLeader( killer.Guild as Guild );
|
||||
|
||||
WarDeclaration war = killerGuild.FindActiveWar( victimGuild );
|
||||
if( war != null )
|
||||
war.Kills++;
|
||||
|
||||
victimGuild.CheckExpiredWars();
|
||||
killerGuild.CheckExpiredWars();
|
||||
if( war == null )
|
||||
return;
|
||||
|
||||
war.Kills++;
|
||||
|
||||
if ( war.Opponent == victimGuild )
|
||||
killerGuild.CheckExpiredWars();
|
||||
else
|
||||
victimGuild.CheckExpiredWars();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -1033,7 +1045,29 @@ namespace Server.Guilds
|
|||
m_Members[i].Delta( MobileDelta.Noto );
|
||||
}
|
||||
}
|
||||
|
||||
public void InvalidateWarNotoriety()
|
||||
{
|
||||
Guild g = GetAllianceLeader( this );
|
||||
|
||||
if ( g.Alliance != null )
|
||||
g.Alliance.InvalidateMemberNotoriety();
|
||||
else
|
||||
g.InvalidateMemberNotoriety();
|
||||
|
||||
if ( g.AcceptedWars == null )
|
||||
return;
|
||||
|
||||
foreach ( WarDeclaration warDec in g.AcceptedWars )
|
||||
{
|
||||
Guild opponent = warDec.Opponent;
|
||||
|
||||
if ( opponent.Alliance != null )
|
||||
opponent.Alliance.InvalidateMemberNotoriety();
|
||||
else
|
||||
opponent.InvalidateMemberNotoriety();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Leader
|
||||
|
|
@ -1145,21 +1179,12 @@ namespace Server.Guilds
|
|||
|
||||
if( NewGuildSystem )
|
||||
{
|
||||
if( FindActiveWar( g ) != null )
|
||||
Guild guild = GetAllianceLeader( this );
|
||||
Guild otherGuild = GetAllianceLeader( g );
|
||||
|
||||
if ( guild.FindActiveWar( otherGuild ) != null )
|
||||
return true;
|
||||
|
||||
AllianceInfo thisAlliace = this.Alliance;
|
||||
|
||||
if( thisAlliace != null && this != thisAlliace.Leader && thisAlliace.Leader != null && thisAlliace.IsMember( this ) )
|
||||
if( thisAlliace.Leader.FindActiveWar( g ) != null )
|
||||
return true;
|
||||
|
||||
AllianceInfo otherAlliance = g.Alliance;
|
||||
|
||||
if( otherAlliance != null && otherAlliance.Leader != null && otherAlliance.Leader != g && otherAlliance.IsMember( g ) )
|
||||
if( FindActiveWar( otherAlliance.Leader ) != null )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1388,6 +1413,11 @@ namespace Server.Guilds
|
|||
|
||||
if( m is PlayerMobile )
|
||||
((PlayerMobile)m).GuildRank = RankDefinition.Lowest;
|
||||
|
||||
Guild guild = m.Guild as Guild;
|
||||
|
||||
if ( guild != null )
|
||||
guild.InvalidateWarNotoriety();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1400,8 +1430,11 @@ namespace Server.Guilds
|
|||
if ( m_Members.Contains( m ) )
|
||||
{
|
||||
m_Members.Remove( m );
|
||||
m.Guild = null;
|
||||
|
||||
Guild guild = m.Guild as Guild;
|
||||
|
||||
m.Guild = null;
|
||||
|
||||
if( m is PlayerMobile )
|
||||
((PlayerMobile)m).GuildRank = RankDefinition.Lowest;
|
||||
|
||||
|
|
@ -1418,6 +1451,11 @@ namespace Server.Guilds
|
|||
|
||||
if ( m_Members.Count == 0 )
|
||||
Disband();
|
||||
|
||||
if ( guild != null )
|
||||
guild.InvalidateWarNotoriety();
|
||||
|
||||
m.Delta( MobileDelta.Noto );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ namespace Server.Misc
|
|||
}
|
||||
|
||||
private static TimeSpan m_StatGainDelay = TimeSpan.FromMinutes( 15.0 );
|
||||
private static TimeSpan m_PetStatGainDelay = TimeSpan.FromMinutes( 5.0 );
|
||||
|
||||
public static void GainStat( Mobile from, Stat stat )
|
||||
{
|
||||
|
|
@ -340,7 +341,11 @@ namespace Server.Misc
|
|||
{
|
||||
case Stat.Str:
|
||||
{
|
||||
if( (from.LastStrGain + m_StatGainDelay) >= DateTime.Now )
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastStrGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
}
|
||||
else if( (from.LastStrGain + m_StatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
|
||||
from.LastStrGain = DateTime.Now;
|
||||
|
|
@ -348,7 +353,11 @@ namespace Server.Misc
|
|||
}
|
||||
case Stat.Dex:
|
||||
{
|
||||
if( (from.LastDexGain + m_StatGainDelay) >= DateTime.Now )
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastDexGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
}
|
||||
else if( (from.LastDexGain + m_StatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
|
||||
from.LastDexGain = DateTime.Now;
|
||||
|
|
@ -356,7 +365,12 @@ namespace Server.Misc
|
|||
}
|
||||
case Stat.Int:
|
||||
{
|
||||
if( (from.LastIntGain + m_StatGainDelay) >= DateTime.Now )
|
||||
if ( from is BaseCreature && ((BaseCreature)from).Controlled ) {
|
||||
if ( (from.LastIntGain + m_PetStatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
}
|
||||
|
||||
else if( (from.LastIntGain + m_StatGainDelay) >= DateTime.Now )
|
||||
return;
|
||||
|
||||
from.LastIntGain = DateTime.Now;
|
||||
|
|
|
|||
|
|
@ -1059,6 +1059,8 @@ namespace Server.Mobiles
|
|||
m_Mobile.PlaySound( m_Mobile.GetIdleSound() );
|
||||
m_Mobile.Warmode = true;
|
||||
m_Mobile.Combatant = null;
|
||||
string petname = String.Format( "{0}", m_Mobile.Name );
|
||||
m_Mobile.ControlMaster.SendLocalizedMessage ( 1049671, petname ); //~1_PETNAME~ is now guarding you.
|
||||
break;
|
||||
|
||||
case OrderType.Attack:
|
||||
|
|
@ -1285,6 +1287,7 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
m_Mobile.Warmode = false;
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1453,6 +1456,7 @@ namespace Server.Mobiles
|
|||
m_Mobile.DebugSay( "Nothing to guard from" );
|
||||
|
||||
m_Mobile.Warmode = false;
|
||||
m_Mobile.CurrentSpeed = 0.1;
|
||||
|
||||
WalkMobileRange( controlMaster, 1, false, 0, 1 );
|
||||
}
|
||||
|
|
@ -1469,8 +1473,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_Mobile.DebugSay( "I think he might be dead. He's not anywhere around here at least. That's cool. I'm glad he's dead." );
|
||||
|
||||
m_Mobile.ControlTarget = null;
|
||||
m_Mobile.ControlOrder = OrderType.None;
|
||||
m_Mobile.ControlTarget = m_Mobile.ControlMaster;
|
||||
m_Mobile.ControlOrder = OrderType.Follow;
|
||||
|
||||
if( m_Mobile.FightMode == FightMode.Closest || m_Mobile.FightMode == FightMode.Aggressor )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Server.Items;
|
|||
using Server.Mobiles;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.PartySystem;
|
||||
using Server.Factions;
|
||||
using Server.Spells.Bushido;
|
||||
using Server.Spells.Spellweaving;
|
||||
|
|
@ -1264,7 +1265,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
}
|
||||
|
||||
public virtual void OnCarve( Mobile from, Corpse corpse )
|
||||
public virtual void OnCarve( Mobile from, Corpse corpse, Item with )
|
||||
{
|
||||
int feathers = Feathers;
|
||||
int wool = Wool;
|
||||
|
|
@ -1318,16 +1319,43 @@ namespace Server.Mobiles
|
|||
|
||||
if ( hides != 0 )
|
||||
{
|
||||
if ( HideType == HideType.Regular )
|
||||
corpse.DropItem( new Hides( hides ) );
|
||||
else if ( HideType == HideType.Spined )
|
||||
corpse.DropItem( new SpinedHides( hides ) );
|
||||
else if ( HideType == HideType.Horned )
|
||||
corpse.DropItem( new HornedHides( hides ) );
|
||||
else if ( HideType == HideType.Barbed )
|
||||
corpse.DropItem( new BarbedHides( hides ) );
|
||||
Item holding = from.Weapon as Item;
|
||||
if ( Core.AOS && ( holding is SkinningKnife /* TODO: || holding is ButcherWarCleaver || with is ButcherWarCleaver */ ) )
|
||||
{
|
||||
Item leather = null;
|
||||
|
||||
from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
|
||||
switch ( HideType )
|
||||
{
|
||||
case HideType.Regular: leather = new Leather( hides ); break;
|
||||
case HideType.Spined: leather = new SpinedLeather( hides ); break;
|
||||
case HideType.Horned: leather = new HornedLeather( hides ); break;
|
||||
case HideType.Barbed: leather = new BarbedLeather( hides ); break;
|
||||
}
|
||||
|
||||
if ( leather != null )
|
||||
{
|
||||
if ( !from.PlaceInBackpack( leather ) )
|
||||
{
|
||||
corpse.DropItem( leather );
|
||||
from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1073555 ); // You skin it and place the cut-up hides in your backpack.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( HideType == HideType.Regular )
|
||||
corpse.DropItem( new Hides( hides ) );
|
||||
else if ( HideType == HideType.Spined )
|
||||
corpse.DropItem( new SpinedHides( hides ) );
|
||||
else if ( HideType == HideType.Horned )
|
||||
corpse.DropItem( new HornedHides( hides ) );
|
||||
else if ( HideType == HideType.Barbed )
|
||||
corpse.DropItem( new BarbedHides( hides ) );
|
||||
|
||||
from.SendLocalizedMessage( 500471 ); // You skin it, and the hides are now in the corpse.
|
||||
}
|
||||
}
|
||||
|
||||
if ( scales != 0 )
|
||||
|
|
@ -1959,7 +1987,7 @@ namespace Server.Mobiles
|
|||
|
||||
if ( master != null && master == from ) //So friends can't start the bonding process
|
||||
{
|
||||
if ( m_dMinTameSkill <= 29.1 || master.Skills[SkillName.AnimalTaming].Base >= m_dMinTameSkill || OverrideBondingReqs() )
|
||||
if ( m_dMinTameSkill <= 29.1 || master.Skills[SkillName.AnimalTaming].Base >= m_dMinTameSkill || OverrideBondingReqs() || (Core.ML && master.Skills[SkillName.AnimalTaming].Value >= m_dMinTameSkill) )
|
||||
{
|
||||
if ( BondingBegin == DateTime.MinValue )
|
||||
{
|
||||
|
|
@ -4325,7 +4353,10 @@ namespace Server.Mobiles
|
|||
int totalKarma = -Karma / 100;
|
||||
|
||||
List<DamageStore> list = GetLootingRights( this.DamageEntries, this.HitsMax );
|
||||
|
||||
List<Mobile> titles = new List<Mobile>();
|
||||
List<int> fame = new List<int>();
|
||||
List<int> karma = new List<int>();
|
||||
|
||||
bool givenQuestKill = false;
|
||||
bool givenFactionKill = false;
|
||||
bool givenToTKill = false;
|
||||
|
|
@ -4337,8 +4368,41 @@ namespace Server.Mobiles
|
|||
if ( !ds.m_HasRight )
|
||||
continue;
|
||||
|
||||
Titles.AwardFame( ds.m_Mobile, totalFame, true );
|
||||
Titles.AwardKarma( ds.m_Mobile, totalKarma, true );
|
||||
Party party = Engines.PartySystem.Party.Get( ds.m_Mobile );
|
||||
|
||||
if ( party != null )
|
||||
{
|
||||
int divedFame = totalFame / party.Members.Count;
|
||||
int divedKarma = totalKarma / party.Members.Count;
|
||||
|
||||
for ( int j = 0; j < party.Members.Count; ++j )
|
||||
{
|
||||
PartyMemberInfo info = party.Members[ j ] as PartyMemberInfo;
|
||||
|
||||
if ( info != null && info.Mobile != null )
|
||||
{
|
||||
int index = titles.IndexOf( info.Mobile );
|
||||
|
||||
if ( index == -1 )
|
||||
{
|
||||
titles.Add( info.Mobile );
|
||||
fame.Add( divedFame );
|
||||
karma.Add( divedKarma );
|
||||
}
|
||||
else
|
||||
{
|
||||
fame[ index ] += divedFame;
|
||||
karma[ index ] += divedKarma;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
titles.Add( ds.m_Mobile );
|
||||
fame.Add( totalFame );
|
||||
karma.Add( totalKarma );
|
||||
}
|
||||
|
||||
OnKilledBy( ds.m_Mobile );
|
||||
|
||||
|
|
@ -4370,6 +4434,11 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
}
|
||||
for ( int i = 0; i < titles.Count; ++i )
|
||||
{
|
||||
Titles.AwardFame( titles[ i ], fame[ i ], true );
|
||||
Titles.AwardKarma( titles[ i ], karma[ i ], true );
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDeath( c );
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
public class GiantToad : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GiantToad() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
public GiantToad() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a giant toad";
|
||||
Body = 80;
|
||||
|
|
@ -60,7 +60,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 0);
|
||||
writer.Write((int) 1);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
|
|
@ -68,6 +68,11 @@ namespace Server.Mobiles
|
|||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
if ( version < 1 )
|
||||
{
|
||||
AI = AIType.AI_Melee;
|
||||
FightMode = FightMode.Closest;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15,12 +15,12 @@ namespace Server.Mobiles
|
|||
public static Type[] ArtifactRarity11 { get { return m_ArtifactRarity11; } }
|
||||
private static Type[] m_ArtifactRarity10 = new Type[]
|
||||
{
|
||||
typeof( LegacyOfTheDreadLord ),
|
||||
typeof( TheTaskmaster )
|
||||
};
|
||||
|
||||
private static Type[] m_ArtifactRarity11 = new Type[]
|
||||
{
|
||||
typeof( LegacyOfTheDreadLord ),
|
||||
typeof( TheDragonSlayer ),
|
||||
typeof( ArmorOfFortune ),
|
||||
typeof( GauntletsOfNobility ),
|
||||
|
|
|
|||
296
Scripts/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs
Normal file
296
Scripts/Mobiles/Monsters/LBR/Meers/EnragedCreatures.cs
Normal file
|
|
@ -0,0 +1,296 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hare corpse" )]
|
||||
public class EnragedRabbit : BaseEnraged
|
||||
{
|
||||
public EnragedRabbit( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a rabbit";
|
||||
Body = 0xcd;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
public EnragedRabbit( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a deer corpse" )]
|
||||
public class EnragedHart : BaseEnraged
|
||||
{
|
||||
public EnragedHart( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a great hart";
|
||||
Body = 0xea;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
public EnragedHart( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a deer corpse" )]
|
||||
public class EnragedHind : BaseEnraged
|
||||
{
|
||||
public EnragedHind( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a hind";
|
||||
Body = 0xed;
|
||||
}
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
public EnragedHind( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a bear corpse" )]
|
||||
public class EnragedBlackBear : BaseEnraged
|
||||
{
|
||||
public EnragedBlackBear( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "a black bear";
|
||||
Body = 0xd3;
|
||||
BaseSoundID = 0xa3;
|
||||
}
|
||||
public EnragedBlackBear( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "an eagle corpse" )]
|
||||
public class EnragedEagle : BaseEnraged
|
||||
{
|
||||
public EnragedEagle( Mobile summoner ) : base( summoner )
|
||||
{
|
||||
Name = "an eagle";
|
||||
Body = 0x5;
|
||||
BaseSoundID = 0x2ee;
|
||||
}
|
||||
public EnragedEagle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BaseEnraged : BaseCreature
|
||||
{
|
||||
public BaseEnraged( Mobile summoner )
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
SetStr( 50, 200 );
|
||||
SetDex( 50, 200 );
|
||||
SetHits( 50, 200 );
|
||||
SetStam( 50, 200 );
|
||||
|
||||
/*
|
||||
On OSI, all stats are random 50-200, but
|
||||
str is never less than hits, and dex is never
|
||||
less than stam.
|
||||
*/
|
||||
|
||||
if( Str < Hits )
|
||||
Str = Hits;
|
||||
if( Dex < Stam )
|
||||
Dex = Stam;
|
||||
|
||||
Karma = -1000;
|
||||
Tamable = false;
|
||||
|
||||
SummonMaster = summoner;
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
|
||||
if( SummonMaster == null || SummonMaster.Deleted )
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
|
||||
/*
|
||||
On OSI, without combatant, they behave as if they have been
|
||||
given "come" command, ie they wander towards their summoner,
|
||||
but never actually "follow".
|
||||
*/
|
||||
|
||||
else if( !Combat( this ))
|
||||
{
|
||||
if( AIObject != null )
|
||||
{
|
||||
AIObject.MoveTo( SummonMaster, false , 5 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
On OSI, if the summon attacks a mobile, the summoner meer also
|
||||
attacks them, regardless of karma, etc. as long as the combatant
|
||||
is a player or controlled/summoned, and the summoner is not already
|
||||
engaged in combat.
|
||||
*/
|
||||
|
||||
else if( !Combat( SummonMaster ))
|
||||
{
|
||||
BaseCreature bc = null;
|
||||
if( Combatant is BaseCreature )
|
||||
{
|
||||
bc = (BaseCreature)Combatant;
|
||||
}
|
||||
if( Combatant.Player || ( bc != null && ( bc.Controlled || bc.SummonMaster != null )))
|
||||
{
|
||||
SummonMaster.Combatant = Combatant;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnThink();
|
||||
}
|
||||
}
|
||||
|
||||
private bool Combat( Mobile mobile )
|
||||
{
|
||||
Mobile combatant = mobile.Combatant;
|
||||
if( combatant == null || combatant.Deleted )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( combatant.IsDeadBondedPet || !combatant.Alive )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1060768, from.NetState ); // enraged
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
list.Add( 1060768 ); // enraged
|
||||
}
|
||||
|
||||
public BaseEnraged( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,11 +88,64 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 20, 30 ) );
|
||||
|
||||
// TODO: Forest summon ability
|
||||
if( combatant is BaseCreature )
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)combatant;
|
||||
|
||||
this.Say( true, "I call a plague of insects to sting your flesh!" );
|
||||
if( bc.Controlled )
|
||||
{
|
||||
combatant = bc.ControlMaster;
|
||||
}
|
||||
}
|
||||
|
||||
m_Table[combatant] = Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 7.0 ), new TimerStateCallback( DoEffect ), new object[]{ combatant, 0 } );
|
||||
if( Utility.RandomDouble() < .1 )
|
||||
{
|
||||
int[][] coord =
|
||||
{
|
||||
new int[]{-4,-6}, new int[]{4,-6}, new int[]{0,-8}, new int[]{-5,5}, new int[]{5,5}
|
||||
};
|
||||
|
||||
BaseCreature rabid;
|
||||
|
||||
for( int i=0; i<5; i++ )
|
||||
{
|
||||
switch( i )
|
||||
{
|
||||
case 0: rabid = new EnragedRabbit( this ); break;
|
||||
case 1: rabid = new EnragedHind( this ); break;
|
||||
case 2: rabid = new EnragedHart( this ); break;
|
||||
case 3: rabid = new EnragedBlackBear( this ); break;
|
||||
default: rabid = new EnragedEagle( this ); break;
|
||||
}
|
||||
|
||||
rabid.FocusMob = combatant;
|
||||
|
||||
int x = combatant.X + coord[i][0];
|
||||
int y = combatant.Y + coord[i][1];
|
||||
|
||||
/*
|
||||
Once in a while OSI's dont spawn all 5, and
|
||||
I can only attribute this to a bad spawn location
|
||||
so I will do this.
|
||||
*/
|
||||
|
||||
Point3D loc = new Point3D( x, y, combatant.Map.GetAverageZ( x, y ));
|
||||
if ( combatant.Map.CanSpawnMobile( loc ) )
|
||||
{
|
||||
rabid.MoveToWorld( loc, combatant.Map ) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
rabid.Delete();
|
||||
}
|
||||
}
|
||||
this.Say( 1071932 ); //Creatures of the forest, I call to thee! Aid me in the fight against all that is evil!
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Say( true, "I call a plague of insects to sting your flesh!" );
|
||||
m_Table[combatant] = Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), TimeSpan.FromSeconds( 7.0 ), new TimerStateCallback( DoEffect ), new object[]{ combatant, 0 } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -377,6 +377,12 @@ namespace Server.Mobiles
|
|||
get{ return m_AnkhNextUse; }
|
||||
set{ m_AnkhNextUse = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public TimeSpan DisguiseTimeLeft
|
||||
{
|
||||
get{ return DisguiseTimers.TimeRemaining( this ); }
|
||||
}
|
||||
|
||||
private DateTime m_PeacedUntil;
|
||||
|
||||
|
|
@ -928,6 +934,8 @@ namespace Server.Mobiles
|
|||
pm.BedrollLogout = false;
|
||||
pm.LastOnline = DateTime.Now;
|
||||
}
|
||||
|
||||
DisguiseTimers.StartTimer( e.Mobile );
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerStateCallback( ClearSpecialMovesCallback ), e.Mobile );
|
||||
}
|
||||
|
|
@ -980,6 +988,8 @@ namespace Server.Mobiles
|
|||
pm.m_SpeechLog = null;
|
||||
pm.LastOnline = DateTime.Now;
|
||||
}
|
||||
|
||||
DisguiseTimers.StopTimer( from );
|
||||
}
|
||||
|
||||
public override void RevealingAction()
|
||||
|
|
@ -2047,7 +2057,7 @@ namespace Server.Mobiles
|
|||
|
||||
PolymorphSpell.StopTimer( this );
|
||||
IncognitoSpell.StopTimer( this );
|
||||
DisguiseGump.StopTimer( this );
|
||||
DisguiseTimers.RemoveTimer( this );
|
||||
|
||||
EndAction( typeof( PolymorphSpell ) );
|
||||
EndAction( typeof( IncognitoSpell ) );
|
||||
|
|
@ -2643,9 +2653,6 @@ namespace Server.Mobiles
|
|||
m_HairModHue = reader.ReadInt();
|
||||
m_BeardModID = reader.ReadInt();
|
||||
m_BeardModHue = reader.ReadInt();
|
||||
|
||||
// We cannot call SetHairMods( -1, -1 ) here because the items have not yet loaded
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RevertHair ) );
|
||||
}
|
||||
|
||||
goto case 9;
|
||||
|
|
@ -2963,6 +2970,8 @@ namespace Server.Mobiles
|
|||
faction.RemoveMember( this );
|
||||
|
||||
BaseHouse.HandleDeletion( this );
|
||||
|
||||
DisguiseTimers.RemoveTimer( this );
|
||||
}
|
||||
|
||||
public override bool NewGuildDisplay { get { return Server.Guilds.Guild.NewGuildSystem; } }
|
||||
|
|
@ -4083,7 +4092,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
if ( Core.SE && AllFollowers.Count > 0 )
|
||||
{
|
||||
for ( int i = 0; i < m_AllFollowers.Count; ++i )
|
||||
for ( int i = m_AllFollowers.Count - 1; i >= 0; --i )
|
||||
{
|
||||
BaseCreature pet = AllFollowers[i] as BaseCreature;
|
||||
|
||||
|
|
@ -4096,7 +4105,7 @@ namespace Server.Mobiles
|
|||
if ( (pet is PackLlama || pet is PackHorse || pet is Beetle || pet is HordeMinionFamiliar) && (pet.Backpack != null && pet.Backpack.Items.Count > 0) )
|
||||
continue;
|
||||
|
||||
if ( !pet.Summoned && !pet.IsBonded )
|
||||
if ( pet is BaseEscortable )
|
||||
continue;
|
||||
|
||||
pet.ControlTarget = null;
|
||||
|
|
@ -4112,41 +4121,37 @@ namespace Server.Mobiles
|
|||
|
||||
Stabled.Add( pet );
|
||||
m_AutoStabled.Add( pet );
|
||||
--i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ClaimAutoStabledPets()
|
||||
{
|
||||
if( !Core.SE || m_AutoStabled.Count <= 0 )
|
||||
if ( !Core.SE || m_AutoStabled.Count <= 0 )
|
||||
return;
|
||||
|
||||
if( !Alive )
|
||||
if ( !Alive )
|
||||
{
|
||||
SendLocalizedMessage( 1076251 ); // Your pet was unable to join you while you are a ghost. Please re-login once you have ressurected to claim your pets.
|
||||
return;
|
||||
}
|
||||
|
||||
for ( int i = 0; i < m_AutoStabled.Count; ++i )
|
||||
for ( int i = m_AutoStabled.Count - 1; i >= 0; --i )
|
||||
{
|
||||
BaseCreature pet = m_AutoStabled[i] as BaseCreature;
|
||||
|
||||
if ( pet == null || pet.Deleted )
|
||||
{
|
||||
pet.IsStabled = false;
|
||||
m_AutoStabled.RemoveAt( i );
|
||||
if( Stabled.Contains( pet ) )
|
||||
|
||||
if ( Stabled.Contains( pet ) )
|
||||
Stabled.Remove( pet );
|
||||
--i;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( (Followers + pet.ControlSlots) <= FollowersMax )
|
||||
{
|
||||
m_AutoStabled.RemoveAt( i );
|
||||
--i;
|
||||
|
||||
pet.SetControlMaster( this );
|
||||
|
||||
if ( pet.Summoned )
|
||||
|
|
@ -4161,7 +4166,7 @@ namespace Server.Mobiles
|
|||
|
||||
pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy
|
||||
|
||||
if( Stabled.Contains( pet ) )
|
||||
if ( Stabled.Contains( pet ) )
|
||||
Stabled.Remove( pet );
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1305,8 +1305,19 @@ namespace Server.Mobiles
|
|||
}
|
||||
else
|
||||
{
|
||||
OpenBackpack( from );
|
||||
|
||||
if ( WasNamed( e.Speech ) )
|
||||
OpenBackpack( from );
|
||||
else
|
||||
{
|
||||
IPooledEnumerable mobiles = e.Mobile.GetMobilesInRange( 2 );
|
||||
|
||||
foreach ( Mobile m in mobiles )
|
||||
if ( m is PlayerVendor && m.CanSee( e.Mobile ) && m.InLOS( e.Mobile ) )
|
||||
((PlayerVendor)m).OpenBackpack( from );
|
||||
|
||||
mobiles.Free();
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ namespace Server.Multis
|
|||
public static bool NewVendorSystem{ get{ return Core.AOS; } } // Is new player vendor system enabled?
|
||||
|
||||
public const int MaxCoOwners = 15;
|
||||
public const int MaxFriends = 50;
|
||||
public const int MaxBans = 50;
|
||||
public static int MaxFriends { get { return !Core.AOS ? 50 : 140; } }
|
||||
public static int MaxBans { get { return !Core.AOS ? 50 : 140; } }
|
||||
|
||||
public const bool DecayEnabled = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ namespace Server.SkillHandlers
|
|||
foodPref = 1049568; // Fish
|
||||
else if ( (c.FavoriteFood & FoodType.Meat) != 0 )
|
||||
foodPref = 1049564; // Meat
|
||||
else if ( (c.FavoriteFood & FoodType.Eggs) != 0 )
|
||||
foodPref = 1044477; // Eggs
|
||||
|
||||
AddHtmlLocalized( 153, 168, 160, 18, foodPref, LabelColor, false, false );
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
m_Thief.SendLocalizedMessage( 1010581 ); // You cannot steal the sigil when you are incognito
|
||||
}
|
||||
else if ( DisguiseGump.IsDisguised( m_Thief ) )
|
||||
else if ( DisguiseTimers.IsDisguised( m_Thief ) )
|
||||
{
|
||||
m_Thief.SendLocalizedMessage( 1010583 ); // You cannot steal the sigil while disguised
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1188,6 +1188,11 @@ namespace Server.Spells
|
|||
{
|
||||
caster.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
|
||||
}
|
||||
else if ( DisguiseTimers.IsDisguised( caster ) )
|
||||
{
|
||||
caster.SendLocalizedMessage( 1061631 ); // You can't do that while disguised.
|
||||
return false;
|
||||
}
|
||||
else if( AnimalForm.UnderTransformation( caster ) )
|
||||
{
|
||||
caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Server.Spells.Chivalry
|
|||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.PlaySound( 0x20F );
|
||||
Caster.PlaySound( Caster.Body.IsFemale ? 0x338 : 0x44A );
|
||||
Caster.PlaySound( Caster.Female ? 0x338 : 0x44A );
|
||||
Caster.FixedParticles( 0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist );
|
||||
Caster.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist );
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,10 @@ namespace Server.Spells.Fifth
|
|||
{
|
||||
Caster.SendLocalizedMessage( 1042402 ); // You cannot use incognito while wearing body paint
|
||||
}
|
||||
else if ( DisguiseTimers.IsDisguised( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061631 ); // You can't do that while disguised.
|
||||
}
|
||||
else if ( !Caster.CanBeginAction( typeof( PolymorphSpell ) ) || Caster.IsBodyMod )
|
||||
{
|
||||
DoFizzle();
|
||||
|
|
@ -70,7 +74,7 @@ namespace Server.Spells.Fifth
|
|||
{
|
||||
if ( Caster.BeginAction( typeof( IncognitoSpell ) ) )
|
||||
{
|
||||
DisguiseGump.StopTimer( Caster );
|
||||
DisguiseTimers.StopTimer( Caster );
|
||||
|
||||
Caster.HueMod = Caster.Race.RandomSkinHue();
|
||||
Caster.NameMod = Caster.Female ? NameList.RandomName( "female" ) : NameList.RandomName( "male" );
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Server;
|
|||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells.Fifth;
|
||||
using Server.Spells.Seventh;
|
||||
|
||||
|
|
@ -55,6 +56,11 @@ namespace Server.Spells.Ninjitsu
|
|||
Caster.SendLocalizedMessage( 1063219 ); // You cannot mimic an animal while in that form.
|
||||
return false;
|
||||
}
|
||||
else if ( DisguiseTimers.IsDisguised( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061631 ); // You can't do that while disguised.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.CheckCast();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Server.Targeting;
|
|||
using Server.Network;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Spells.Seventh
|
||||
{
|
||||
|
|
@ -99,6 +100,7 @@ namespace Server.Spells.Seventh
|
|||
private class InternalItem : Item
|
||||
{
|
||||
private Timer m_Timer;
|
||||
private Mobile m_Caster;
|
||||
|
||||
public override bool BlocksFit{ get{ return true; } }
|
||||
|
||||
|
|
@ -110,6 +112,8 @@ namespace Server.Spells.Seventh
|
|||
|
||||
MoveToWorld( loc, map );
|
||||
|
||||
m_Caster = caster;
|
||||
|
||||
if ( caster.InLOS( this ) )
|
||||
Visible = true;
|
||||
else
|
||||
|
|
@ -142,6 +146,19 @@ namespace Server.Spells.Seventh
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
int noto;
|
||||
|
||||
if ( m is PlayerMobile )
|
||||
{
|
||||
noto = Notoriety.Compute( m_Caster, m );
|
||||
if ( noto == Notoriety.Enemy || noto == Notoriety.Ally )
|
||||
return false;
|
||||
}
|
||||
return base.OnMoveOver( m );
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Server.Spells.Seventh
|
|||
Caster.SendLocalizedMessage( 1061633 ); // You cannot polymorph while in that form.
|
||||
return false;
|
||||
}
|
||||
else if ( DisguiseGump.IsDisguised( Caster ) )
|
||||
else if ( DisguiseTimers.IsDisguised( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502167 ); // You cannot polymorph while disguised.
|
||||
return false;
|
||||
|
|
@ -105,7 +105,7 @@ namespace Server.Spells.Seventh
|
|||
{
|
||||
Caster.SendLocalizedMessage( 1061633 ); // You cannot polymorph while in that form.
|
||||
}
|
||||
else if ( DisguiseGump.IsDisguised( Caster ) )
|
||||
else if ( DisguiseTimers.IsDisguised( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502167 ); // You cannot polymorph while disguised.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Server.Targeting;
|
|||
using Server.Network;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Spells.Third
|
||||
{
|
||||
|
|
@ -92,16 +93,19 @@ namespace Server.Spells.Third
|
|||
{
|
||||
private Timer m_Timer;
|
||||
private DateTime m_End;
|
||||
private Mobile m_Caster;
|
||||
|
||||
public override bool BlocksFit{ get{ return true; } }
|
||||
|
||||
public InternalItem( Point3D loc, Map map, Mobile caster ) : base( 0x80 )
|
||||
public InternalItem( Point3D loc, Map map, Mobile caster ) : base( 0x82 )
|
||||
{
|
||||
Visible = false;
|
||||
Movable = false;
|
||||
|
||||
MoveToWorld( loc, map );
|
||||
|
||||
m_Caster = caster;
|
||||
|
||||
if ( caster.InLOS( this ) )
|
||||
Visible = true;
|
||||
else
|
||||
|
|
@ -160,6 +164,19 @@ namespace Server.Spells.Third
|
|||
}
|
||||
}
|
||||
|
||||
public override bool OnMoveOver( Mobile m )
|
||||
{
|
||||
int noto;
|
||||
|
||||
if ( m is PlayerMobile )
|
||||
{
|
||||
noto = Notoriety.Compute( m_Caster, m );
|
||||
if ( noto == Notoriety.Enemy || noto == Notoriety.Ally )
|
||||
return false;
|
||||
}
|
||||
return base.OnMoveOver( m );
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue