本文整理汇总了C#中Server.Network.EquipmentInfo类的典型用法代码示例。如果您正苦于以下问题:C# EquipmentInfo类的具体用法?C# EquipmentInfo怎么用?C# EquipmentInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EquipmentInfo类属于Server.Network命名空间,在下文中一共展示了EquipmentInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnSingleClick
public override void OnSingleClick( Mobile from )
{
ArrayList attrs = new ArrayList();
if ( !Identified )
attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
else
attrs.Add( new EquipInfoAttribute( 1041367, m_Charges ) );
EquipmentInfo eqInfo = new EquipmentInfo( 1017413, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例2: OnSingleClick
public override void OnSingleClick( Mobile from )
{
ArrayList attrs = new ArrayList();
if ( DisplayLootType )
{
if ( LootType == LootType.Blessed )
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
else if ( LootType == LootType.Cursed )
attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
}
if ( m_Quality == InstrumentQuality.Exceptional )
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
if( m_ReplenishesCharges )
attrs.Add( new EquipInfoAttribute( 1070928 ) ); // Replenish Charges
// TODO: Must this support item identification?
if( m_Slayer != SlayerName.None )
{
SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer );
if( entry != null )
attrs.Add( new EquipInfoAttribute( entry.Title ) );
}
if( m_Slayer2 != SlayerName.None )
{
SlayerEntry entry = SlayerGroup.GetEntryByName( m_Slayer2 );
if( entry != null )
attrs.Add( new EquipInfoAttribute( entry.Title ) );
}
int number;
if ( Name == null )
{
number = LabelNumber;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if ( attrs.Count == 0 && Crafter == null && Name != null )
return;
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例3: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if (this.HideAttributes == true)
{
base.OnSingleClick(from);
return;
}
ArrayList attrs = new ArrayList();
if (DisplayLootType)
{
if (LootType == LootType.Blessed)
attrs.Add(new EquipInfoAttribute(1038021)); // blessed
else if (LootType == LootType.Cursed)
attrs.Add(new EquipInfoAttribute(1049643)); // cursed
}
if (Name != null || OldName == null) // only use the new ([X/Y/Z]) method on things we don't have OldNames for
{
if (m_Quality == ArmorQuality.Exceptional)
attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));
if (m_Identified)
{
if (m_Durability != ArmorDurabilityLevel.Regular)
attrs.Add(new EquipInfoAttribute(1038000 + (int)m_Durability));
if (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability)
attrs.Add(new EquipInfoAttribute(1038005 + (int)m_Protection));
}
else if (m_Durability != ArmorDurabilityLevel.Regular || (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability))
{
attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
}
}
int number;
if ( Name == null )
{
if (OldName == null)
{
number = LabelNumber;
}
else
{
string oldname = OldName;
//yay! Show us the old way!
if (m_Quality == ArmorQuality.Exceptional)
{
oldname = "exceptional " + oldname;
}
if (m_Identified)
{
if (m_Durability != ArmorDurabilityLevel.Regular)
{
//attrs.Add(new EquipInfoAttribute(1038000 + (int)m_Durability));
oldname = m_Durability.ToString().ToLower() + " " + oldname;
}
if (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability)
{
//attrs.Add(new EquipInfoAttribute(1038005 + (int)m_Protection));
oldname = oldname + " of " + m_Protection.ToString().ToLower();
}
}
else if (m_Durability != ArmorDurabilityLevel.Regular
|| (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability))
{
oldname = "magic " + oldname;
}
//crafted-by goes at the end
if (m_Crafter != null)
{
oldname += " crafted by " + m_Crafter.Name;
}
this.LabelTo(from, oldname);
number = 1041000;
}
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if ( attrs.Count == 0 && Crafter == null && Name != null )
return;
if (OldName == null)
{
EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
from.Send(new DisplayEquipmentInfo(this, eqInfo));
}
else
{
//.........这里部分代码省略.........
示例4: OnSingleClick
public override void OnSingleClick( Mobile from )
{
ArrayList attrs = new ArrayList();
if ( DisplayLootType )
{
if ( LootType == LootType.Blessed )
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
else if ( LootType == LootType.Cursed )
attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
}
if ( !Identified )
{
attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
}
else
{
int num = 0;
switch ( m_WandEffect )
{
case WandEffect.Clumsiness: num = 3002011; break;
case WandEffect.Identification: num = 1044063; break;
case WandEffect.Healing: num = 3002014; break;
case WandEffect.Feeblemindedness: num = 3002013; break;
case WandEffect.Weakness: num = 3002018; break;
case WandEffect.MagicArrow: num = 3002015; break;
case WandEffect.Harming: num = 3002022; break;
case WandEffect.Fireball: num = 3002028; break;
case WandEffect.GreaterHealing: num = 3002039; break;
case WandEffect.Lightning: num = 3002040; break;
case WandEffect.ManaDraining: num = 3002041; break;
}
if ( num > 0 )
attrs.Add( new EquipInfoAttribute( num, m_Charges ) );
}
int number;
if ( Name == null )
{
number = 1017085;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if ( attrs.Count == 0 && Crafter == null && Name != null )
return;
EquipmentInfo eqInfo = new EquipmentInfo( number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例5: OnSingleClick
public override void OnSingleClick(Mobile from)
{
var attrs = new List<EquipInfoAttribute>();
if (DisplayLootType)
{
if (LootType == LootType.Blessed)
{
attrs.Add(new EquipInfoAttribute(1038021)); // blessed
}
else if (LootType == LootType.Cursed)
{
attrs.Add(new EquipInfoAttribute(1049643)); // cursed
}
}
#region Factions
if (m_FactionState != null)
{
attrs.Add(new EquipInfoAttribute(1041350)); // faction item
}
#endregion
if (m_Quality == WeaponQuality.Exceptional)
{
attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality));
}
if (m_Identified || from.AccessLevel >= AccessLevel.GameMaster)
{
if (m_Slayer != SlayerName.None)
{
SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer);
if (entry != null)
{
attrs.Add(new EquipInfoAttribute(entry.Title));
}
}
if (m_Slayer2 != SlayerName.None)
{
SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2);
if (entry != null)
{
attrs.Add(new EquipInfoAttribute(entry.Title));
}
}
if (m_DurabilityLevel != WeaponDurabilityLevel.Regular)
{
attrs.Add(new EquipInfoAttribute(1038000 + (int)m_DurabilityLevel));
}
if (m_DamageLevel != WeaponDamageLevel.Regular)
{
attrs.Add(new EquipInfoAttribute(1038015 + (int)m_DamageLevel));
}
if (m_AccuracyLevel != WeaponAccuracyLevel.Regular)
{
attrs.Add(new EquipInfoAttribute(1038010 + (int)m_AccuracyLevel));
}
}
else if (m_Slayer != SlayerName.None || m_Slayer2 != SlayerName.None ||
m_DurabilityLevel != WeaponDurabilityLevel.Regular || m_DamageLevel != WeaponDamageLevel.Regular ||
m_AccuracyLevel != WeaponAccuracyLevel.Regular)
{
attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
}
if (m_Poison != null && m_PoisonCharges > 0)
{
attrs.Add(new EquipInfoAttribute(1017383, m_PoisonCharges));
}
int number;
if (Name == null)
{
number = LabelNumber;
}
else
{
LabelTo(from, Name);
number = 1041000;
}
if (attrs.Count == 0 && Crafter == null && Name != null)
{
return;
}
EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray());
from.Send(new DisplayEquipmentInfo(this, eqInfo));
}
示例6: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if ( Deleted || !from.CanSee( this ) )
return;
LabelToExpansion(from);
int number;
if ( String.IsNullOrEmpty( Name ) )
number = LabelNumber;
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if ( DisplayDyable )
LabelDyableTo( from );
List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();
bool ismagical = AddEquipInfoAttributes( from, attrs );
if ( attrs.Count > 0 || Crafter != null || number != 1041000 )
{
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, from.AccessLevel < AccessLevel.GameMaster && ismagical && !m_Identified, attrs.ToArray() );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
}
示例7: OnSingleClick
// Special version that DOES NOT show armor attributes and tags
public override void OnSingleClick(Mobile from)
{
ArrayList attrs = new ArrayList();
int number;
if (Name == null)
{
number = LabelNumber;
}
else
{
this.LabelTo(from, Name);
number = 1041000;
}
if (attrs.Count == 0 && Crafter == null && Name != null)
return;
EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
from.Send(new DisplayEquipmentInfo(this, eqInfo));
}
示例8: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if ( Deleted || !from.CanSee( this ) )
return;
int number;
if ( String.IsNullOrEmpty( Name ) )
number = LabelNumber;
else
{
this.LabelTo( from, Name );
number = 1041000;
}
List<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();
AddEquipInfoAttributes( from, attrs );
if ( attrs.Count > 0 || Crafter != null || String.IsNullOrEmpty( Name ) )
{
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, attrs.ToArray() );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
if ( CheckContentDisplay( from ) )
LabelTo( from, "({0} item{2}, {1} stones)", TotalItems, TotalWeight, TotalItems != 1 ? "s" : String.Empty );
//LabelTo( from, 1050044, String.Format( "{0}\t{1}", TotalItems.ToString(), TotalWeight.ToString() ) );
}
示例9: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if (this.HideAttributes == true)
{
base.OnSingleClick(from);
return;
}
ArrayList attrs = new ArrayList();
if ( DisplayLootType )
{
if ( LootType == LootType.Blessed )
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
else if ( LootType == LootType.Cursed )
attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
}
if ( m_Quality == JewelQuality.Exceptional )
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
int number;
if ( Name == null )
{
number = LabelNumber;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if (Identified == false && MagicCharges > 0)
attrs.Add( new EquipInfoAttribute( 1038000 ) ); // unidentified
else if (Identified == true && MagicCharges > 0)
{
switch(MagicType)
{
case JewelMagicEffect.MagicReflect:
attrs.Add( new EquipInfoAttribute(1044416, m_MagicCharges) ); // magic reflection
break;
case JewelMagicEffect.Invisibility:
attrs.Add( new EquipInfoAttribute(1044424, m_MagicCharges) ); // invisibility
break;
case JewelMagicEffect.Bless:
attrs.Add( new EquipInfoAttribute(1044397, m_MagicCharges) ); // bless
break;
case JewelMagicEffect.Teleport:
attrs.Add( new EquipInfoAttribute(1044402, m_MagicCharges) ); // teleport
break;
case JewelMagicEffect.Agility:
attrs.Add( new EquipInfoAttribute(1044389, m_MagicCharges) ); // agility
break;
case JewelMagicEffect.Cunning:
attrs.Add( new EquipInfoAttribute(1044390, m_MagicCharges) ); // cunning
break;
case JewelMagicEffect.Strength:
attrs.Add( new EquipInfoAttribute(1044396, m_MagicCharges) ); // strength
break;
case JewelMagicEffect.NightSight:
attrs.Add( new EquipInfoAttribute(1044387, m_MagicCharges) ); // night sight
break;
case JewelMagicEffect.Curse:
attrs.Add( new EquipInfoAttribute(1044407, m_MagicCharges) ); // curse
break;
case JewelMagicEffect.Clumsy:
attrs.Add( new EquipInfoAttribute(1044382, m_MagicCharges) ); // clumsy
break;
case JewelMagicEffect.Feeblemind:
attrs.Add( new EquipInfoAttribute(1044384, m_MagicCharges) ); // feeblemind
break;
case JewelMagicEffect.Weakness:
attrs.Add( new EquipInfoAttribute(1044388, m_MagicCharges) ); // weaken
break;
}
}
if ( attrs.Count == 0 && Name != null && m_Crafter == null )
return;
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例10: OnSingleClick
public override void OnSingleClick( Mobile from )
{
if ( m_Description != null && m_Description.Length > 0 )
LabelTo( from, m_Description );
ArrayList attrs = new ArrayList();
if ( m_Quality == RunebookQuality.Exceptional )
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
int number = LabelNumber;
if ( Crafter == null && attrs.Count == 0 )
{
base.OnSingleClick( from );
return;
}
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例11: OnSingleClick
public override void OnSingleClick( Mobile from )
{
ArrayList attrs = new ArrayList();
int num = 1041424;
attrs.Add( new EquipInfoAttribute( num, m_Charges ) );
int number;
if ( Name == null )
{
number = 1017085;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
EquipmentInfo eqInfo = new EquipmentInfo( number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例12: OnSingleClick
public override void OnSingleClick( Mobile from )
{
ArrayList attrs = new ArrayList();
if ( DisplayLootType )
{
if ( LootType == LootType.Blessed )
attrs.Add( new EquipInfoAttribute( 1038021 ) ); // blessed
else if ( LootType == LootType.Cursed )
attrs.Add( new EquipInfoAttribute( 1049643 ) ); // cursed
}
#region Factions
if ( m_FactionState != null )
attrs.Add( new EquipInfoAttribute( 1041350 ) ); // faction item
#endregion
if ( m_Quality == WeaponQuality.Exceptional )
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
if ( m_Identified )
{
if ( m_Slayer != SlayerName.None )
attrs.Add( new EquipInfoAttribute( SlayerGroup.GetEntryByName( m_Slayer ).Title ) );
if ( m_DurabilityLevel != WeaponDurabilityLevel.Regular )
attrs.Add( new EquipInfoAttribute( 1038000 + (int)m_DurabilityLevel ) );
if ( m_DamageLevel != WeaponDamageLevel.Regular )
attrs.Add( new EquipInfoAttribute( 1038015 + (int)m_DamageLevel ) );
if ( m_AccuracyLevel != WeaponAccuracyLevel.Regular )
attrs.Add( new EquipInfoAttribute( 1038010 + (int)m_AccuracyLevel ) );
}
else if (m_Slayer != SlayerName.None || m_DurabilityLevel != WeaponDurabilityLevel.Regular || m_DamageLevel != WeaponDamageLevel.Regular || m_AccuracyLevel != WeaponAccuracyLevel.Regular || m_ChargedAbility != WeaponChargedAbility.Regular && m_AbilityCharges > 0 )
{
attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified
}
if ( m_Poison != null && m_PoisonCharges > 0 )
attrs.Add( new EquipInfoAttribute( 1017383, m_PoisonCharges ) );
int number;
/*if ( Name == null )
{
number = LabelNumber;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}*/
string name = Name == null ? ItemData.Name.ToLower() : Name;
if (Name == null && m_Identified && m_ChargedAbility != WeaponChargedAbility.Regular && m_AbilityCharges > 0)
name += String.Format(" of {0}: {1}", GetChargedAbilityName(m_ChargedAbility), m_AbilityCharges);
this.LabelTo( from, name );
number = 1041000;
if ( attrs.Count == 0 && Crafter == null && Name != null )
return;
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例13: OnSingleClick
public override void OnSingleClick(Mobile from)
{
ArrayList attrs = new ArrayList();
if (Quality == ClothingQuality.Exceptional)
attrs.Add(new EquipInfoAttribute(1018305 - (int)Quality));
int number;
if ( Name == null )
{
this.LabelTo( from, "cloth gloves" );
number = 1041000;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
if (attrs.Count == 0 && Crafter == null && Name != null)
return;
EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
from.Send(new DisplayEquipmentInfo(this, eqInfo));
}
示例14: OnSingleClick
public override void OnSingleClick(Mobile from)
{
int number;
if ( Name == null )
{
number = LabelNumber;
}
else
{
this.LabelTo( from, Name );
number = 1041000;
}
ArrayList attrs = new ArrayList();
if (Quality == WeaponQuality.Exceptional)
attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) );
EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) );
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
示例15: OnSingleClick
public override void OnSingleClick(Mobile from)
{
ArrayList attrs = new ArrayList();
if (DisplayLootType)
{
if (LootType == LootType.Blessed)
attrs.Add(new EquipInfoAttribute(1038021)); // blessed
else if (LootType == LootType.Cursed)
attrs.Add(new EquipInfoAttribute(1049643)); // cursed
}
string name = Name;
bool hasability = ( m_ChargedAbility != JewelChargedAbility.Regular ) && ( m_AbilityCharges > 0 );
if ( !m_Identified && hasability )
attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified
else if ( String.IsNullOrEmpty( Name ) )
{
string gemtype = GetGemType( m_GemType );
string chargeability = GetChargedAbilityName( m_ChargedAbility );
name = String.Format( "{0}{1}{2}", String.IsNullOrEmpty( gemtype ) ? "" : String.Format( "{0} ", gemtype ), ItemData.Name.ToLower(), hasability ? String.Format( " of {0}: {1}", chargeability, m_AbilityCharges ) : "" );
}
this.LabelTo(from, name);
int number = 1041000;
EquipmentInfo eqInfo = new EquipmentInfo(number, null, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute)));
from.Send(new DisplayEquipmentInfo(this, eqInfo));
}