diff --git a/Scripts/Accounting/AccountHandler.cs b/Scripts/Accounting/AccountHandler.cs
index 155796518..f740daf18 100644
--- a/Scripts/Accounting/AccountHandler.cs
+++ b/Scripts/Accounting/AccountHandler.cs
@@ -319,7 +319,7 @@ namespace Server.Misc
if ( acct == null )
{
- if ( AutoAccountCreation && un.Trim().Length > 0 ) //To prevent someone from making an account of just '' or a bunch of meaningless spaces
+ if ( AutoAccountCreation && un.Trim().Length > 0 ) // To prevent someone from making an account of just '' or a bunch of meaningless spaces
{
e.State.Account = acct = CreateAccount( e.State, un, pw );
e.Accepted = acct == null ? false : acct.CheckAccess( e.State );
@@ -412,5 +412,24 @@ namespace Server.Misc
if ( !e.Accepted )
AccountAttackLimiter.RegisterInvalidAccess( e.State );
}
+
+ public static bool CheckAccount( Mobile mobCheck, Mobile accCheck )
+ {
+ if ( accCheck != null )
+ {
+ Account a = accCheck.Account as Account;
+
+ if ( a != null )
+ {
+ for ( int i = 0; i < a.Length; ++i )
+ {
+ if ( a[i] == mobCheck )
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/Scripts/Engines/Craft/Core/CraftGumpItem.cs b/Scripts/Engines/Craft/Core/CraftGumpItem.cs
index 0c5e63e19..3a86c895c 100644
--- a/Scripts/Engines/Craft/Core/CraftGumpItem.cs
+++ b/Scripts/Engines/Craft/Core/CraftGumpItem.cs
@@ -141,7 +141,7 @@ namespace Server.Engines.Craft
if ( minSkill < 0 )
minSkill = 0;
- AddHtmlLocalized( 170, 132 + (i * 20), 200, 18, 1044060 + (int)skill.SkillToMake, LabelColor, false, false );
+ AddHtmlLocalized( 170, 132 + (i * 20), 200, 18, AosSkillBonuses.GetLabel( skill.SkillToMake ), LabelColor, false, false );
AddLabel( 430, 132 + (i * 20), LabelHue, String.Format( "{0:F1}", minSkill ) );
}
diff --git a/Scripts/Gumps/ConfirmHouseResize.cs b/Scripts/Gumps/ConfirmHouseResize.cs
index 7446dedbb..1035f217c 100644
--- a/Scripts/Gumps/ConfirmHouseResize.cs
+++ b/Scripts/Gumps/ConfirmHouseResize.cs
@@ -87,11 +87,11 @@ namespace Server.Gumps
return;
}
-
if ( m_Mobile.AccessLevel >= AccessLevel.GameMaster )
{
m_Mobile.SendMessage( "You do not get a refund for your house as you are not a player" );
- m_House.RemoveKeys(m_Mobile);
+ m_House.RemoveKeys( m_Mobile );
+ new TempNoHousingRegion( m_House, m_Mobile );
m_House.Delete();
}
else
diff --git a/Scripts/Items/Construction/Signs/SubtextSign.cs b/Scripts/Items/Construction/Signs/SubtextSign.cs
index 5129feb3a..122061e6d 100644
--- a/Scripts/Items/Construction/Signs/SubtextSign.cs
+++ b/Scripts/Items/Construction/Signs/SubtextSign.cs
@@ -32,7 +32,7 @@ namespace Server.Items
{
base.OnSingleClick( from );
- if ( m_Subtext != null )
+ if ( !String.IsNullOrEmpty( m_Subtext ) )
LabelTo( from, m_Subtext );
}
@@ -40,7 +40,7 @@ namespace Server.Items
{
base.AddNameProperties( list );
- if ( m_Subtext != null )
+ if ( !String.IsNullOrEmpty( m_Subtext ) )
list.Add( m_Subtext );
}
diff --git a/Scripts/Items/Special/SoulStone.cs b/Scripts/Items/Special/SoulStone.cs
index 8a9cdcc98..51198b322 100644
--- a/Scripts/Items/Special/SoulStone.cs
+++ b/Scripts/Items/Special/SoulStone.cs
@@ -29,7 +29,7 @@ namespace Server.Items
public virtual int ActiveItemID
{
get { return m_ActiveItemID; }
- set
+ set
{
m_ActiveItemID = value;
@@ -42,8 +42,8 @@ namespace Server.Items
public virtual int InactiveItemID
{
get { return m_InactiveItemID; }
- set
- {
+ set
+ {
m_InactiveItemID = value;
if( IsEmpty )
@@ -132,18 +132,15 @@ namespace Server.Items
{
base.GetProperties( list );
- if ( !this.IsEmpty )
- {
- list.Add( 1070721, "#{0}\t{1:0.0}", 1044060 + (int)this.Skill, this.SkillValue ); // Skill stored: ~1_skillname~ ~2_skillamount~
- }
-
+ if ( !IsEmpty )
+ list.Add( 1070721, "#{0}\t{1:0.0}", AosSkillBonuses.GetLabel( Skill ), SkillValue ); // Skill stored: ~1_skillname~ ~2_skillamount~
+
string name = this.LastUserName;
if ( name == null )
name = String.Format( "#{0}", 1074235 ); // Unknown
- list.Add( 1041602, "{0}", name ); // Owner: ~1_val~
-
+ list.Add( 1041602, "{0}", name ); // Owner: ~1_val~
}
private static bool CheckCombat( Mobile m, TimeSpan time )
@@ -305,7 +302,7 @@ namespace Server.Items
int y = ( p / 2 ) * 20 + 40;
AddButton( x, y, 0xFA5, 0xFA6, i + 1, GumpButtonType.Reply, 0 );
- AddHtmlLocalized( x + 45, y + 2, 200, 20, 1044060 + i, 0x7FFF, false, false );
+ AddHtmlLocalized( x + 45, y + 2, 200, 20, AosSkillBonuses.GetLabel( skill.SkillName ), 0x7FFF, false, false );
n++;
}
@@ -360,19 +357,19 @@ namespace Server.Items
* the stone, you must make sure your Skill Lock for the indicated skill is pointed downward.
* Click the "Skills" button on your Paperdoll to access the Skill List, and double-check
* your skill lock.
- *
+ *
* Once you activate the stone, all skill points in the indicated skill will be removed from
* your character. These skill points can later be retrieved. IMPORTANT: When retrieving
* skill points from a Soulstone, the Soulstone WILL REPLACE any existing skill points
* already on your character!
- *
+ *
* This is an Account Bound Soulstone. Skill pointsstored inside can be retrieved by any
* character on the same account as the character who placed them into the stone.
*/
AddHtmlLocalized( 10, 42, 500, 110, 1061067, 0x7FFF, false, true );
AddHtmlLocalized( 10, 200, 390, 20, 1062297, 0x7FFF, false, false ); // Skill Chosen:
- AddHtmlLocalized( 210, 200, 390, 20, 1044060 + skill.SkillID, 0x7FFF, false, false );
+ AddHtmlLocalized( 210, 200, 390, 20, AosSkillBonuses.GetLabel( skill.SkillName ), 0x7FFF, false, false );
AddHtmlLocalized( 10, 220, 390, 20, 1062298, 0x7FFF, false, false ); // Current Value:
AddLabel( 210, 220, 0x481, skill.Base.ToString( "0.0" ) );
@@ -469,19 +466,19 @@ namespace Server.Items
* the stone, you must make sure your Skill Lock for the indicated skill is pointed downward.
* Click the "Skills" button on your Paperdoll to access the Skill List, and double-check
* your skill lock.
- *
+ *
* Once you activate the stone, all skill points in the indicated skill will be removed from
* your character. These skill points can later be retrieved. IMPORTANT: When retrieving
* skill points from a Soulstone, the Soulstone WILL REPLACE any existing skill points
* already on your character!
- *
+ *
* This is an Account Bound Soulstone. Skill pointsstored inside can be retrieved by any
* character on the same account as the character who placed them into the stone.
*/
AddHtmlLocalized( 10, 42, 500, 110, 1061067, 0x7FFF, false, true );
AddHtmlLocalized( 10, 200, 390, 20, 1070718, 0x7FFF, false, false ); // Skill Stored:
- AddHtmlLocalized( 210, 200, 390, 20, 1044060 + (int)stone.Skill, 0x7FFF, false, false );
+ AddHtmlLocalized( 210, 200, 390, 20, AosSkillBonuses.GetLabel( stone.Skill ), 0x7FFF, false, false );
Skill fromSkill = from.Skills[stone.Skill];
@@ -674,10 +671,10 @@ namespace Server.Items
AddHtmlLocalized( 10, 12, 500, 20, 1070725, 0x7FFF, false, false ); //
Confirm Soulstone Skill Removal
/* WARNING!
- *
+ *
* You are about to permanently remove all skill points stored in this Soulstone.
* You WILL NOT absorb these skill points. They will be DELETED.
- *
+ *
* Are you sure you wish to do this? If not, press the Cancel button.
*/
AddHtmlLocalized( 10, 42, 500, 110, 1070724, 0x7FFF, false, true );
@@ -937,7 +934,6 @@ namespace Server.Items
public BlueSoulstone( string account )
: base( account, 0x2ADC, 0x2ADD )
{
-
}
public BlueSoulstone( Serial serial )
@@ -1022,7 +1018,7 @@ namespace Server.Items
base.Deserialize( reader );
int version = reader.ReadInt();
-
+
switch ( version )
{
case 1:
diff --git a/Scripts/Items/Special/Special Scrolls/PowerScroll.cs b/Scripts/Items/Special/Special Scrolls/PowerScroll.cs
index 8fa40a528..7b509c64a 100644
--- a/Scripts/Items/Special/Special Scrolls/PowerScroll.cs
+++ b/Scripts/Items/Special/Special Scrolls/PowerScroll.cs
@@ -13,24 +13,24 @@ namespace Server.Items
* When used, the effect is not immediately seen without a gain of points with that skill or statistics.
* You can view your maximum skill values in your skills window.
* You can view your maximum statistic value in your statistics window. */
- public override int Title
+ public override int Title
{
- get
+ get
{
double level = ( Value - 105.0 ) / 5.0;
-
+
if ( level >= 0.0 && level <= 3.0 && Value % 5.0 == 0.0 )
return 1049635 + (int)level; /* Wonderous Scroll (105 Skill): OR
* Exalted Scroll (110 Skill): OR
* Mythical Scroll (115 Skill): OR
* Legendary Scroll (120 Skill): */
-
+
return 0;
}
}
-
+
public override string DefaultTitle{ get{ return String.Format( "Power Scroll ({0} Skill):", Value ); } }
-
+
private static SkillName[] m_Skills = new SkillName[]
{
SkillName.Blacksmith,
@@ -72,11 +72,30 @@ namespace Server.Items
SkillName.Ninjitsu,
SkillName.Bushido
};
-
+
+ private static SkillName[] m_MLSkills = new SkillName[]
+ {
+ SkillName.Spellweaving
+ };
+
+ /*
+ private static SkillName[] m_SASkills = new SkillName[]
+ {
+ SkillName.Throwing,
+ SkillName.Mysticism,
+ SkillName.Imbuing
+ };
+
+ private static SkillName[] m_HSSkills = new SkillName[]
+ {
+ SkillName.Fishing
+ };
+ */
+
private static List _Skills = new List();
public static List Skills
- {
+ {
get
{
if ( _Skills.Count == 0 )
@@ -89,19 +108,29 @@ namespace Server.Items
{
_Skills.AddRange( m_SESkills );
if (Core.ML)
- _Skills.Add( SkillName.Spellweaving );
+ {
+ _Skills.AddRange( m_MLSkills );
+ /*
+ if (Core.SA)
+ {
+ _Skills.AddRange( m_SASkills );
+ if (Core.HS)
+ _Skills.AddRange( m_HSSkills );
+ }
+ */
+ }
}
}
}
return _Skills;
- }
+ }
}
public static PowerScroll CreateRandom( int min, int max )
{
min /= 5;
max /= 5;
-
+
return new PowerScroll( Skills[Utility.Random( Skills.Count )], 100 + ( Utility.RandomMinMax( min, max ) * 5 ) );
}
@@ -109,7 +138,7 @@ namespace Server.Items
{
min /= 5;
max /= 5;
-
+
SkillName skillName;
do
@@ -123,24 +152,24 @@ namespace Server.Items
public PowerScroll() : this( SkillName.Alchemy, 0.0 )
{
}
-
+
[Constructable]
public PowerScroll( SkillName skill, double value ) : base( skill, value )
{
Hue = 0x481;
- if (Value == 105.0 || skill == Server.SkillName.Blacksmith || skill == Server.SkillName.Tailoring )
+ if ( Value == 105.0 || skill == Server.SkillName.Blacksmith || skill == Server.SkillName.Tailoring )
LootType = LootType.Regular;
}
public PowerScroll( Serial serial ) : base( serial )
{
}
-
+
public override void AddNameProperty( ObjectPropertyList list )
{
double level = ( Value - 105.0 ) / 5.0;
-
+
if ( level >= 0.0 && level <= 3.0 && Value % 5.0 == 0.0 )
list.Add( 1049639 + (int)level, GetNameLocalized() ); /* a wonderous scroll of ~1_type~ (105 Skill) OR
* an exalted scroll of ~1_type~ (110 Skill) OR
@@ -153,29 +182,29 @@ namespace Server.Items
public override void OnSingleClick( Mobile from )
{
double level = ( Value - 105.0 ) / 5.0;
-
+
if ( level >= 0.0 && level <= 3.0 && Value % 5.0 == 0.0 )
base.LabelTo( from, 1049639 + (int)level, GetNameLocalized() );
else
base.LabelTo( from, "a power scroll of {0} ({1} Skill)", GetName(), Value );
}
-
+
public override bool CanUse( Mobile from )
{
if ( !base.CanUse( from ) )
return false;
-
+
Skill skill = from.Skills[Skill];
if ( skill == null )
return false;
-
+
if ( skill.Cap >= Value )
{
from.SendLocalizedMessage( 1049511, GetNameLocalized() ); // Your ~1_type~ is too high for this power scroll.
return false;
}
-
+
return true;
}
@@ -183,7 +212,7 @@ namespace Server.Items
{
if ( !CanUse( from ) )
return;
-
+
from.SendLocalizedMessage( 1049513, GetNameLocalized() ); // You feel a surge of magic as the scroll enhances your ~1_type~!
from.Skills[Skill].Cap = Value;
@@ -211,9 +240,9 @@ namespace Server.Items
{
base.Deserialize( reader );
- int version = ( InheritsItem ? 0 : reader.ReadInt() ); //Required for SpecialScroll insertion
+ int version = ( InheritsItem ? 0 : reader.ReadInt() ); // Required for SpecialScroll insertion
- if (Value == 105.0 || Skill == SkillName.Blacksmith || Skill == SkillName.Tailoring)
+ if ( Value == 105.0 || Skill == SkillName.Blacksmith || Skill == SkillName.Tailoring )
{
LootType = LootType.Regular;
}
diff --git a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs
index 82a3e15ea..294169a6a 100644
--- a/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs
+++ b/Scripts/Items/Special/Special Scrolls/SpecialScroll.cs
@@ -9,17 +9,17 @@ namespace Server.Items
{
private SkillName m_Skill;
private double m_Value;
-
+
#region Old Item Serialization Vars
/* DO NOT USE! Only used in serialization of special scrolls that originally derived from Item */
private bool m_InheritsItem;
-
+
protected bool InheritsItem
- {
- get{ return m_InheritsItem; }
+ {
+ get{ return m_InheritsItem; }
}
#endregion
-
+
public abstract int Message{ get; }
public virtual int Title{ get { return 0; } }
public abstract string DefaultTitle{ get; }
@@ -28,7 +28,7 @@ namespace Server.Items
{
LootType = LootType.Cursed;
Weight = 1.0;
-
+
m_Skill = skill;
m_Value = value;
}
@@ -50,14 +50,14 @@ namespace Server.Items
get { return m_Value; }
set { m_Value = value; }
}
-
+
public virtual string GetNameLocalized()
{
- return String.Concat( "#", (1044060 + (int)m_Skill).ToString() );
+ return String.Concat( "#", AosSkillBonuses.GetLabel( m_Skill ).ToString() );
}
public virtual string GetName()
- {
+ {
int index = (int)m_Skill;
SkillInfo[] table = SkillInfo.Table;
@@ -66,18 +66,18 @@ namespace Server.Items
else
return "???";
}
-
+
public virtual bool CanUse( Mobile from )
{
if ( Deleted )
return false;
-
+
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
return false;
}
-
+
return true;
}
@@ -89,7 +89,7 @@ namespace Server.Items
{
if ( !CanUse( from ) )
return;
-
+
from.CloseGump( typeof( SpecialScroll.InternalGump ) );
from.SendGump( new InternalGump( from, this ) );
}
@@ -121,12 +121,12 @@ namespace Server.Items
case 0:
{
m_InheritsItem = true;
-
+
if ( !(this is StatCapScroll) )
m_Skill = (SkillName)reader.ReadInt();
else
m_Skill = SkillName.Alchemy;
-
+
if ( this is ScrollofAlacrity )
m_Value = 0.0;
else if ( this is StatCapScroll )
@@ -165,7 +165,7 @@ namespace Server.Items
AddButton( 275, 172, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 310, 172, 120, 20, 1046363, 0xFFFFFF, false, false ); // No
-
+
if ( m_Scroll.Title != 0 )
AddHtmlLocalized( 40, 20, 260, 20, m_Scroll.Title, 0xFFFFFF, false, false );
else
@@ -174,7 +174,7 @@ namespace Server.Items
if ( m_Scroll is StatCapScroll )
AddHtmlLocalized( 310, 20, 120, 20, 1038019, 0xFFFFFF, false, false ); // Power
else
- AddHtmlLocalized( 310, 20, 120, 20, 1044060 + (int)m_Scroll.Skill, 0xFFFFFF, false, false );
+ AddHtmlLocalized( 310, 20, 120, 20, AosSkillBonuses.GetLabel( m_Scroll.Skill ), 0xFFFFFF, false, false );
}
public override void OnResponse( NetState state, RelayInfo info )
diff --git a/Scripts/Items/Talismans/BaseTalisman.cs b/Scripts/Items/Talismans/BaseTalisman.cs
index e5c2f70eb..22b6b1eb4 100644
--- a/Scripts/Items/Talismans/BaseTalisman.cs
+++ b/Scripts/Items/Talismans/BaseTalisman.cs
@@ -419,10 +419,10 @@ namespace Server.Items
list.Add(1072387, "{0}\t{1}", m_Protection.Name != null ? m_Protection.Name.ToString() : "Unknown", m_Protection.Amount); // ~1_NAME~ Protection: +~2_val~%
if (m_ExceptionalBonus != 0)
- list.Add(1072395, "#{0}\t{1}", 1044060 + (int)m_Skill, m_ExceptionalBonus); // ~1_NAME~ Exceptional Bonus: ~2_val~%
+ list.Add(1072395, "#{0}\t{1}", AosSkillBonuses.GetLabel( m_Skill ), m_ExceptionalBonus); // ~1_NAME~ Exceptional Bonus: ~2_val~%
if (m_SuccessBonus != 0)
- list.Add(1072394, "#{0}\t{1}", 1044060 + (int)m_Skill, m_SuccessBonus); // ~1_NAME~ Bonus: ~2_val~%
+ list.Add(1072394, "#{0}\t{1}", AosSkillBonuses.GetLabel( m_Skill ), m_SuccessBonus); // ~1_NAME~ Bonus: ~2_val~%
m_AosSkillBonuses.GetProperties(list);
diff --git a/Scripts/Misc/AOS.cs b/Scripts/Misc/AOS.cs
index 64b93c9f3..4fdb5dbb2 100644
--- a/Scripts/Misc/AOS.cs
+++ b/Scripts/Misc/AOS.cs
@@ -714,7 +714,18 @@ namespace Server
if( !GetValues( i, out skill, out bonus ) )
continue;
- list.Add( 1060451 + i, "#{0}\t{1}", 1044060 + (int)skill, bonus );
+ list.Add( 1060451 + i, "#{0}\t{1}", GetLabel( skill ), bonus );
+ }
+ }
+
+ public static int GetLabel( SkillName skill )
+ {
+ switch ( skill )
+ {
+ case SkillName.EvalInt: return 1002070; // Evaluate Intelligence
+ case SkillName.Forensics: return 1002078; // Forensic Evaluation
+ case SkillName.Lockpicking: return 1002097; // Lockpicking
+ default: return 1044060 + (int)skill;
}
}
diff --git a/Scripts/Mobiles/Vendors/RentedVendor.cs b/Scripts/Mobiles/Vendors/RentedVendor.cs
index 6b72a6e34..0c88035b7 100644
--- a/Scripts/Mobiles/Vendors/RentedVendor.cs
+++ b/Scripts/Mobiles/Vendors/RentedVendor.cs
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Gumps;
+using Server.Misc;
using Server.Multis;
using Server.ContextMenus;
using Server.Prompts;
@@ -131,7 +132,7 @@ namespace Server.Mobiles
public override bool IsOwner( Mobile m )
{
- return m == Owner || m.AccessLevel >= AccessLevel.GameMaster;
+ return m == Owner || m.AccessLevel >= AccessLevel.GameMaster || ( Core.ML && AccountHandler.CheckAccount( m, Owner ) );
}
[CommandProperty( AccessLevel.GameMaster )]
diff --git a/Scripts/Multis/BaseHouse.cs b/Scripts/Multis/BaseHouse.cs
index 51b2a1070..1926ddbfa 100644
--- a/Scripts/Multis/BaseHouse.cs
+++ b/Scripts/Multis/BaseHouse.cs
@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
+using Server.Misc;
using Server.Mobiles;
using Server.Multis.Deeds;
using Server.Regions;
@@ -369,10 +370,9 @@ namespace Server.Multis
fromSecures += si.Item.TotalItems;
}
-
+
fromLockdowns += list.Count;
}
-
fromLockdowns += GetLockdowns();
@@ -421,7 +421,7 @@ namespace Server.Multis
if ( hpe == null )
return 0;
-
+
return (int)(hpe.Vendors * BonusStorageScalar);
}
@@ -903,7 +903,7 @@ namespace Server.Multis
List- list = new List
- ();
IPooledEnumerable eable = this.Map.GetItemsInBounds( rect );
-
+
foreach ( Item item in eable )
if ( item.Movable && IsInside( item ) )
list.Add( item );
@@ -1628,7 +1628,7 @@ namespace Server.Multis
SetLockdown( item, true );
return true;
}
- }
+ }
else if ( m_LockDowns.IndexOf( item ) != -1 )
{
m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1005526 ); //That is already locked down
@@ -1741,7 +1741,7 @@ namespace Server.Multis
if ( m_House == null || m_House.Deleted || !m_House.IsOwner( from ) || !from.CheckAlive() || !to.CheckAlive() )
return;
-
+
if ( !accepted )
return;
@@ -1933,7 +1933,7 @@ namespace Server.Multis
m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1010416 ); // This is not locked down or secured.
}
}
-
+
public void AddSecure( Mobile m, Item item )
{
if ( m_Secures == null || !IsOwner( m ) || !IsActive )
@@ -1975,7 +1975,7 @@ namespace Server.Multis
}
else if ( !IsAosRules && SecureCount >= MaxSecures )
{
- // The maximum number of secure items has been reached :
+ // The maximum number of secure items has been reached :
m.SendLocalizedMessage( 1008142, true, MaxSecures.ToString() );
}
else if ( IsAosRules ? !CheckAosLockdowns( 1 ) : ((LockDownCount + 125) >= MaxLockDowns) )
@@ -2951,18 +2951,18 @@ namespace Server.Multis
if ( m_LockDowns[i] is Item )
{
Item item = (Item)m_LockDowns[i];
-
+
if ( !(item is Container) )
count += item.TotalItems;
}
-
+
count++;
}
}
-
+
return count;
}
-
+
public int LockDownCount
{
get
@@ -3082,7 +3082,7 @@ namespace Server.Multis
{
List list = null;
m_Table.TryGetValue( m_Owner, out list );
-
+
if ( list == null )
m_Table[m_Owner] = list = new List();
@@ -3265,25 +3265,6 @@ namespace Server.Multis
return false;
}
- public bool CheckAccount( Mobile mobCheck, Mobile accCheck )
- {
- if ( accCheck != null )
- {
- Account a = accCheck.Account as Account;
-
- if ( a != null )
- {
- for ( int i = 0; i < a.Length; ++i )
- {
- if ( a[i] == mobCheck )
- return true;
- }
- }
- }
-
- return false;
- }
-
public bool IsOwner( Mobile m )
{
if ( m == null )
@@ -3292,7 +3273,7 @@ namespace Server.Multis
if ( m == m_Owner || m.AccessLevel >= AccessLevel.GameMaster )
return true;
- return IsAosRules && CheckAccount( m, m_Owner );
+ return IsAosRules && AccountHandler.CheckAccount( m, m_Owner );
}
public bool IsCoOwner( Mobile m )
@@ -3303,7 +3284,7 @@ namespace Server.Multis
if ( IsOwner( m ) || m_CoOwners.Contains( m ) )
return true;
- return !IsAosRules && CheckAccount( m, m_Owner );
+ return !IsAosRules && AccountHandler.CheckAccount( m, m_Owner );
}
public bool IsGuildMember( Mobile m )
@@ -3614,7 +3595,7 @@ namespace Server.Multis
if ( targeted is AddonContainerComponent )
{
AddonContainerComponent component = (AddonContainerComponent) targeted;
-
+
if ( component.Addon != null )
m_House.Release( from, component.Addon );
}
@@ -3641,7 +3622,7 @@ namespace Server.Multis
if ( targeted is AddonContainerComponent )
{
AddonContainerComponent component = (AddonContainerComponent) targeted;
-
+
if ( component.Addon != null )
m_House.LockDown( from, component.Addon );
}
@@ -3656,7 +3637,7 @@ namespace Server.Multis
{
return;
}
- else
+ else
{
from.SendLocalizedMessage( 1005377 ); //You cannot lock that down
}
@@ -3694,7 +3675,7 @@ namespace Server.Multis
if ( targeted is AddonContainerComponent )
{
AddonContainerComponent component = (AddonContainerComponent) targeted;
-
+
if ( component.Addon != null )
m_House.ReleaseSecure( from, component.Addon );
}
@@ -3716,7 +3697,7 @@ namespace Server.Multis
if ( targeted is AddonContainerComponent )
{
AddonContainerComponent component = (AddonContainerComponent) targeted;
-
+
if ( component.Addon != null )
m_House.AddSecure( from, component.Addon );
}
@@ -3726,8 +3707,8 @@ namespace Server.Multis
m_House.AddSecure( from, (Item)targeted );
}
}
- }
- else
+ }
+ else
{
from.SendLocalizedMessage( 1010424 );//You cannot secure this
}
@@ -3753,8 +3734,8 @@ namespace Server.Multis
if ( targeted is Mobile )
{
m_House.Kick( from, (Mobile)targeted );
- }
- else
+ }
+ else
{
from.SendLocalizedMessage( 501347 );//You cannot eject that from the house!
}
@@ -3785,8 +3766,8 @@ namespace Server.Multis
m_House.Ban( from, (Mobile)targeted );
else
m_House.RemoveBan( from, (Mobile)targeted );
- }
- else
+ }
+ else
{
from.SendLocalizedMessage( 501347 );//You cannot eject that from the house!
}
@@ -3840,8 +3821,8 @@ namespace Server.Multis
m_House.AddCoOwner( from, (Mobile)targeted );
else
m_House.RemoveCoOwner( from, (Mobile)targeted );
- }
- else
+ }
+ else
{
from.SendLocalizedMessage( 501362 );//That can't be a coowner
}
@@ -3872,8 +3853,8 @@ namespace Server.Multis
m_House.AddFriend( from, (Mobile)targeted );
else
m_House.RemoveFriend( from, (Mobile)targeted );
- }
- else
+ }
+ else
{
from.SendLocalizedMessage( 501371 ); // That can't be a friend
}
@@ -3964,8 +3945,10 @@ namespace Server.Multis
ISecurable sec = GetSecurable( Owner.From, m_Item );
if ( sec != null )
+ {
Owner.From.CloseGump( typeof ( SetSecureLevelGump ) );
Owner.From.SendGump( new SetSecureLevelGump( Owner.From, sec, BaseHouse.FindHouseAt( m_Item ) ) );
+ }
}
}
@@ -3983,31 +3966,9 @@ namespace Server.Multis
Timer.DelayCall( house.RestrictedPlacingTime, Unregister );
}
- public bool CheckAccount( Mobile mobCheck, Mobile accCheck )
- {
- if ( accCheck != null )
- {
- Account a = accCheck.Account as Account;
-
- if ( a != null )
- {
- for ( int i = 0; i < a.Length; ++i )
- {
- if ( a[i] == mobCheck )
- return true;
- }
- }
- }
-
- return false;
- }
-
public override bool AllowHousing( Mobile from, Point3D p )
{
- if ( from == m_RegionOwner || CheckAccount( from, m_RegionOwner ) )
- return true;
- else
- return false;
+ return ( from == m_RegionOwner || AccountHandler.CheckAccount( from, m_RegionOwner ) );
}
}
}
\ No newline at end of file