/// <summary>
/// Sets the <paramref name="value"/> of a column by the database column's name.
/// </summary>
/// <param name="columnName">The database name of the column to get the <paramref name="value"/> for.</param>
/// <param name="value">Value to assign to the column.</param>
        public void SetValue(System.String columnName, System.Object value)
        {
            switch (columnName)
            {
            case "character_id":
                this.CharacterID = (DemoGame.CharacterID)value;
                break;

            case "item_id":
                this.ItemID = (DemoGame.ItemID)value;
                break;

            default:
                throw new ArgumentException("Field not found.", "columnName");
            }
        }
示例#2
0
/// <summary>
/// Sets the <paramref name="value"/> of a column by the database column's name.
/// </summary>
/// <param name="columnName">The database name of the column to get the <paramref name="value"/> for.</param>
/// <param name="value">Value to assign to the column.</param>
public void SetValue(System.String columnName, System.Object value)
{
switch (columnName)
{
case "character_id":
this.CharacterID = (DemoGame.CharacterID)value;
break;

case "item_id":
this.ItemID = (DemoGame.ItemID)value;
break;

default:
throw new ArgumentException("Field not found.","columnName");
}
}
示例#3
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this ActiveTradeItemTable.
/// </summary>
/// <param name="source">The IActiveTradeItemTable to copy the values from.</param>
public void CopyValuesFrom(IActiveTradeItemTable source)
{
this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
this.ItemID = (DemoGame.ItemID)source.ItemID;
}
示例#4
0
/// <summary>
/// Initializes a new instance of the <see cref="ActiveTradeItemTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
public ActiveTradeItemTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID)
{
this.CharacterID = (DemoGame.CharacterID)@characterID;
this.ItemID = (DemoGame.ItemID)@itemID;
}
示例#5
0
文件: ItemTable.cs 项目: wtfcolt/game
/// <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(System.Nullable <NetGore.Features.ActionDisplays.ActionDisplayID> @actionDisplayID, System.Byte @amount, System.String @description, System.String @equippedBody, NetGore.GrhIndex @graphic, System.Byte @height, DemoGame.SPValueType @hP, DemoGame.ItemID @iD, System.Nullable <DemoGame.ItemTemplateID> @itemTemplateID, DemoGame.SPValueType @mP, System.String @name, System.UInt16 @range, System.Int16 @statAgi, System.Int16 @statDefence, System.Int16 @statInt, System.Int16 @statMaxhit, System.Int16 @statMaxhp, System.Int16 @statMaxmp, System.Int16 @statMinhit, System.Int16 @statReqAgi, System.Int16 @statReqInt, System.Int16 @statReqStr, System.Int16 @statStr, DemoGame.ItemType @type, System.Int32 @value, DemoGame.WeaponType @weaponType, System.Byte @width)
        {
            this.ActionDisplayID = (System.Nullable <NetGore.Features.ActionDisplays.ActionDisplayID>)@actionDisplayID;
            this.Amount          = (System.Byte)@amount;
            this.Description     = (System.String)@description;
            this.EquippedBody    = (System.String)@equippedBody;
            this.Graphic         = (NetGore.GrhIndex)@graphic;
            this.Height          = (System.Byte)@height;
            this.HP             = (DemoGame.SPValueType)@hP;
            this.ID             = (DemoGame.ItemID)@iD;
            this.ItemTemplateID = (System.Nullable <DemoGame.ItemTemplateID>)@itemTemplateID;
            this.MP             = (DemoGame.SPValueType)@mP;
            this.Name           = (System.String)@name;
            this.Range          = (System.UInt16)@range;
            this.SetStat((DemoGame.StatType)DemoGame.StatType.Agi, (System.Int32)@statAgi);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.Defence, (System.Int32)@statDefence);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.Int, (System.Int32)@statInt);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.MaxHit, (System.Int32)@statMaxhit);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.MaxHP, (System.Int32)@statMaxhp);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.MaxMP, (System.Int32)@statMaxmp);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.MinHit, (System.Int32)@statMinhit);
            this.SetReqStat((DemoGame.StatType)DemoGame.StatType.Agi, (System.Int32)@statReqAgi);
            this.SetReqStat((DemoGame.StatType)DemoGame.StatType.Int, (System.Int32)@statReqInt);
            this.SetReqStat((DemoGame.StatType)DemoGame.StatType.Str, (System.Int32)@statReqStr);
            this.SetStat((DemoGame.StatType)DemoGame.StatType.Str, (System.Int32)@statStr);
            this.Type       = (DemoGame.ItemType)@type;
            this.Value      = (System.Int32)@value;
            this.WeaponType = (DemoGame.WeaponType)@weaponType;
            this.Width      = (System.Byte)@width;
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this ActiveTradeItemTable.
/// </summary>
/// <param name="source">The IActiveTradeItemTable to copy the values from.</param>
        public void CopyValuesFrom(IActiveTradeItemTable source)
        {
            this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
            this.ItemID      = (DemoGame.ItemID)source.ItemID;
        }
/// <summary>
/// Initializes a new instance of the <see cref="ActiveTradeItemTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
        public ActiveTradeItemTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID)
        {
            this.CharacterID = (DemoGame.CharacterID)@characterID;
            this.ItemID      = (DemoGame.ItemID)@itemID;
        }
示例#8
0
/// <summary>
/// Initializes a new instance of the <see cref="CharacterEquippedTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
/// <param name="slot">The initial value for the corresponding property.</param>
        public CharacterEquippedTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID, DemoGame.EquipmentSlot @slot)
        {
            this.CharacterID = (DemoGame.CharacterID)@characterID;
            this.ItemID      = (DemoGame.ItemID)@itemID;
            this.Slot        = (DemoGame.EquipmentSlot)@slot;
        }
示例#9
0
/// <summary>
/// Initializes a new instance of the <see cref="CharacterInventoryTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
/// <param name="slot">The initial value for the corresponding property.</param>
        public CharacterInventoryTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID, NetGore.InventorySlot @slot)
        {
            this.CharacterID = (DemoGame.CharacterID)@characterID;
            this.ItemID      = (DemoGame.ItemID)@itemID;
            this.Slot        = (NetGore.InventorySlot)@slot;
        }