SE+ can not report murder on same player 2x in less than 10 min.

This commit is contained in:
xavier 2010-12-15 01:08:35 +00:00
parent ba5373c1cf
commit 1a79ffbbc7
2 changed files with 131 additions and 81 deletions

View file

@ -1,9 +1,6 @@
using System; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Server;
using Server.Misc; using Server.Misc;
using Server.Gumps;
using Server.Network; using Server.Network;
using Server.Mobiles; using Server.Mobiles;
@ -19,7 +16,7 @@ namespace Server.Gumps
{ {
EventSink.PlayerDeath += new PlayerDeathEventHandler( EventSink_PlayerDeath ); EventSink.PlayerDeath += new PlayerDeathEventHandler( EventSink_PlayerDeath );
} }
public static void EventSink_PlayerDeath( PlayerDeathEventArgs e ) public static void EventSink_PlayerDeath( PlayerDeathEventArgs e )
{ {
Mobile m = e.Mobile; Mobile m = e.Mobile;
@ -31,9 +28,12 @@ namespace Server.Gumps
{ {
if ( ai.Attacker.Player && ai.CanReportMurder && !ai.Reported ) if ( ai.Attacker.Player && ai.CanReportMurder && !ai.Reported )
{ {
killers.Add( ai.Attacker ); if (!Core.SE || !((PlayerMobile)m).RecentlyReported.Contains(ai.Attacker))
ai.Reported = true; {
ai.CanReportMurder = false; killers.Add(ai.Attacker);
ai.Reported = true;
ai.CanReportMurder = false;
}
} }
if ( ai.Attacker.Player && (DateTime.Now - ai.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( ai.Attacker ) ) if ( ai.Attacker.Player && (DateTime.Now - ai.LastCombatTime) < TimeSpan.FromSeconds( 30.0 ) && !toGive.Contains( ai.Attacker ) )
toGive.Add( ai.Attacker ); toGive.Add( ai.Attacker );
@ -70,7 +70,6 @@ namespace Server.Gumps
if ( killers.Count > 0 ) if ( killers.Count > 0 )
new GumpTimer( m, killers ).Start(); new GumpTimer( m, killers ).Start();
} }
private class GumpTimer : Timer private class GumpTimer : Timer
@ -102,14 +101,14 @@ namespace Server.Gumps
BuildGump(); BuildGump();
} }
private void BuildGump() private void BuildGump()
{ {
AddBackground( 265, 205, 320, 290, 5054 ); AddBackground( 265, 205, 320, 290, 5054 );
Closable = false; Closable = false;
Resizable = false; Resizable = false;
AddPage( 0 ); AddPage( 0 );
AddImageTiled( 225, 175, 50, 45, 0xCE ); //Top left corner AddImageTiled( 225, 175, 50, 45, 0xCE ); //Top left corner
AddImageTiled( 267, 175, 315, 44, 0xC9 ); //Top bar AddImageTiled( 267, 175, 315, 44, 0xC9 ); //Top bar
AddImageTiled( 582, 175, 43, 45, 0xCF ); //Top right corner AddImageTiled( 582, 175, 43, 45, 0xCF ); //Top right corner
@ -120,15 +119,28 @@ namespace Server.Gumps
AddImageTiled( 582, 489, 43, 43, 0xCD ); //Lower right corner AddImageTiled( 582, 489, 43, 43, 0xCD ); //Lower right corner
AddPage( 1 ); AddPage( 1 );
AddHtml( 260, 234, 300, 140, ((Mobile)m_Killers[m_Idx]).Name, false, false ); // Player's Name AddHtml( 260, 234, 300, 140, ((Mobile)m_Killers[m_Idx]).Name, false, false ); // Player's Name
AddHtmlLocalized( 260, 254, 300, 140, 1049066, false, false ); // Would you like to report... AddHtmlLocalized( 260, 254, 300, 140, 1049066, false, false ); // Would you like to report...
AddButton( 260, 300, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 ); AddButton( 260, 300, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 300, 300, 300, 50, 1046362, false, false ); // Yes AddHtmlLocalized( 300, 300, 300, 50, 1046362, false, false ); // Yes
AddButton( 360, 300, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 ); AddButton( 360, 300, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 400, 300, 300, 50, 1046363, false, false ); // No AddHtmlLocalized( 400, 300, 300, 50, 1046363, false, false ); // No
}
public static void ReportedListExpiry_Callback( object state )
{
object[] states = (object[])state;
PlayerMobile from = (PlayerMobile)states[0];
Mobile killer = (Mobile)states[1];
if (from.RecentlyReported.Contains(killer))
{
from.RecentlyReported.Remove(killer);
}
} }
public override void OnResponse( NetState state, RelayInfo info ) public override void OnResponse( NetState state, RelayInfo info )
@ -137,29 +149,41 @@ namespace Server.Gumps
switch ( info.ButtonID ) switch ( info.ButtonID )
{ {
case 1: case 1:
{ {
Mobile killer = m_Killers[m_Idx]; Mobile killer = m_Killers[m_Idx];
if ( killer != null && !killer.Deleted ) if ( killer != null && !killer.Deleted )
{ {
killer.Kills++; killer.Kills++;
killer.ShortTermMurders++; killer.ShortTermMurders++;
if ( killer is PlayerMobile ) if (Core.SE)
((PlayerMobile)killer).ResetKillTime(); {
((PlayerMobile)from).RecentlyReported.Add(killer);
Timer.DelayCall(TimeSpan.FromMinutes(10), new TimerStateCallback(ReportedListExpiry_Callback), new object[] { from, killer });
}
killer.SendLocalizedMessage( 1049067 );//You have been reported for murder! if (killer is PlayerMobile)
{
PlayerMobile pk = (PlayerMobile)killer;
pk.ResetKillTime();
pk.SendLocalizedMessage(1049067);//You have been reported for murder!
if ( killer.Kills == 5 ) if (pk.Kills == 5)
killer.SendLocalizedMessage( 502134 );//You are now known as a murderer! {
else if ( SkillHandlers.Stealing.SuspendOnMurder && killer.Kills == 1 && killer is PlayerMobile && ((PlayerMobile)killer).NpcGuild == NpcGuild.ThievesGuild ) pk.SendLocalizedMessage(502134);//You are now known as a murderer!
killer.SendLocalizedMessage( 501562 ); // You have been suspended by the Thieves Guild. }
else if (SkillHandlers.Stealing.SuspendOnMurder && pk.Kills == 1 && pk.NpcGuild == NpcGuild.ThievesGuild)
{
pk.SendLocalizedMessage(501562); // You have been suspended by the Thieves Guild.
}
}
} }
break; break;
} }
case 2: case 2:
{ {
break; break;
} }
} }
@ -168,4 +192,4 @@ namespace Server.Gumps
from.SendGump( new ReportMurdererGump( from, m_Killers, m_Idx ) ); from.SendGump( new ReportMurdererGump( from, m_Killers, m_Idx ) );
} }
} }
} }

