- Moved BaseHouse's CheckAccount to AccountHandler for general use.
- Rented vendors can now be managed by all characters on the vendor owner's account. - Corrected skill names displayed for skill bonuses on equipment. (Affected: Eval Intelligence -> Evaluate Intelligence, Forensics -> Forensic Evaluation, Lock Picking -> Lockpicking) - Centralized skill name to cliloc conversion to AosSkillBonuses.GetLabel. - Small SubtextSign fix hiding empty subtexts. (Not just nulls.) - Added SA and HS power scroll skill arrays for future reference. - Fixed house resizing not placing a temp no housing region for staff.
This commit is contained in:
parent
9ceb0bc3c9
commit
a3f8cb5fc6
11 changed files with 161 additions and 144 deletions
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.<BR><BR>
|
||||
*
|
||||
*
|
||||
* 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!<BR><BR>
|
||||
*
|
||||
*
|
||||
* 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.<BR><BR>
|
||||
*
|
||||
*
|
||||
* 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!<BR><BR>
|
||||
*
|
||||
*
|
||||
* 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 ); // <CENTER>Confirm Soulstone Skill Removal</CENTER>
|
||||
|
||||
/* WARNING!<BR><BR>
|
||||
*
|
||||
*
|
||||
* You are about to permanently remove all skill points stored in this Soulstone.
|
||||
* You WILL NOT absorb these skill points. They will be DELETED.<BR><BR>
|
||||
*
|
||||
*
|
||||
* 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:
|
||||
|
|
|
|||
|
|
@ -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( "<basefont color=#FFFFFF>Power Scroll ({0} Skill):</basefont>", 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<SkillName> _Skills = new List<SkillName>();
|
||||
|
||||
public static List<SkillName> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue