sahisahi

Member
I installed Univesal storage keys, working good so far, but i have a problem when i put inside a storageky a item with a long name.

This issue doesnt happens when i use the Bod storage key,
the item list is build in a different way, i noticed its using a thing called:

Code:
entry.Add( new ColumnSeparationEntry() );

I tested for like 2h trying to increase the width but not sucess.


Armorykey gump:

armoryproblem.png


Bodkey Gump: (no issue with long name) as u can see theres lot of space between ''contents'' and ''amount''


bodkey.png

Armorykey.cs

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Solaris.ItemStore;                            //for connection to resource store data objects
using Server.Engines.VeteranRewards;

namespace Server.Items
{
    //item inherited from BaseResourceKey
    public class ArmoryKey : BaseStoreKey, IRewardItem
    {
        private bool m_IsRewardItem;

        [CommandProperty( AccessLevel.Seer )]
        public bool IsRewardItem
        {
            get{ return m_IsRewardItem; }
            set{ m_IsRewardItem = value; InvalidateProperties(); }
        }

        public override int DisplayColumns{ get{ return 1; } }

        public override bool CanUseFromPack{ get{ return false; } }

        public override bool CanUseFromHouse{ get{ return true; } }

        public override List<StoreEntry> EntryStructure
        {
            get
            {
                List<StoreEntry> entry = base.EntryStructure;

                //NOTE: if you're looking to add new stash entry list types, make sure to include the appropriate "using" directives at the top of this file, or use the full class path

                entry.Add
                (
                    new StashEntry
                    (
                        typeof( BaseArmor ), "Armor", 500, new StashSortData
                        (                                            //add the column information
                            new StashSortEntry[]        //the first entry is what is displayed by default
                            {
                                new StashSortEntry( "Resource", "Resource" ),
                                new StashSortEntry( "Crafter", "Crafter" ),
                                new StashSortEntry( "Physical Resist", "PhysicalResistance" ),
                                new StashSortEntry( "Fire Resist", "FireResistance" ),
                                new StashSortEntry( "Cold Resist", "ColdResistance" ),
                                new StashSortEntry( "Poison Resist", "PoisonResistance" ),
                                new StashSortEntry( "Energy Resist", "EnergyResistance" ),
                            },
                            new StashSortEntry[]    //the second entry is what is also available to the user when they customize the gump
                            {
                                new StashSortEntry( "Durability", "HitPoints" ),
                                new StashSortEntry( "Max Durability", "MaxHitPoints" ),
                                new StashSortEntry( "Body Position", "BodyPosition" ),
                                new StashSortEntry( "Str Requirement", "StrRequirement" ),
                                new StashSortEntry( "Durability Bonus", new string[]{ "ArmorAttributes", "DurabilityBonus" } ),
                                new StashSortEntry( "Lower Stats", new string[]{ "ArmorAttributes", "LowerStatReq" } ),
                                new StashSortEntry( "Mage Armor", new string[]{ "ArmorAttributes", "MageArmor" } ),
                                new StashSortEntry( "Self Repair", new string[]{ "ArmorAttributes", "SelfRepair" } ),
                                new StashSortEntry( "Str Bonus", new string[]{ "Attributes", "BonusStr" } ),
                                new StashSortEntry( "Dex Bonus", new string[]{ "Attributes", "BonusDex" } ),
                                new StashSortEntry( "Int Bonus", new string[]{ "Attributes", "BonusInt" } ),
                                new StashSortEntry( "HP Bonus", new string[]{ "Attributes", "BonusHits" } ),
                                new StashSortEntry( "Stamina Bonus", new string[]{ "Attributes", "BonusStam" } ),
                                new StashSortEntry( "Mana Bonus", new string[]{ "Attributes", "BonusMana" } ),
                                new StashSortEntry( "FCR", new string[]{ "Attributes", "CastRecovery" } ),
                                new StashSortEntry( "FC", new string[]{ "Attributes", "CastSpeed" } ),
                                new StashSortEntry( "HCI", new string[]{ "Attributes", "AttackChance" } ),
                                new StashSortEntry( "DCI", new string[]{ "Attributes", "DefendChance" } ),
                                new StashSortEntry( "LMC", new string[]{ "Attributes", "LowerManaCost" } ),
                                new StashSortEntry( "LRC", new string[]{ "Attributes", "LowerRegCost" } ),
                                new StashSortEntry( "Luck", new string[]{ "Attributes", "Luck" } ),
                                new StashSortEntry( "Enhance Potions", new string[]{ "Attributes", "EnhancePotions" } ),
                                new StashSortEntry( "Night Sight", new string[]{ "Attributes", "NightSight" } ),
                                new StashSortEntry( "Reflect Phys Damage", new string[]{ "Attributes", "Reflect Physical" } ),
                                new StashSortEntry( "Hits Regen", new string[]{ "Attributes", "RegenHits" } ),
                                new StashSortEntry( "Stam Regen", new string[]{ "Attributes", "RegenStam" } ),
                                new StashSortEntry( "Mana Regen", new string[]{ "Attributes", "RegenMana" } ),
                                new StashSortEntry( "Spell Channeling", new string[]{ "Attributes", "SpellChanneling" } ),
                                new StashSortEntry( "Spell Damage", new string[]{ "Attributes", "SpellDamage" } ),
                                new StashSortEntry( "Damage Increase", new string[]{ "Attributes", "WeaponDamage" } ),
                                new StashSortEntry( "Swing Speed Increase", new string[]{ "Attributes", "WeaponSpeed" } ),
                                new StashSortEntry( "Skill 1", new string[]{ "SkillBonuses", "Skill_1_Name" }, new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 1 Name", new string[]{ "SkillBonuses", "Skill_1_Name" } ),
                                new StashSortEntry( "Skill 1 Value", new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 2", new string[]{ "SkillBonuses", "Skill_2_Name" }, new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 2 Name", new string[]{ "SkillBonuses", "Skill_2_Name" } ),
                                new StashSortEntry( "Skill 2 Value", new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 3", new string[]{ "SkillBonuses", "Skill_3_Name" }, new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 3 Name", new string[]{ "SkillBonuses", "Skill_3_Name" } ),
                                new StashSortEntry( "Skill 3 Value", new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 4", new string[]{ "SkillBonuses", "Skill_4_Name" }, new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 4 Name", new string[]{ "SkillBonuses", "Skill_4_Name" } ),
                                new StashSortEntry( "Skill 4 Value", new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 5", new string[]{ "SkillBonuses", "Skill_5_Name" }, new string[]{ "SkillBonuses", "Skill_5_Value" } ),
                                new StashSortEntry( "Skill 5 Name", new string[]{ "SkillBonuses", "Skill_5_Name" } ),
                                new StashSortEntry( "Skill 5 Value", new string[]{ "SkillBonuses", "Skill_5_Value" } )
                            }
                        )
                    )
                );

                entry.Add
                (
                    new StashEntry
                    (
                        typeof( BaseWeapon ), "Weapons", 500, new StashSortData
                        (                                            //add the column information
                            new StashSortEntry[]        //the first entry is what is displayed by default
                            {
                                new StashSortEntry( "Resource", "Resource" ),
                                new StashSortEntry( "Crafter", "Crafter" ),
                                new StashSortEntry( "Min Damage", "MinDamage" ),
                                new StashSortEntry( "Max Damage", "MaxDamage" ),
                                new StashSortEntry( "Speed", "Speed" ),
                                new StashSortEntry( "Range", "MaxRange" ),
                                new StashSortEntry( "Req. Skill", "Skill" )
                            },
                            new StashSortEntry[]    //the second entry is what is also available to the user when they customize the gump
                            {
                                new StashSortEntry( "Slayer", "Slayer" ),
                                new StashSortEntry( "Alt Slayer", "Slayer2" ),
                                new StashSortEntry( "Str Requirement", "StrRequirement" ),

                                new StashSortEntry( "Durability", "HitPoints" ),
                                new StashSortEntry( "Max Durability", "MaxHitPoints" ),

                                new StashSortEntry( "Physical Damage", new string[]{ "AosElementDamage", "Physical" } ),
                                new StashSortEntry( "Fire Damage", new string[]{ "AosElementDamage", "Fire" } ),
                                new StashSortEntry( "Cold Damage", new string[]{ "AosElementDamage", "Cold" } ),
                                new StashSortEntry( "Energy Damage", new string[]{ "AosElementDamage", "Energy" } ),
                                new StashSortEntry( "Poison Damage", new string[]{ "AosElementDamage", "Poison" } ),

                                new StashSortEntry( "Durability Bonus", new string[]{ "WeaponAttributes", "DurabilityBonus" } ),
                                new StashSortEntry( "Lower Stats", new string[]{ "WeaponAttributes", "LowerStatReq" } ),
                                new StashSortEntry( "Mage Weapon", new string[]{ "WeaponAttributes", "MageWeapon" } ),
                                new StashSortEntry( "Self Repair", new string[]{ "WeaponAttributes", "SelfRepair" } ),

                                new StashSortEntry( "Life Leech", new string[]{ "WeaponAttributes", "HitLeechHits" } ),
                                new StashSortEntry( "Stamina Leech", new string[]{ "WeaponAttributes", "HitLeechStam" } ),
                                new StashSortEntry( "Mana Leech", new string[]{ "WeaponAttributes", "HitLeechMana" } ),

                                new StashSortEntry( "Physical Area", new string[]{ "WeaponAttributes", "HitPhysicalArea" } ),
                                new StashSortEntry( "Fire Area", new string[]{ "WeaponAttributes", "HitFireArea" } ),
                                new StashSortEntry( "Cold Area", new string[]{ "WeaponAttributes", "HitColdArea" } ),
                                new StashSortEntry( "Energy Area", new string[]{ "WeaponAttributes", "HitEnergyArea" } ),
                                new StashSortEntry( "Poison Area", new string[]{ "WeaponAttributes", "HitPoisonArea" } ),

                                new StashSortEntry( "Hit Dispel", new string[]{ "WeaponAttributes", "HitDispel" } ),
                                new StashSortEntry( "Hit Harm", new string[]{ "WeaponAttributes", "HitHarm" } ),
                                new StashSortEntry( "Hit Fireball", new string[]{ "WeaponAttributes", "HitFireball" } ),
                                new StashSortEntry( "Hit Lightning", new string[]{ "WeaponAttributes", "HitLightning" } ),

                                new StashSortEntry( "Physical Bonus", new string[]{ "WeaponAttributes", "ResistPhysicalBonus" } ),
                                new StashSortEntry( "Fire Bonus", new string[]{ "WeaponAttributes", "ResistFireBonus" } ),
                                new StashSortEntry( "Cold Bonus", new string[]{ "WeaponAttributes", "ResistColdBonus" } ),
                                new StashSortEntry( "Energy Bonus", new string[]{ "WeaponAttributes", "ResistEnergyBonus" } ),
                                new StashSortEntry( "Poisin Bonus", new string[]{ "WeaponAttributes", "ResistPoisonBonus" } ),

                                new StashSortEntry( "Str Bonus", new string[]{ "Attributes", "BonusStr" } ),
                                new StashSortEntry( "Dex Bonus", new string[]{ "Attributes", "BonusDex" } ),
                                new StashSortEntry( "Int Bonus", new string[]{ "Attributes", "BonusInt" } ),
                                new StashSortEntry( "HP Bonus", new string[]{ "Attributes", "BonusHits" } ),
                                new StashSortEntry( "Stamina Bonus", new string[]{ "Attributes", "BonusStam" } ),
                                new StashSortEntry( "Mana Bonus", new string[]{ "Attributes", "BonusMana" } ),
                                new StashSortEntry( "FCR", new string[]{ "Attributes", "CastRecovery" } ),
                                new StashSortEntry( "FC", new string[]{ "Attributes", "CastSpeed" } ),
                                new StashSortEntry( "HCI", new string[]{ "Attributes", "AttackChance" } ),
                                new StashSortEntry( "DCI", new string[]{ "Attributes", "DefendChance" } ),
                                new StashSortEntry( "LMC", new string[]{ "Attributes", "LowerManaCost" } ),
                                new StashSortEntry( "LRC", new string[]{ "Attributes", "LowerRegCost" } ),
                                new StashSortEntry( "Luck", new string[]{ "Attributes", "Luck" } ),
                                new StashSortEntry( "Enhance Potions", new string[]{ "Attributes", "EnhancePotions" } ),
                                new StashSortEntry( "Night Sight", new string[]{ "Attributes", "NightSight" } ),
                                new StashSortEntry( "Reflect Phys Damage", new string[]{ "Attributes", "Reflect Physical" } ),
                                new StashSortEntry( "Hits Regen", new string[]{ "Attributes", "RegenHits" } ),
                                new StashSortEntry( "Stam Regen", new string[]{ "Attributes", "RegenStam" } ),
                                new StashSortEntry( "Mana Regen", new string[]{ "Attributes", "RegenMana" } ),
                                new StashSortEntry( "Spell Channeling", new string[]{ "Attributes", "SpellChanneling" } ),
                                new StashSortEntry( "Spell Damage", new string[]{ "Attributes", "SpellDamage" } ),
                                new StashSortEntry( "Damage Increase", new string[]{ "Attributes", "WeaponDamage" } ),
                                new StashSortEntry( "Swing Speed Increase", new string[]{ "Attributes", "WeaponSpeed" } ),
                                new StashSortEntry( "Skill 1", new string[]{ "SkillBonuses", "Skill_1_Name" }, new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 1 Name", new string[]{ "SkillBonuses", "Skill_1_Name" } ),
                                new StashSortEntry( "Skill 1 Value", new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 2", new string[]{ "SkillBonuses", "Skill_2_Name" }, new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 2 Name", new string[]{ "SkillBonuses", "Skill_2_Name" } ),
                                new StashSortEntry( "Skill 2 Value", new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 3", new string[]{ "SkillBonuses", "Skill_3_Name" }, new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 3 Name", new string[]{ "SkillBonuses", "Skill_3_Name" } ),
                                new StashSortEntry( "Skill 3 Value", new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 4", new string[]{ "SkillBonuses", "Skill_4_Name" }, new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 4 Name", new string[]{ "SkillBonuses", "Skill_4_Name" } ),
                                new StashSortEntry( "Skill 4 Value", new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 5", new string[]{ "SkillBonuses", "Skill_5_Name" }, new string[]{ "SkillBonuses", "Skill_5_Value" } ),
                                new StashSortEntry( "Skill 5 Name", new string[]{ "SkillBonuses", "Skill_5_Name" } ),
                                new StashSortEntry( "Skill 5 Value", new string[]{ "SkillBonuses", "Skill_5_Value" } )
                            }
                        )
                    )
                );

                entry.Add
                (
                    new StashEntry
                    (
                        typeof( BaseClothing ), "Clothing", 500, new StashSortData
                        (                                            //add the column information
                            new StashSortEntry[]        //the first entry is what is displayed by default
                            {
                                new StashSortEntry( "Resource", "Resource" ),
                                new StashSortEntry( "Crafter", "Crafter" ),
                                new StashSortEntry( "Body Position", "Layer" )
                            },
                            new StashSortEntry[]    //the second entry is what is also available to the user when they customize the gump
                            {
                                new StashSortEntry( "Durability", "HitPoints" ),
                                new StashSortEntry( "Max Durability", "MaxHitPoints" ),

                                new StashSortEntry( "Str Requirement", "StrRequirement" ),

                                new StashSortEntry( "Durability Bonus", new string[]{ "ClothingAttributes", "DurabilityBonus" } ),
                                new StashSortEntry( "Lower Stats", new string[]{ "ClothingAttributes", "LowerStatReq" } ),
                                new StashSortEntry( "Mage Armor", new string[]{ "ClothingAttributes", "MageArmor" } ),
                                new StashSortEntry( "Self Repair", new string[]{ "ClothingAttributes", "SelfRepair" } ),

                                new StashSortEntry( "Physical Resist", new string[]{ "Resistances", "Physical" } ),
                                new StashSortEntry( "Fire Resist", new string[]{ "Resistances", "Fire" } ),
                                new StashSortEntry( "Cold Resist", new string[]{ "Resistances", "Cold" } ),
                                new StashSortEntry( "Energy Resist", new string[]{ "Resistances", "Energy" } ),
                                new StashSortEntry( "Poison Resist", new string[]{ "Resistances", "Poison" } ),

                                new StashSortEntry( "Str Bonus", new string[]{ "Attributes", "BonusStr" } ),
                                new StashSortEntry( "Dex Bonus", new string[]{ "Attributes", "BonusDex" } ),
                                new StashSortEntry( "Int Bonus", new string[]{ "Attributes", "BonusInt" } ),
                                new StashSortEntry( "HP Bonus", new string[]{ "Attributes", "BonusHits" } ),
                                new StashSortEntry( "Stamina Bonus", new string[]{ "Attributes", "BonusStam" } ),
                                new StashSortEntry( "Mana Bonus", new string[]{ "Attributes", "BonusMana" } ),
                                new StashSortEntry( "FCR", new string[]{ "Attributes", "CastRecovery" } ),
                                new StashSortEntry( "FC", new string[]{ "Attributes", "CastSpeed" } ),
                                new StashSortEntry( "HCI", new string[]{ "Attributes", "AttackChance" } ),
                                new StashSortEntry( "DCI", new string[]{ "Attributes", "DefendChance" } ),
                                new StashSortEntry( "LMC", new string[]{ "Attributes", "LowerManaCost" } ),
                                new StashSortEntry( "LRC", new string[]{ "Attributes", "LowerRegCost" } ),
                                new StashSortEntry( "Luck", new string[]{ "Attributes", "Luck" } ),
                                new StashSortEntry( "Enhance Potions", new string[]{ "Attributes", "EnhancePotions" } ),
                                new StashSortEntry( "Night Sight", new string[]{ "Attributes", "NightSight" } ),
                                new StashSortEntry( "Reflect Phys Damage", new string[]{ "Attributes", "Reflect Physical" } ),
                                new StashSortEntry( "Hits Regen", new string[]{ "Attributes", "RegenHits" } ),
                                new StashSortEntry( "Stam Regen", new string[]{ "Attributes", "RegenStam" } ),
                                new StashSortEntry( "Mana Regen", new string[]{ "Attributes", "RegenMana" } ),
                                new StashSortEntry( "Spell Channeling", new string[]{ "Attributes", "SpellChanneling" } ),
                                new StashSortEntry( "Spell Damage", new string[]{ "Attributes", "SpellDamage" } ),
                                new StashSortEntry( "Damage Increase", new string[]{ "Attributes", "WeaponDamage" } ),
                                new StashSortEntry( "Swing Speed Increase", new string[]{ "Attributes", "WeaponSpeed" } ),
                                new StashSortEntry( "Skill 1", new string[]{ "SkillBonuses", "Skill_1_Name" }, new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 1 Name", new string[]{ "SkillBonuses", "Skill_1_Name" } ),
                                new StashSortEntry( "Skill 1 Value", new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 2", new string[]{ "SkillBonuses", "Skill_2_Name" }, new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 2 Name", new string[]{ "SkillBonuses", "Skill_2_Name" } ),
                                new StashSortEntry( "Skill 2 Value", new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 3", new string[]{ "SkillBonuses", "Skill_3_Name" }, new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 3 Name", new string[]{ "SkillBonuses", "Skill_3_Name" } ),
                                new StashSortEntry( "Skill 3 Value", new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 4", new string[]{ "SkillBonuses", "Skill_4_Name" }, new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 4 Name", new string[]{ "SkillBonuses", "Skill_4_Name" } ),
                                new StashSortEntry( "Skill 4 Value", new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 5", new string[]{ "SkillBonuses", "Skill_5_Name" }, new string[]{ "SkillBonuses", "Skill_5_Value" } ),
                                new StashSortEntry( "Skill 5 Name", new string[]{ "SkillBonuses", "Skill_5_Name" } ),
                                new StashSortEntry( "Skill 5 Value", new string[]{ "SkillBonuses", "Skill_5_Value" } )
                            }
                        )
                    )
                );

                entry.Add
                (
                    new StashEntry
                    (
                        typeof( BaseJewel ), "Jewelry", 500, new StashSortData
                        (                                            //add the column information
                            new StashSortEntry[]        //the first entry is what is displayed by default
                            {
                            },
                            new StashSortEntry[]    //the second entry is what is also available to the user when they customize the gump
                            {
                                new StashSortEntry( "Physical Resist", new string[]{ "Resistances", "Physical" } ),
                                new StashSortEntry( "Fire Resist", new string[]{ "Resistances", "Fire" } ),
                                new StashSortEntry( "Cold Resist", new string[]{ "Resistances", "Cold" } ),
                                new StashSortEntry( "Energy Resist", new string[]{ "Resistances", "Energy" } ),
                                new StashSortEntry( "Poison Resist", new string[]{ "Resistances", "Poison" } ),
                                new StashSortEntry( "Body Position", "Layer" ),

                                new StashSortEntry( "Str Bonus", new string[]{ "Attributes", "BonusStr" } ),
                                new StashSortEntry( "Dex Bonus", new string[]{ "Attributes", "BonusDex" } ),
                                new StashSortEntry( "Int Bonus", new string[]{ "Attributes", "BonusInt" } ),
                                new StashSortEntry( "HP Bonus", new string[]{ "Attributes", "BonusHits" } ),
                                new StashSortEntry( "Stamina Bonus", new string[]{ "Attributes", "BonusStam" } ),
                                new StashSortEntry( "Mana Bonus", new string[]{ "Attributes", "BonusMana" } ),
                                new StashSortEntry( "FCR", new string[]{ "Attributes", "CastRecovery" } ),
                                new StashSortEntry( "FC", new string[]{ "Attributes", "CastSpeed" } ),
                                new StashSortEntry( "HCI", new string[]{ "Attributes", "AttackChance" } ),
                                new StashSortEntry( "DCI", new string[]{ "Attributes", "DefendChance" } ),
                                new StashSortEntry( "LMC", new string[]{ "Attributes", "LowerManaCost" } ),
                                new StashSortEntry( "LRC", new string[]{ "Attributes", "LowerRegCost" } ),
                                new StashSortEntry( "Luck", new string[]{ "Attributes", "Luck" } ),
                                new StashSortEntry( "Enhance Potions", new string[]{ "Attributes", "EnhancePotions" } ),
                                new StashSortEntry( "Night Sight", new string[]{ "Attributes", "NightSight" } ),
                                new StashSortEntry( "Reflect Phys Damage", new string[]{ "Attributes", "Reflect Physical" } ),
                                new StashSortEntry( "Hits Regen", new string[]{ "Attributes", "RegenHits" } ),
                                new StashSortEntry( "Stam Regen", new string[]{ "Attributes", "RegenStam" } ),
                                new StashSortEntry( "Mana Regen", new string[]{ "Attributes", "RegenMana" } ),
                                new StashSortEntry( "Spell Channeling", new string[]{ "Attributes", "SpellChanneling" } ),
                                new StashSortEntry( "Spell Damage", new string[]{ "Attributes", "SpellDamage" } ),
                                new StashSortEntry( "Damage Increase", new string[]{ "Attributes", "WeaponDamage" } ),
                                new StashSortEntry( "Swing Speed Increase", new string[]{ "Attributes", "WeaponSpeed" } ),
                                new StashSortEntry( "Skill 1", new string[]{ "SkillBonuses", "Skill_1_Name" }, new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 1 Name", new string[]{ "SkillBonuses", "Skill_1_Name" } ),
                                new StashSortEntry( "Skill 1 Value", new string[]{ "SkillBonuses", "Skill_1_Value" } ),
                                new StashSortEntry( "Skill 2", new string[]{ "SkillBonuses", "Skill_2_Name" }, new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 2 Name", new string[]{ "SkillBonuses", "Skill_2_Name" } ),
                                new StashSortEntry( "Skill 2 Value", new string[]{ "SkillBonuses", "Skill_2_Value" } ),
                                new StashSortEntry( "Skill 3", new string[]{ "SkillBonuses", "Skill_3_Name" }, new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 3 Name", new string[]{ "SkillBonuses", "Skill_3_Name" } ),
                                new StashSortEntry( "Skill 3 Value", new string[]{ "SkillBonuses", "Skill_3_Value" } ),
                                new StashSortEntry( "Skill 4", new string[]{ "SkillBonuses", "Skill_4_Name" }, new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 4 Name", new string[]{ "SkillBonuses", "Skill_4_Name" } ),
                                new StashSortEntry( "Skill 4 Value", new string[]{ "SkillBonuses", "Skill_4_Value" } ),
                                new StashSortEntry( "Skill 5", new string[]{ "SkillBonuses", "Skill_5_Name" }, new string[]{ "SkillBonuses", "Skill_5_Value" } ),
                                new StashSortEntry( "Skill 5 Name", new string[]{ "SkillBonuses", "Skill_5_Name" } ),
                                new StashSortEntry( "Skill 5 Value", new string[]{ "SkillBonuses", "Skill_5_Value" } )
                            }
                        )
                    )
                );

                return entry;
            }
        }

        [Constructable]
        public ArmoryKey() : base( 0x0 )
        {
            ItemID = 5402;
            Name = "Armory";
        }

        //this loads properties specific to the store, like the gump label, and whether it's a dynamic storage device
        protected override ItemStore GenerateItemStore()
        {
            //load the basic store info
            ItemStore store = base.GenerateItemStore();

            //properties of this storage device
            store.Label = "Armory";

            store.Dynamic = false;
            store.OfferDeeds = false;
            return store;
        }

        //serial constructor
        public ArmoryKey( Serial serial ) : base( serial )
        {
        }

        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
           
            if ( m_IsRewardItem )
                list.Add( 1076217 ); // 1st Year Veteran Reward
        }

        //events

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( 0 );

            writer.Write( (bool) m_IsRewardItem );
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            m_IsRewardItem = reader.ReadBool();
        }
    }
}


BODkey.cs


Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Solaris.ItemStore;                            //for connection to resource store data objects
using Server.Engines.BulkOrders;
using Server.Engines.VeteranRewards;

namespace Server.Items
{
    //item inherited from BaseResourceKey
    public class BODKey : BaseStoreKey, IRewardItem
    {
        private bool m_IsRewardItem;

        [CommandProperty( AccessLevel.Seer )]
        public bool IsRewardItem
        {
            get{ return m_IsRewardItem; }
            set{ m_IsRewardItem = value; InvalidateProperties(); }
        }

        //public override int DisplayColumns{ get{ return 2; } }

        public override List<StoreEntry> EntryStructure
        {
            get
            {
                List<StoreEntry> entry = base.EntryStructure;

                entry.Add( new ListEntry( typeof( SmallSmithBOD ), typeof( SmallBODListEntry ), "Sm. Blacksmith", 0x2258, 0x44E  ) );
                entry.Add( new ListEntry( typeof( SmallTailorBOD ), typeof( SmallBODListEntry ), "Sm. Tailor", 0x2258, 0x483 ) );
                //entry.Add(new ListEntry(typeof(SmallTamingBOD), typeof(SmallBODMobileListEntry), "Sm. Taming", 0x14EF, 0x1CA));

                entry.Add( new ColumnSeparationEntry() );

                entry.Add( new ListEntry( typeof( LargeSmithBOD ), typeof( LargeBODListEntry ), "Lg. Blacksmith", 0x2258, 0x44E ) );
                entry.Add( new ListEntry( typeof( LargeTailorBOD ), typeof( LargeBODListEntry ), "Lg. Tailor", 0x2258, 0x483 ) );
                //entry.Add(new ListEntry(typeof(LargeTamingBOD), typeof(LargeBODMobileListEntry), "Lg. Taming", 0x2258, 0x1CA));

                return entry;
            }
        }

        [Constructable]
        public BODKey() : base( 0x0 )        //hue 1161 - blaze
        {
            ItemID = 8793;
            Name = "Ultimate BOD Book";
        }

        //this loads properties specific to the store, like the gump label, and whether it's a dynamic storage device
        protected override ItemStore GenerateItemStore()
        {
            //load the basic store info
            ItemStore store = base.GenerateItemStore();

            //properties of this storage device
            store.Label = "BOD Storage";

            store.Dynamic = false;
            store.OfferDeeds = false;
            return store;
        }

        //serial constructor
        public BODKey( Serial serial ) : base( serial )
        {
        }

        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
           
            if ( m_IsRewardItem )
                list.Add( 1076217 ); // 1st Year Veteran Reward
        }

        //events

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( 0 );

            writer.Write( (bool) m_IsRewardItem );
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            m_IsRewardItem = reader.ReadBool();
        }
    }
}
 

Attachments

  • Universal Storage Keys Version 2.0.5 (2).rar
    131.7 KB · Views: 8
You need to modify the gump so that it uses AddLabelCropped instead of just AddLabel, because the cropped version lets you specify the width/height of the label and will clip longer names so it doesn't do what you're seeing.
 
I changed it, (not sure if thats the gump that uses the item list) getting error:


Code:
//this adds the listing of all item stores
        protected bool AddColumnEntries()
        {
            int starty = _Y;

            for( int i = 0; i < _StashEntry.SortData.AvailableColumns.Count; i++ )
            {
                if( i % MAXROWS == 0 && i > 0 )
                {
                    _Y = starty;
                    _X += COLUMNWIDTH;
                }

                StashSortEntry entry = _StashEntry.SortData.AvailableColumns[i];

                AddButton( _X + 3, _Y, 0x4B9, 0x4BA, i + 1, GumpButtonType.Reply, 0 );
                AddLabelCropped( _X + 20, _Y, 1153, entry.Header );

                _Y += EntryLineSpacing;
            }

            return true;
        }

Error:

CS1501: Line 100: No overload for method 'AddLabelCropped' takes '4' argumen

ts
------------ edit ------------------
This is from ListEntryGump.cs

Code:
        protected bool AddListEntryListing()
        {
            if( _ListEntry == null || _ListEntry.ItemListEntries.Count == 0 )
            {
                return true;
            }

            //write the header info in
            ItemListEntry entry = _ListEntry.ItemListEntries[0];
           
            for( int j = 0; j < entry.Columns.Count; j++ )
            {
                AddLabel( 40 + entry.Columns[j].X, _Y, ( _ListEntry.FilterText[j] == null || _ListEntry.FilterText[j] == "" ? 1153 : 78 ), entry.Columns[j].Header );
                AddSortFilterControls( 40 + entry.Columns[j].X, _Y + 20, j, _ListEntry.FilterText[j] );
            }

            _Y += 40;

            //list off the items that can be displayed
            for( int i = _ListingStart; i < _ListingEnd && i < _FilteredEntries.Count; i++ )
            {
                entry = _FilteredEntries[i];

                //add withdrawal button - put buttonid offset of 100 to allow for control/sort/filter button id's uninterrupted
                AddButton( 20, _Y + 3, 0x4B9, 0x4B9, 100 + i, GumpButtonType.Reply, 0 );

                //Add the details about this entry
                for( int j = 0; j < entry.Columns.Count; j++ )
                {
                    if( entry.Columns[j].Width == 0 )
                    {
                        if( j < entry.Columns.Count - 1 )
                        {
                            entry.Columns[j].Width = entry.Columns[j + 1].X - entry.Columns[j].X - 10;
                        }
                        else
                        {
                            entry.Columns[j].Width = _Width - entry.Columns[j].X - 10;
                        }
                    }
                    AddLabelCropped( 40 + entry.Columns[j].X, _Y, entry.Columns[j].Width, 20, ( entry.Hue > 1 ? entry.Hue : 1153 ), entry.Columns[j].Text );
                }

                _Y += EntryLineSpacing;
            }

            return true;
        }

It looks like it is using AddLabelCropped already, isnt it?
 
Last edited:
I changed it, (not sure if thats the gump that uses the item list) getting error:


Code:
//this adds the listing of all item stores
        protected bool AddColumnEntries()
        {
            int starty = _Y;

            for( int i = 0; i < _StashEntry.SortData.AvailableColumns.Count; i++ )
            {
                if( i % MAXROWS == 0 && i > 0 )
                {
                    _Y = starty;
                    _X += COLUMNWIDTH;
                }

                StashSortEntry entry = _StashEntry.SortData.AvailableColumns[i];

                AddButton( _X + 3, _Y, 0x4B9, 0x4BA, i + 1, GumpButtonType.Reply, 0 );
                AddLabelCropped( _X + 20, _Y, 1153, entry.Header );

                _Y += EntryLineSpacing;
            }

            return true;
        }

Error:

CS1501: Line 100: No overload for method 'AddLabelCropped' takes '4' argumen

ts
------------ edit ------------------
This is from ListEntryGump.cs

Code:
        protected bool AddListEntryListing()
        {
            if( _ListEntry == null || _ListEntry.ItemListEntries.Count == 0 )
            {
                return true;
            }

            //write the header info in
            ItemListEntry entry = _ListEntry.ItemListEntries[0];
          
            for( int j = 0; j < entry.Columns.Count; j++ )
            {
                AddLabel( 40 + entry.Columns[j].X, _Y, ( _ListEntry.FilterText[j] == null || _ListEntry.FilterText[j] == "" ? 1153 : 78 ), entry.Columns[j].Header );
                AddSortFilterControls( 40 + entry.Columns[j].X, _Y + 20, j, _ListEntry.FilterText[j] );
            }

            _Y += 40;

            //list off the items that can be displayed
            for( int i = _ListingStart; i < _ListingEnd && i < _FilteredEntries.Count; i++ )
            {
                entry = _FilteredEntries[i];

                //add withdrawal button - put buttonid offset of 100 to allow for control/sort/filter button id's uninterrupted
                AddButton( 20, _Y + 3, 0x4B9, 0x4B9, 100 + i, GumpButtonType.Reply, 0 );

                //Add the details about this entry
                for( int j = 0; j < entry.Columns.Count; j++ )
                {
                    if( entry.Columns[j].Width == 0 )
                    {
                        if( j < entry.Columns.Count - 1 )
                        {
                            entry.Columns[j].Width = entry.Columns[j + 1].X - entry.Columns[j].X - 10;
                        }
                        else
                        {
                            entry.Columns[j].Width = _Width - entry.Columns[j].X - 10;
                        }
                    }
                    AddLabelCropped( 40 + entry.Columns[j].X, _Y, entry.Columns[j].Width, 20, ( entry.Hue > 1 ? entry.Hue : 1153 ), entry.Columns[j].Text );
                }

                _Y += EntryLineSpacing;
            }

            return true;
        }

It looks like it is using AddLabelCropped already, isnt it?

Did this ever get worked out I'm having the same issue. and I'm using the 2.0.6 version
 
When you converted to AddLabelCropped, you didn't add the extra required arguments: width and height.

AddLabelCropped( _X + 20, _Y, 1153, entry.Header);

->

AddLabelCropped( _X + 20, _Y, COLUMNWIDTH - 20, 20, 1153, entry.Header);
 
you can also modify the placement of each column for a specific gump entry
Was messing around with it not too long ago to create a BOD key before I remembered there's a BOD Book in the repo.
 
this part in StashSortData.cs :: this.Add(new StashSortEntry("Item","best name",0,100));

I changed mine to
this.Add(new StashSortEntry("Item","best name",0,300)); // increasing the width of the name "cell" to 300 instead of 100

300 is a bit dramatic, but it's just for testing to show that it works

upload_2017-6-1_20-7-42.png
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back