コード例 #1
0
        public void CreateItem(ItemTemplateID id, byte amount)
        {
            // Get the item template
            var template = ItemTemplateManager.Instance[id];
            if (template == null)
            {
                UserChat("Invalid item template ID: " + id);
                return;
            }

            if (amount <= 0)
            {
                UserChat("Invalid amount specified. The amount must be 1 or more.");
                return;
            }

            // Create the item
            var item = new ItemEntity(template, amount);

            // Give to user
            var remainder = User.Inventory.TryAdd(item);

            // Delete any that failed to be added
            if (remainder != null)
            {
                UserChat(remainder.Amount + " units could not be added to your inventory.");
                remainder.Destroy();
            }
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ItemTemplateTable"/> class.
 /// </summary>
 /// <param name="actionDisplayID">The initial value for the corresponding property.</param>
 /// <param name="description">The initial value for the corresponding property.</param>
 /// <param name="equippedBody">The initial value for the corresponding property.</param>
 /// <param name="graphic">The initial value for the corresponding property.</param>
 /// <param name="height">The initial value for the corresponding property.</param>
 /// <param name="hP">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="mP">The initial value for the corresponding property.</param>
 /// <param name="name">The initial value for the corresponding property.</param>
 /// <param name="range">The initial value for the corresponding property.</param>
 /// <param name="statAgi">The initial value for the corresponding property.</param>
 /// <param name="statDefence">The initial value for the corresponding property.</param>
 /// <param name="statInt">The initial value for the corresponding property.</param>
 /// <param name="statMaxhit">The initial value for the corresponding property.</param>
 /// <param name="statMaxhp">The initial value for the corresponding property.</param>
 /// <param name="statMaxmp">The initial value for the corresponding property.</param>
 /// <param name="statMinhit">The initial value for the corresponding property.</param>
 /// <param name="statReqAgi">The initial value for the corresponding property.</param>
 /// <param name="statReqInt">The initial value for the corresponding property.</param>
 /// <param name="statReqStr">The initial value for the corresponding property.</param>
 /// <param name="statStr">The initial value for the corresponding property.</param>
 /// <param name="type">The initial value for the corresponding property.</param>
 /// <param name="value">The initial value for the corresponding property.</param>
 /// <param name="weaponType">The initial value for the corresponding property.</param>
 /// <param name="width">The initial value for the corresponding property.</param>
 public ItemTemplateTable(ActionDisplayID? @actionDisplayID, String @description, String @equippedBody, GrhIndex @graphic,
                          Byte @height, SPValueType @hP, ItemTemplateID @iD, SPValueType @mP, String @name, UInt16 @range,
                          Int16 @statAgi, Int16 @statDefence, Int16 @statInt, Int16 @statMaxhit, Int16 @statMaxhp,
                          Int16 @statMaxmp, Int16 @statMinhit, Int16 @statReqAgi, Int16 @statReqInt, Int16 @statReqStr,
                          Int16 @statStr, ItemType @type, Int32 @value, WeaponType @weaponType, Byte @width)
 {
     ActionDisplayID = @actionDisplayID;
     Description     = @description;
     EquippedBody    = @equippedBody;
     Graphic         = @graphic;
     Height          = @height;
     HP    = @hP;
     ID    = @iD;
     MP    = @mP;
     Name  = @name;
     Range = @range;
     SetStat(StatType.Agi, @statAgi);
     SetStat(StatType.Defence, @statDefence);
     SetStat(StatType.Int, @statInt);
     SetStat(StatType.MaxHit, @statMaxhit);
     SetStat(StatType.MaxHP, @statMaxhp);
     SetStat(StatType.MaxMP, @statMaxmp);
     SetStat(StatType.MinHit, @statMinhit);
     SetReqStat(StatType.Agi, @statReqAgi);
     SetReqStat(StatType.Int, @statReqInt);
     SetReqStat(StatType.Str, @statReqStr);
     SetStat(StatType.Str, @statStr);
     Type       = @type;
     Value      = @value;
     WeaponType = @weaponType;
     Width      = @width;
 }
コード例 #3
0
        public void CreateItem(ItemTemplateID id, byte amount)
        {
            // Get the item template
            var template = ItemTemplateManager.Instance[id];

            if (template == null)
            {
                UserChat("Invalid item template ID: " + id);
                return;
            }

            if (amount <= 0)
            {
                UserChat("Invalid amount specified. The amount must be 1 or more.");
                return;
            }

            // Create the item
            var item = new ItemEntity(template, amount);

            // Give to user
            var remainder = User.Inventory.TryAdd(item);

            // Delete any that failed to be added
            if (remainder != null)
            {
                UserChat(remainder.Amount + " units could not be added to your inventory.");
                remainder.Destroy();
            }
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateInventoryItem"/> struct.
 /// </summary>
 /// <param name="id">The <see cref="ItemTemplateID"/>.</param>
 /// <param name="chance">The chance of the item being in the inventory.</param>
 /// <param name="min">The minimum amount of items to be created.</param>
 /// <param name="max">The maximum amount of items to be created.</param>
 public CharacterTemplateInventoryItem(ItemTemplateID id, ItemChance chance, ushort min, ushort max)
 {
     _id     = id;
     _chance = chance;
     _min    = min;
     _max    = max;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsCountUserConsumeItemTable"/> class.
 /// </summary>
 /// <param name="count">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="lastUpdate">The initial value for the corresponding property.</param>
 /// <param name="userID">The initial value for the corresponding property.</param>
 public WorldStatsCountUserConsumeItemTable(Int32 @count, ItemTemplateID @itemTemplateID, DateTime @lastUpdate,
                                            CharacterID @userID)
 {
     Count          = @count;
     ItemTemplateID = @itemTemplateID;
     LastUpdate     = @lastUpdate;
     UserID         = @userID;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateEquippedTable"/> class.
 /// </summary>
 /// <param name="chance">The initial value for the corresponding property.</param>
 /// <param name="characterTemplateID">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 public CharacterTemplateEquippedTable(ItemChance @chance, CharacterTemplateID @characterTemplateID, Int32 @iD,
                                       ItemTemplateID @itemTemplateID)
 {
     Chance = @chance;
     CharacterTemplateID = @characterTemplateID;
     ID             = @iD;
     ItemTemplateID = @itemTemplateID;
 }
コード例 #7
0
        /// <summary>
        /// Gets the string to draw for a list item.
        /// </summary>
        /// <param name="x">The list item.</param>
        /// <returns>The string to draw for a list item.</returns>
        static string GetDrawString(ItemTemplateID x)
        {
            var t = ItemTemplateManager.Instance[x];

            if (t == null)
                return "ID " + x;
            else
                return t.ID + ". " + t.Name;
        }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateInventoryTable"/> class.
 /// </summary>
 /// <param name="chance">The initial value for the corresponding property.</param>
 /// <param name="characterTemplateID">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="max">The initial value for the corresponding property.</param>
 /// <param name="min">The initial value for the corresponding property.</param>
 public CharacterTemplateInventoryTable(ItemChance @chance, CharacterTemplateID @characterTemplateID, Int32 @iD,
                                        ItemTemplateID @itemTemplateID, Byte @max, Byte @min)
 {
     Chance = @chance;
     CharacterTemplateID = @characterTemplateID;
     ID             = @iD;
     ItemTemplateID = @itemTemplateID;
     Max            = @max;
     Min            = @min;
 }
コード例 #9
0
        /// <summary>
        /// Provides the extra text for the <see cref="AdvancedPropertyDescriptor"/> for a
        /// <see cref="ItemTemplateID"/>.
        /// </summary>
        /// <param name="v">The value.</param>
        /// <returns>The extra text to display.</returns>
        static string ExtraTextProvider_ItemTemplateID(ItemTemplateID v)
        {
            var item = ItemTemplateManager.Instance[v];

            if (item == null)
            {
                return(null);
            }

            return(item.Name);
        }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsUserConsumeItemTable"/> class.
 /// </summary>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="mapID">The initial value for the corresponding property.</param>
 /// <param name="userID">The initial value for the corresponding property.</param>
 /// <param name="when">The initial value for the corresponding property.</param>
 /// <param name="x">The initial value for the corresponding property.</param>
 /// <param name="y">The initial value for the corresponding property.</param>
 public WorldStatsUserConsumeItemTable(UInt32 @iD, ItemTemplateID @itemTemplateID, MapID? @mapID, CharacterID @userID,
                                       DateTime @when, UInt16 @x, UInt16 @y)
 {
     ID             = @iD;
     ItemTemplateID = @itemTemplateID;
     MapID          = @mapID;
     UserID         = @userID;
     When           = @when;
     X = @x;
     Y = @y;
 }
コード例 #11
0
ファイル: ItemTemplateIDListBox.cs プロジェクト: wtfcolt/game
        /// <summary>
        /// Gets the string to draw for a list item.
        /// </summary>
        /// <param name="x">The list item.</param>
        /// <returns>The string to draw for a list item.</returns>
        static string GetDrawString(ItemTemplateID x)
        {
            var t = ItemTemplateManager.Instance[x];

            if (t == null)
            {
                return("ID " + x);
            }
            else
            {
                return(t.ID + ". " + t.Name);
            }
        }
コード例 #12
0
ファイル: ItemEntity.cs プロジェクト: Vizzini/netgore
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemEntity"/> class.
        /// </summary>
        /// <param name="pos">The pos.</param>
        /// <param name="size">The size.</param>
        /// <param name="templateID">The template ID.</param>
        /// <param name="name">The name.</param>
        /// <param name="desc">The desc.</param>
        /// <param name="type">The type.</param>
        /// <param name="weaponType">Type of the weapon.</param>
        /// <param name="range">The range.</param>
        /// <param name="graphic">The graphic.</param>
        /// <param name="value">The value.</param>
        /// <param name="amount">The amount.</param>
        /// <param name="hp">The hp.</param>
        /// <param name="mp">The mp.</param>
        /// <param name="equippedBody">The equipped body.</param>
        /// <param name="actionDisplayID">The action display ID.</param>
        /// <param name="baseStats">The base stats.</param>
        /// <param name="reqStats">The req stats.</param>
        ItemEntity(Vector2 pos, Vector2 size, ItemTemplateID? templateID, string name, string desc, ItemType type,
                   WeaponType weaponType, ushort range, GrhIndex graphic, int value, byte amount, SPValueType hp, SPValueType mp,
                   string equippedBody, ActionDisplayID? actionDisplayID, IEnumerable<Stat<StatType>> baseStats,
                   IEnumerable<Stat<StatType>> reqStats) : base(pos, size)
        {
            _templateID = templateID;
            _name = name;
            _description = desc;
            _graphicIndex = graphic;
            _value = value;
            _amount = amount;
            _type = type;
            _weaponType = weaponType;
            _range = range;
            _hp = hp;
            _mp = mp;
            _equippedBody = equippedBody;
            _actionDisplayID = actionDisplayID;

            _baseStats = NewItemStats(baseStats, StatCollectionType.Base);
            _reqStats = NewItemStats(reqStats, StatCollectionType.Requirement);

            Resized += ItemEntity_Resized;
        }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsUserConsumeItemTable"/> class.
 /// </summary>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="mapID">The initial value for the corresponding property.</param>
 /// <param name="userID">The initial value for the corresponding property.</param>
 /// <param name="when">The initial value for the corresponding property.</param>
 /// <param name="x">The initial value for the corresponding property.</param>
 /// <param name="y">The initial value for the corresponding property.</param>
 public WorldStatsUserConsumeItemTable(UInt32 @iD, ItemTemplateID @itemTemplateID, MapID? @mapID, CharacterID @userID,
                                       DateTime @when, UInt16 @x, UInt16 @y)
 {
     ID = @iD;
     ItemTemplateID = @itemTemplateID;
     MapID = @mapID;
     UserID = @userID;
     When = @when;
     X = @x;
     Y = @y;
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestRewardItemTable"/> class.
 /// </summary>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public QuestRewardItemTable(Byte @amount, ItemTemplateID @itemTemplateID, QuestID @questID)
 {
     Amount         = @amount;
     ItemTemplateID = @itemTemplateID;
     QuestID        = @questID;
 }
コード例 #15
0
 public void Execute(ShopID shopID, ItemTemplateID itemID)
 {
     Execute(new ShopItemTable(itemID, shopID));
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsCountConsumeItemTable"/> class.
 /// </summary>
 /// <param name="count">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="lastUpdate">The initial value for the corresponding property.</param>
 public WorldStatsCountConsumeItemTable(Int32 @count, ItemTemplateID @itemTemplateID, DateTime @lastUpdate)
 {
     Count          = @count;
     ItemTemplateID = @itemTemplateID;
     LastUpdate     = @lastUpdate;
 }
コード例 #17
0
ファイル: ShopItemTable.cs プロジェクト: mateuscezar/netgore
 /// <summary>
 /// Initializes a new instance of the <see cref="ShopItemTable"/> class.
 /// </summary>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="shopID">The initial value for the corresponding property.</param>
 public ShopItemTable(ItemTemplateID @itemTemplateID, ShopID @shopID)
 {
     ItemTemplateID = @itemTemplateID;
     ShopID = @shopID;
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestItemTemplateAmount"/> struct.
 /// </summary>
 /// <param name="itemTemplateID">The item template ID.</param>
 /// <param name="amount">The amount.</param>
 public QuestItemTemplateAmount(ItemTemplateID itemTemplateID, byte amount)
     : this(_itemTemplateManager[itemTemplateID], amount)
 {
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShopItemTable"/> class.
 /// </summary>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="shopID">The initial value for the corresponding property.</param>
 public ShopItemTable(ItemTemplateID @itemTemplateID, ShopID @shopID)
 {
     ItemTemplateID = @itemTemplateID;
     ShopID         = @shopID;
 }
コード例 #20
0
ファイル: ItemTable.cs プロジェクト: Vizzini/netgore
 /// <summary>
 /// Initializes a new instance of the <see cref="ItemTable"/> class.
 /// </summary>
 /// <param name="actionDisplayID">The initial value for the corresponding property.</param>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="description">The initial value for the corresponding property.</param>
 /// <param name="equippedBody">The initial value for the corresponding property.</param>
 /// <param name="graphic">The initial value for the corresponding property.</param>
 /// <param name="height">The initial value for the corresponding property.</param>
 /// <param name="hP">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="mP">The initial value for the corresponding property.</param>
 /// <param name="name">The initial value for the corresponding property.</param>
 /// <param name="range">The initial value for the corresponding property.</param>
 /// <param name="statAgi">The initial value for the corresponding property.</param>
 /// <param name="statDefence">The initial value for the corresponding property.</param>
 /// <param name="statInt">The initial value for the corresponding property.</param>
 /// <param name="statMaxhit">The initial value for the corresponding property.</param>
 /// <param name="statMaxhp">The initial value for the corresponding property.</param>
 /// <param name="statMaxmp">The initial value for the corresponding property.</param>
 /// <param name="statMinhit">The initial value for the corresponding property.</param>
 /// <param name="statReqAgi">The initial value for the corresponding property.</param>
 /// <param name="statReqInt">The initial value for the corresponding property.</param>
 /// <param name="statReqStr">The initial value for the corresponding property.</param>
 /// <param name="statStr">The initial value for the corresponding property.</param>
 /// <param name="type">The initial value for the corresponding property.</param>
 /// <param name="value">The initial value for the corresponding property.</param>
 /// <param name="weaponType">The initial value for the corresponding property.</param>
 /// <param name="width">The initial value for the corresponding property.</param>
 public ItemTable(ActionDisplayID? @actionDisplayID, Byte @amount, String @description, String @equippedBody,
                  GrhIndex @graphic, Byte @height, SPValueType @hP, ItemID @iD, ItemTemplateID? @itemTemplateID,
                  SPValueType @mP, String @name, UInt16 @range, Int16 @statAgi, Int16 @statDefence, Int16 @statInt,
                  Int16 @statMaxhit, Int16 @statMaxhp, Int16 @statMaxmp, Int16 @statMinhit, Int16 @statReqAgi,
                  Int16 @statReqInt, Int16 @statReqStr, Int16 @statStr, ItemType @type, Int32 @value,
                  WeaponType @weaponType, Byte @width)
 {
     ActionDisplayID = @actionDisplayID;
     Amount = @amount;
     Description = @description;
     EquippedBody = @equippedBody;
     Graphic = @graphic;
     Height = @height;
     HP = @hP;
     ID = @iD;
     ItemTemplateID = @itemTemplateID;
     MP = @mP;
     Name = @name;
     Range = @range;
     SetStat(StatType.Agi, @statAgi);
     SetStat(StatType.Defence, @statDefence);
     SetStat(StatType.Int, @statInt);
     SetStat(StatType.MaxHit, @statMaxhit);
     SetStat(StatType.MaxHP, @statMaxhp);
     SetStat(StatType.MaxMP, @statMaxmp);
     SetStat(StatType.MinHit, @statMinhit);
     SetReqStat(StatType.Agi, @statReqAgi);
     SetReqStat(StatType.Int, @statReqInt);
     SetReqStat(StatType.Str, @statReqStr);
     SetStat(StatType.Str, @statStr);
     Type = @type;
     Value = @value;
     WeaponType = @weaponType;
     Width = @width;
 }
コード例 #21
0
 public void Execute(QuestID questID, ItemTemplateID itemID, byte amount)
 {
     Execute(new QuestRewardItemTable(amount, itemID, questID));
 }
コード例 #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventCountersItemTemplateTable"/> class.
 /// </summary>
 /// <param name="counter">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateEventCounterId">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 public EventCountersItemTemplateTable(Int64 @counter, Byte @itemTemplateEventCounterId, ItemTemplateID @itemTemplateID)
 {
     Counter = @counter;
     ItemTemplateEventCounterId = @itemTemplateEventCounterId;
     ItemTemplateID = @itemTemplateID;
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateEquippedItem"/> struct.
 /// </summary>
 /// <param name="id">The <see cref="ItemTemplateID"/>.</param>
 /// <param name="chance">The chance of the item being equipped.</param>
 public CharacterTemplateEquippedItem(ItemTemplateID id, ItemChance chance)
 {
     _id     = id;
     _chance = chance;
 }
コード例 #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateEquippedTable"/> class.
 /// </summary>
 /// <param name="chance">The initial value for the corresponding property.</param>
 /// <param name="characterTemplateID">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 public CharacterTemplateEquippedTable(ItemChance @chance, CharacterTemplateID @characterTemplateID, Int32 @iD,
                                       ItemTemplateID @itemTemplateID)
 {
     Chance = @chance;
     CharacterTemplateID = @characterTemplateID;
     ID = @iD;
     ItemTemplateID = @itemTemplateID;
 }
コード例 #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsUserShoppingTable"/> class.
 /// </summary>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="characterID">The initial value for the corresponding property.</param>
 /// <param name="cost">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="mapID">The initial value for the corresponding property.</param>
 /// <param name="saleType">The initial value for the corresponding property.</param>
 /// <param name="shopID">The initial value for the corresponding property.</param>
 /// <param name="when">The initial value for the corresponding property.</param>
 /// <param name="x">The initial value for the corresponding property.</param>
 /// <param name="y">The initial value for the corresponding property.</param>
 public WorldStatsUserShoppingTable(Byte @amount, CharacterID @characterID, Int32 @cost, UInt32 @iD,
                                    ItemTemplateID? @itemTemplateID, MapID? @mapID, SByte @saleType, ShopID @shopID,
                                    DateTime @when, UInt16 @x, UInt16 @y)
 {
     Amount = @amount;
     CharacterID = @characterID;
     Cost = @cost;
     ID = @iD;
     ItemTemplateID = @itemTemplateID;
     MapID = @mapID;
     SaleType = @saleType;
     ShopID = @shopID;
     When = @when;
     X = @x;
     Y = @y;
 }
コード例 #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestRequireFinishItemTable"/> class.
 /// </summary>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public QuestRequireFinishItemTable(Byte @amount, ItemTemplateID @itemTemplateID, QuestID @questID)
 {
     Amount         = @amount;
     ItemTemplateID = @itemTemplateID;
     QuestID        = @questID;
 }
コード例 #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsCountUserConsumeItemTable"/> class.
 /// </summary>
 /// <param name="count">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="lastUpdate">The initial value for the corresponding property.</param>
 /// <param name="userID">The initial value for the corresponding property.</param>
 public WorldStatsCountUserConsumeItemTable(Int32 @count, ItemTemplateID @itemTemplateID, DateTime @lastUpdate,
                                            CharacterID @userID)
 {
     Count = @count;
     ItemTemplateID = @itemTemplateID;
     LastUpdate = @lastUpdate;
     UserID = @userID;
 }
コード例 #28
0
ファイル: ItemTemplateAndAmount.cs プロジェクト: wtfcolt/game
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestItemTemplateAmount"/> struct.
 /// </summary>
 /// <param name="itemTemplateID">The item template ID.</param>
 /// <param name="amount">The amount.</param>
 public QuestItemTemplateAmount(ItemTemplateID itemTemplateID, byte amount)
     : this(_itemTemplateManager[itemTemplateID], amount)
 {
 }
コード例 #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsCountItemCreateTable"/> class.
 /// </summary>
 /// <param name="count">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="lastUpdate">The initial value for the corresponding property.</param>
 public WorldStatsCountItemCreateTable(Int32 @count, ItemTemplateID @itemTemplateID, DateTime @lastUpdate)
 {
     Count = @count;
     ItemTemplateID = @itemTemplateID;
     LastUpdate = @lastUpdate;
 }
コード例 #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestRequireFinishItemTable"/> class.
 /// </summary>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public QuestRequireFinishItemTable(Byte @amount, ItemTemplateID @itemTemplateID, QuestID @questID)
 {
     Amount = @amount;
     ItemTemplateID = @itemTemplateID;
     QuestID = @questID;
 }
コード例 #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterTemplateInventoryTable"/> class.
 /// </summary>
 /// <param name="chance">The initial value for the corresponding property.</param>
 /// <param name="characterTemplateID">The initial value for the corresponding property.</param>
 /// <param name="iD">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="max">The initial value for the corresponding property.</param>
 /// <param name="min">The initial value for the corresponding property.</param>
 public CharacterTemplateInventoryTable(ItemChance @chance, CharacterTemplateID @characterTemplateID, Int32 @iD,
                                        ItemTemplateID @itemTemplateID, Byte @max, Byte @min)
 {
     Chance = @chance;
     CharacterTemplateID = @characterTemplateID;
     ID = @iD;
     ItemTemplateID = @itemTemplateID;
     Max = @max;
     Min = @min;
 }
コード例 #32
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventCountersItemTemplateTable"/> class.
 /// </summary>
 /// <param name="counter">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateEventCounterId">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 public EventCountersItemTemplateTable(Int64 @counter, Byte @itemTemplateEventCounterId, ItemTemplateID @itemTemplateID)
 {
     Counter = @counter;
     ItemTemplateEventCounterId = @itemTemplateEventCounterId;
     ItemTemplateID             = @itemTemplateID;
 }
コード例 #33
0
        /// <summary>
        /// Provides the extra text for the <see cref="AdvancedPropertyDescriptor"/> for a
        /// <see cref="ItemTemplateID"/>.
        /// </summary>
        /// <param name="v">The value.</param>
        /// <returns>The extra text to display.</returns>
        static string ExtraTextProvider_ItemTemplateID(ItemTemplateID v)
        {
            var item = ItemTemplateManager.Instance[v];
            if (item == null)
                return null;

            return item.Name;
        }
コード例 #34
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QuestRewardItemTable"/> class.
 /// </summary>
 /// <param name="amount">The initial value for the corresponding property.</param>
 /// <param name="itemTemplateID">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public QuestRewardItemTable(Byte @amount, ItemTemplateID @itemTemplateID, QuestID @questID)
 {
     Amount = @amount;
     ItemTemplateID = @itemTemplateID;
     QuestID = @questID;
 }