コード例 #1
0
        public override void OnSingleClick(Mobile from)
        {
            if (from.NetState.Version.Major <= 3)
            {
                DisplayRarity(from);
                from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x3B2, 3, "", SphereUtils.ComputeName(this)));
                //base.OnSingleClick(from);
                if (!SkillBonuses.IsEmpty)
                {
                    if (SkillBonuses.Skill_1_Value > 0)
                    {
                        from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x803, 3, "", "[ +" + SkillBonuses.Skill_1_Value + " " + SkillBonuses.Skill_1_Name.ToString() + " ]"));
                    }
                    if (SkillBonuses.Skill_2_Value > 0)
                    {
                        from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x803, 3, "", "[ +" + SkillBonuses.Skill_2_Value + " " + SkillBonuses.Skill_2_Name.ToString() + " ]"));
                    }
                }
                return;
            }

            List <EquipInfoAttribute> attrs = new List <EquipInfoAttribute>();

            AddEquipInfoAttributes(from, attrs);

            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, attrs.ToArray());

            from.Send(new DisplayEquipmentInfo(this, eqInfo));
        }
コード例 #2
0
 public override void OnSingleClick(Mobile from)
 {
     if (from.NetState.Version.Major <= 3)
     {
         //base.OnSingleClick(from);
         from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0x3B2, 3, "", SphereUtils.ComputeName(this)));
     }
 }