View file

@ -1,7 +1,6 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Server;
using Server.Misc; using Server.Misc;
using Server.Items; using Server.Items;
using Server.Gumps; using Server.Gumps;
@ -11,7 +10,6 @@ using Server.ContextMenus;
using Server.Network; using Server.Network;
using Server.Spells; using Server.Spells;
using Server.Spells.Fifth; using Server.Spells.Fifth;
using Server.Spells.Sixth;
using Server.Spells.Seventh; using Server.Spells.Seventh;
using Server.Spells.Necromancy; using Server.Spells.Necromancy;
using Server.Spells.Ninjitsu; using Server.Spells.Ninjitsu;
@ -86,10 +84,10 @@ namespace Server.Mobiles
} }
public DateTime TimeStamp { get{ return m_Stamp; } } public DateTime TimeStamp { get{ return m_Stamp; } }
public int Count public int Count
{ {
get { return m_Count; } get { return m_Count; }
set { m_Count = value; m_Stamp = DateTime.Now; } set { m_Count = value; m_Stamp = DateTime.Now; }
} }
} }
@ -106,12 +104,12 @@ namespace Server.Mobiles
private bool m_IgnoreMobiles; // IgnoreMobiles should be moved to Server.Mobiles private bool m_IgnoreMobiles; // IgnoreMobiles should be moved to Server.Mobiles
private int m_NonAutoreinsuredItems; // number of items that could not be automaitically reinsured because gold in bank was not enough private int m_NonAutoreinsuredItems; // number of items that could not be automaitically reinsured because gold in bank was not enough
private bool m_NinjaWepCooldown; private bool m_NinjaWepCooldown;
/* /*
* a value of zero means, that the mobile is not executing the spell. Otherwise, * a value of zero means, that the mobile is not executing the spell. Otherwise,
* the value should match the BaseMana required * the value should match the BaseMana required
*/ */
private int m_ExecutesLightningStrike; // move to Server.Mobiles?? private int m_ExecutesLightningStrike; // move to Server.Mobiles??
private DateTime m_LastOnline; private DateTime m_LastOnline;
private Server.Guilds.RankDefinition m_GuildRank; private Server.Guilds.RankDefinition m_GuildRank;
@ -119,8 +117,22 @@ namespace Server.Mobiles
private List<Mobile> m_AutoStabled; private List<Mobile> m_AutoStabled;
private List<Mobile> m_AllFollowers; private List<Mobile> m_AllFollowers;
private List<Mobile> m_RecentlyReported;
#region Getters & Setters #region Getters & Setters
public List<Mobile> RecentlyReported
{
get
{
return m_RecentlyReported;
}
set
{
m_RecentlyReported = value;
}
}
public List<Mobile> AutoStabled { get { return m_AutoStabled; } } public List<Mobile> AutoStabled { get { return m_AutoStabled; } }
public bool NinjaWepCooldown public bool NinjaWepCooldown
@ -136,13 +148,13 @@ namespace Server.Mobiles
} }
public List<Mobile> AllFollowers public List<Mobile> AllFollowers
{ {
get get
{ {
if( m_AllFollowers == null ) if( m_AllFollowers == null )
m_AllFollowers = new List<Mobile>();; m_AllFollowers = new List<Mobile>();
return m_AllFollowers; return m_AllFollowers;
} }
} }
public Server.Guilds.RankDefinition GuildRank public Server.Guilds.RankDefinition GuildRank
@ -152,7 +164,7 @@ namespace Server.Mobiles
if( this.AccessLevel >= AccessLevel.GameMaster ) if( this.AccessLevel >= AccessLevel.GameMaster )
return Server.Guilds.RankDefinition.Leader; return Server.Guilds.RankDefinition.Leader;
else else
return m_GuildRank; return m_GuildRank;
} }
set{ m_GuildRank = value; } set{ m_GuildRank = value; }
} }
@ -190,7 +202,7 @@ namespace Server.Mobiles
get { return m_IsStealthing; } get { return m_IsStealthing; }
set { m_IsStealthing = value; } set { m_IsStealthing = value; }
} }
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public bool IgnoreMobiles // IgnoreMobiles should be moved to Server.Mobiles public bool IgnoreMobiles // IgnoreMobiles should be moved to Server.Mobiles
{ {
@ -207,7 +219,7 @@ namespace Server.Mobiles
} }
} }
} }
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public NpcGuild NpcGuild public NpcGuild NpcGuild
{ {
@ -415,6 +427,7 @@ namespace Server.Mobiles
m_RecoverableAmmo.Clear(); m_RecoverableAmmo.Clear();
} }
} }
#endregion #endregion
private DateTime m_AnkhNextUse; private DateTime m_AnkhNextUse;
@ -425,7 +438,7 @@ namespace Server.Mobiles
get{ return m_AnkhNextUse; } get{ return m_AnkhNextUse; }
set{ m_AnkhNextUse = value; } set{ m_AnkhNextUse = value; }
} }
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public TimeSpan DisguiseTimeLeft public TimeSpan DisguiseTimeLeft
{ {
@ -489,16 +502,16 @@ namespace Server.Mobiles
return false; return false;
IPooledEnumerable mobiles = Map.GetMobilesInRange( location, 0 ); IPooledEnumerable mobiles = Map.GetMobilesInRange( location, 0 );
foreach ( Mobile m in mobiles ) foreach ( Mobile m in mobiles )
{ {
if ( m.Z >= location.Z && m.Z < location.Z + 16 ) if ( m.Z >= location.Z && m.Z < location.Z + 16 )
{ {
mobiles.Free(); mobiles.Free();
return false; return false;
} }
} }
mobiles.Free(); mobiles.Free();
BounceInfo bi = item.GetBounce(); BounceInfo bi = item.GetBounce();
@ -554,24 +567,24 @@ namespace Server.Mobiles
return true; return true;
} }
public override int GetPacketFlags() public override int GetPacketFlags()
{ {
int flags = base.GetPacketFlags(); int flags = base.GetPacketFlags();
if ( m_IgnoreMobiles ) if ( m_IgnoreMobiles )
flags |= 0x10; flags |= 0x10;
return flags; return flags;
} }
public override int GetOldPacketFlags() public override int GetOldPacketFlags()
{ {
int flags = base.GetOldPacketFlags(); int flags = base.GetOldPacketFlags();
if ( m_IgnoreMobiles ) if ( m_IgnoreMobiles )
flags |= 0x10; flags |= 0x10;
return flags; return flags;
} }
@ -1039,7 +1052,7 @@ namespace Server.Mobiles
pm.BedrollLogout = false; pm.BedrollLogout = false;
pm.LastOnline = DateTime.Now; pm.LastOnline = DateTime.Now;
} }
DisguiseTimers.StartTimer( e.Mobile ); DisguiseTimers.StartTimer( e.Mobile );
Timer.DelayCall( TimeSpan.Zero, new TimerStateCallback( ClearSpecialMovesCallback ), e.Mobile ); Timer.DelayCall( TimeSpan.Zero, new TimerStateCallback( ClearSpecialMovesCallback ), e.Mobile );
@ -1093,7 +1106,7 @@ namespace Server.Mobiles
pm.m_SpeechLog = null; pm.m_SpeechLog = null;
pm.LastOnline = DateTime.Now; pm.LastOnline = DateTime.Now;
} }
DisguiseTimers.StopTimer( from ); DisguiseTimers.StopTimer( from );
} }
@ -1105,7 +1118,7 @@ namespace Server.Mobiles
Spells.Sixth.InvisibilitySpell.RemoveTimer( this ); Spells.Sixth.InvisibilitySpell.RemoveTimer( this );
base.RevealingAction(); base.RevealingAction();
m_IsStealthing = false; // IsStealthing should be moved to Server.Mobiles m_IsStealthing = false; // IsStealthing should be moved to Server.Mobiles
} }
@ -1398,7 +1411,7 @@ namespace Server.Mobiles
{ {
SkillName.ArmsLore, SkillName.Begging, SkillName.Discordance, SkillName.Forensics, SkillName.ArmsLore, SkillName.Begging, SkillName.Discordance, SkillName.Forensics,
SkillName.Inscribe, SkillName.ItemID, SkillName.Meditation, SkillName.Peacemaking, SkillName.Inscribe, SkillName.ItemID, SkillName.Meditation, SkillName.Peacemaking,
SkillName.Provocation, SkillName.RemoveTrap, SkillName.SpiritSpeak, SkillName.Stealing, SkillName.Provocation, SkillName.RemoveTrap, SkillName.SpiritSpeak, SkillName.Stealing,
SkillName.TasteID SkillName.TasteID
}; };
@ -1517,9 +1530,9 @@ namespace Server.Mobiles
} }
} }
} }
BaseHouse curhouse = BaseHouse.FindHouseAt( this ); BaseHouse curhouse = BaseHouse.FindHouseAt( this );
if( curhouse != null ) if( curhouse != null )
{ {
if ( Alive && Core.Expansion >= Expansion.AOS && curhouse.IsAosRules && curhouse.IsFriend( from ) ) if ( Alive && Core.Expansion >= Expansion.AOS && curhouse.IsAosRules && curhouse.IsFriend( from ) )
@ -1695,6 +1708,7 @@ namespace Server.Mobiles
} }
} }
} }
#endregion #endregion
private void GetVendor() private void GetVendor()
@ -1747,6 +1761,7 @@ namespace Server.Mobiles
base.DisruptiveAction(); base.DisruptiveAction();
} }
public override void OnDoubleClick( Mobile from ) public override void OnDoubleClick( Mobile from )
{ {
if ( this == from && !Warmode ) if ( this == from && !Warmode )
@ -1980,7 +1995,6 @@ namespace Server.Mobiles
return base.CheckShove( shoved ); return base.CheckShove( shoved );
} }
protected override void OnMapChange( Map oldMap ) protected override void OnMapChange( Map oldMap )
{ {
if ( (Map != Faction.Facet && oldMap == Faction.Facet) || (Map == Faction.Facet && oldMap != Faction.Facet) ) if ( (Map != Faction.Facet && oldMap == Faction.Facet) || (Map == Faction.Facet && oldMap != Faction.Facet) )
@ -2053,7 +2067,7 @@ namespace Server.Mobiles
if ( this.Alive && !wasAlive ) if ( this.Alive && !wasAlive )
{ {
Item deathRobe = new DeathRobe(); Item deathRobe = new DeathRobe();
if ( !EquipItem( deathRobe ) ) if ( !EquipItem( deathRobe ) )
deathRobe.Delete(); deathRobe.Delete();
} }
@ -2425,6 +2439,7 @@ namespace Server.Mobiles
m_VisList = new List<Mobile>(); m_VisList = new List<Mobile>();
m_PermaFlags = new List<Mobile>(); m_PermaFlags = new List<Mobile>();
m_AntiMacroTable = new Hashtable(); m_AntiMacroTable = new Hashtable();
m_RecentlyReported = new List<Mobile>();
m_BOBFilter = new Engines.BulkOrders.BOBFilter(); m_BOBFilter = new Engines.BulkOrders.BOBFilter();
@ -2532,10 +2547,10 @@ namespace Server.Mobiles
Mobile oath = Spells.Necromancy.BloodOathSpell.GetBloodOath( from ); Mobile oath = Spells.Necromancy.BloodOathSpell.GetBloodOath( from );
/* Per EA's UO Herald Pub48 (ML): /* Per EA's UO Herald Pub48 (ML):
* ((resist spellsx10)/20 + 10=percentage of damage resisted) * ((resist spellsx10)/20 + 10=percentage of damage resisted)
*/ */
if ( oath == this ) if ( oath == this )
{ {
amount = (int)(amount * 1.1); amount = (int)(amount * 1.1);
@ -2559,6 +2574,7 @@ namespace Server.Mobiles
} }
#region Poison #region Poison
public override ApplyPoisonResult ApplyPoison( Mobile from, Poison poison ) public override ApplyPoisonResult ApplyPoison( Mobile from, Poison poison )
{ {
if ( !Alive ) if ( !Alive )
@ -2590,6 +2606,7 @@ namespace Server.Mobiles
else else
base.OnPoisonImmunity( from, poison ); base.OnPoisonImmunity( from, poison );
} }
#endregion #endregion
public PlayerMobile( Serial s ) : base( s ) public PlayerMobile( Serial s ) : base( s )
@ -2692,13 +2709,13 @@ namespace Server.Mobiles
goto case 27; goto case 27;
} }
case 27: case 27:
{ {
m_AnkhNextUse = reader.ReadDateTime(); m_AnkhNextUse = reader.ReadDateTime();
goto case 26; goto case 26;
} }
case 26: case 26:
{ {
m_AutoStabled = reader.ReadStrongMobileList(); m_AutoStabled = reader.ReadStrongMobileList();
@ -2908,6 +2925,9 @@ namespace Server.Mobiles
} }
} }
if (m_RecentlyReported == null)
m_RecentlyReported = new List<Mobile>();
// Professions weren't verified on 1.0 RC0 // Professions weren't verified on 1.0 RC0
if ( !CharacterCreation.VerifyProfession( m_Profession ) ) if ( !CharacterCreation.VerifyProfession( m_Profession ) )
m_Profession = 0; m_Profession = 0;
@ -2929,7 +2949,7 @@ namespace Server.Mobiles
if( m_ChampionTitles == null ) if( m_ChampionTitles == null )
m_ChampionTitles = new ChampionTitleInfo(); m_ChampionTitles = new ChampionTitleInfo();
if ( AccessLevel > AccessLevel.Player ) if ( AccessLevel > AccessLevel.Player )
m_IgnoreMobiles = true; m_IgnoreMobiles = true;
@ -2948,10 +2968,10 @@ namespace Server.Mobiles
if( Hidden ) //Hiding is the only buff where it has an effect that's serialized. if( Hidden ) //Hiding is the only buff where it has an effect that's serialized.
AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) ); AddBuff( new BuffInfo( BuffIcon.HidingAndOrStealth, 1075655 ) );
} }
public override void Serialize( GenericWriter writer ) public override void Serialize( GenericWriter writer )
{ {
//cleanup our anti-macro table //cleanup our anti-macro table
foreach ( Hashtable t in m_AntiMacroTable.Values ) foreach ( Hashtable t in m_AntiMacroTable.Values )
{ {
ArrayList remove = new ArrayList(); ArrayList remove = new ArrayList();
@ -2970,7 +2990,7 @@ namespace Server.Mobiles
CheckAtrophies( this ); CheckAtrophies( this );
base.Serialize( writer ); base.Serialize( writer );
writer.Write( (int) 28 ); // version writer.Write( (int) 28 ); // version
writer.Write( (DateTime) m_PeacedUntil ); writer.Write( (DateTime) m_PeacedUntil );
@ -3264,7 +3284,7 @@ namespace Server.Mobiles
else if( AllowedStealthSteps-- <= 0 ) else if( AllowedStealthSteps-- <= 0 )
{ {
Server.SkillHandlers.Stealth.OnUse( this ); Server.SkillHandlers.Stealth.OnUse( this );
} }
} }
else else
{ {
@ -3422,7 +3442,7 @@ namespace Server.Mobiles
IgnoreMobiles = false; IgnoreMobiles = false;
else else
IgnoreMobiles = true; IgnoreMobiles = true;
InvalidateMyRunUO(); InvalidateMyRunUO();
} }
@ -3440,6 +3460,7 @@ namespace Server.Mobiles
InvalidateMyRunUO(); InvalidateMyRunUO();
} }
#endregion #endregion
#region Fastwalk Prevention #region Fastwalk Prevention
@ -3497,6 +3518,7 @@ namespace Server.Mobiles
return ( ts < FastwalkThreshold ); return ( ts < FastwalkThreshold );
} }
#endregion #endregion
#region Enemy of One #region Enemy of One
@ -3545,6 +3567,7 @@ namespace Server.Mobiles
} }
} }
} }
#endregion #endregion
#region Hair and beard mods #region Hair and beard mods
@ -3605,6 +3628,7 @@ namespace Server.Mobiles
} }
CreateHair( hair, id, 0 ); CreateHair( hair, id, 0 );
} }
#endregion #endregion
#region Virtues #region Virtues
@ -3848,6 +3872,7 @@ namespace Server.Mobiles
{ {
this.SendGump( new YoungDeathNotice() ); this.SendGump( new YoungDeathNotice() );
} }
#endregion #endregion
#region Speech log #region Speech log
@ -3865,6 +3890,7 @@ namespace Server.Mobiles
m_SpeechLog.Add( e.Mobile, e.Speech ); m_SpeechLog.Add( e.Mobile, e.Speech );
} }
} }
#endregion #endregion
#region Champion Titles #region Champion Titles
@ -3933,13 +3959,12 @@ namespace Server.Mobiles
writer.WriteEncodedInt( info.m_Value ); writer.WriteEncodedInt( info.m_Value );
writer.Write( info.m_LastDecay ); writer.Write( info.m_LastDecay );
} }
} }
private TitleInfo[] m_Values; private TitleInfo[] m_Values;
private int m_Harrower; //Harrower titles do NOT decay private int m_Harrower; //Harrower titles do NOT decay
public int GetValue( ChampionSpawnType type ) public int GetValue( ChampionSpawnType type )
{ {
return GetValue( (int)type ); return GetValue( (int)type );
@ -4055,7 +4080,7 @@ namespace Server.Mobiles
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public int VerminHorde { get { return GetValue( ChampionSpawnType.VerminHorde ); } set { SetValue( ChampionSpawnType.VerminHorde, value ); } } public int VerminHorde { get { return GetValue( ChampionSpawnType.VerminHorde ); } set { SetValue( ChampionSpawnType.VerminHorde, value ); } }
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public int Harrower { get { return m_Harrower; } set { m_Harrower = value; } } public int Harrower { get { return m_Harrower; } set { m_Harrower = value; } }
@ -4152,15 +4177,16 @@ namespace Server.Mobiles
t.m_Harrower = Math.Max( count, t.m_Harrower ); //Harrower titles never decay. t.m_Harrower = Math.Max( count, t.m_Harrower ); //Harrower titles never decay.
} }
} }
#endregion #endregion
#region Recipes #region Recipes
private Dictionary<int, bool> m_AcquiredRecipes; private Dictionary<int, bool> m_AcquiredRecipes;
public virtual bool HasRecipe( Recipe r ) public virtual bool HasRecipe( Recipe r )
{ {
if( r == null ) if( r == null )
return false; return false;
return HasRecipe( r.ID ); return HasRecipe( r.ID );
@ -4192,11 +4218,11 @@ namespace Server.Mobiles
{ {
m_AcquiredRecipes = null; m_AcquiredRecipes = null;
} }
[CommandProperty( AccessLevel.GameMaster )] [CommandProperty( AccessLevel.GameMaster )]
public int KnownRecipes public int KnownRecipes
{ {
get get
{ {
if( m_AcquiredRecipes == null ) if( m_AcquiredRecipes == null )
return 0; return 0;
@ -4204,7 +4230,6 @@ namespace Server.Mobiles
return m_AcquiredRecipes.Count; return m_AcquiredRecipes.Count;
} }
} }
#endregion #endregion
@ -4278,6 +4303,7 @@ namespace Server.Mobiles
if( m_BuffTable.Count <= 0 ) if( m_BuffTable.Count <= 0 )
m_BuffTable = null; m_BuffTable = null;
} }
#endregion #endregion
public void AutoStablePets() public void AutoStablePets()
@ -4334,7 +4360,7 @@ namespace Server.Mobiles
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. 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; return;
} }