Beispiel #1
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 "counter":
                this.Counter = (System.Int64)value;
                break;

            case "map_event_counter_id":
                this.MapEventCounterId = (System.Byte)value;
                break;

            case "map_id":
                this.MapID = (NetGore.World.MapID)value;
                break;

            default:
                throw new ArgumentException("Field not found.", "columnName");
            }
        }
Beispiel #2
0
/// <summary>
/// Initializes a new instance of the <see cref="CharacterTable"/> class.
/// </summary>
/// <param name="aIID">The initial value for the corresponding property.</param>
/// <param name="bodyID">The initial value for the corresponding property.</param>
/// <param name="cash">The initial value for the corresponding property.</param>
/// <param name="characterTemplateID">The initial value for the corresponding property.</param>
/// <param name="chatDialog">The initial value for the corresponding property.</param>
/// <param name="exp">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="level">The initial value for the corresponding property.</param>
/// <param name="loadMapID">The initial value for the corresponding property.</param>
/// <param name="loadX">The initial value for the corresponding property.</param>
/// <param name="loadY">The initial value for the corresponding property.</param>
/// <param name="moveSpeed">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="respawnMapID">The initial value for the corresponding property.</param>
/// <param name="respawnX">The initial value for the corresponding property.</param>
/// <param name="respawnY">The initial value for the corresponding property.</param>
/// <param name="shopID">The initial value for the corresponding property.</param>
/// <param name="statPoints">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="statStr">The initial value for the corresponding property.</param>
        public CharacterTable(System.Nullable <NetGore.AI.AIID> @aIID, DemoGame.BodyID @bodyID, System.Int32 @cash, System.Nullable <DemoGame.CharacterTemplateID> @characterTemplateID, System.Nullable <NetGore.Features.NPCChat.NPCChatDialogID> @chatDialog, System.Int32 @exp, DemoGame.SPValueType @hP, DemoGame.CharacterID @iD, System.Int16 @level, NetGore.World.MapID @loadMapID, System.UInt16 @loadX, System.UInt16 @loadY, System.UInt16 @moveSpeed, DemoGame.SPValueType @mP, System.String @name, System.Nullable <NetGore.World.MapID> @respawnMapID, System.Single @respawnX, System.Single @respawnY, System.Nullable <NetGore.Features.Shops.ShopID> @shopID, System.Int32 @statPoints, System.Int16 @statAgi, System.Int16 @statDefence, System.Int16 @statInt, System.Int16 @statMaxhit, System.Int16 @statMaxhp, System.Int16 @statMaxmp, System.Int16 @statMinhit, System.Int16 @statStr)
        {
            this.AIID   = (System.Nullable <NetGore.AI.AIID>)@aIID;
            this.BodyID = (DemoGame.BodyID)@bodyID;
            this.Cash   = (System.Int32)@cash;
            this.CharacterTemplateID = (System.Nullable <DemoGame.CharacterTemplateID>)@characterTemplateID;
            this.ChatDialog          = (System.Nullable <NetGore.Features.NPCChat.NPCChatDialogID>)@chatDialog;
            this.Exp          = (System.Int32)@exp;
            this.HP           = (DemoGame.SPValueType)@hP;
            this.ID           = (DemoGame.CharacterID)@iD;
            this.Level        = (System.Int16)@level;
            this.LoadMapID    = (NetGore.World.MapID)@loadMapID;
            this.LoadX        = (System.UInt16)@loadX;
            this.LoadY        = (System.UInt16)@loadY;
            this.MoveSpeed    = (System.UInt16)@moveSpeed;
            this.MP           = (DemoGame.SPValueType)@mP;
            this.Name         = (System.String)@name;
            this.RespawnMapID = (System.Nullable <NetGore.World.MapID>)@respawnMapID;
            this.RespawnX     = (System.Single)@respawnX;
            this.RespawnY     = (System.Single)@respawnY;
            this.ShopID       = (System.Nullable <NetGore.Features.Shops.ShopID>)@shopID;
            this.StatPoints   = (System.Int32)@statPoints;
            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.SetStat((DemoGame.StatType)DemoGame.StatType.Str, (System.Int32)@statStr);
        }
Beispiel #3
0
/// <summary>
/// Initializes a new instance of the <see cref="MapTable"/> class.
/// </summary>
/// <param name="iD">The initial value for the corresponding property.</param>
/// <param name="name">The initial value for the corresponding property.</param>
        public MapTable(NetGore.World.MapID @iD, System.String @name)
        {
            this.ID   = (NetGore.World.MapID)@iD;
            this.Name = (System.String)@name;
        }
Beispiel #4
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 "counter":
this.Counter = (System.Int64)value;
break;

case "map_event_counter_id":
this.MapEventCounterId = (System.Byte)value;
break;

case "map_id":
this.MapID = (NetGore.World.MapID)value;
break;

default:
throw new ArgumentException("Field not found.","columnName");
}
}
Beispiel #5
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this EventCountersMapTable.
/// </summary>
/// <param name="source">The IEventCountersMapTable to copy the values from.</param>
public void CopyValuesFrom(IEventCountersMapTable source)
{
this.Counter = (System.Int64)source.Counter;
this.MapEventCounterId = (System.Byte)source.MapEventCounterId;
this.MapID = (NetGore.World.MapID)source.MapID;
}
Beispiel #6
0
/// <summary>
/// Initializes a new instance of the <see cref="EventCountersMapTable"/> class.
/// </summary>
/// <param name="counter">The initial value for the corresponding property.</param>
/// <param name="mapEventCounterId">The initial value for the corresponding property.</param>
/// <param name="mapID">The initial value for the corresponding property.</param>
public EventCountersMapTable(System.Int64 @counter, System.Byte @mapEventCounterId, NetGore.World.MapID @mapID)
{
this.Counter = (System.Int64)@counter;
this.MapEventCounterId = (System.Byte)@mapEventCounterId;
this.MapID = (NetGore.World.MapID)@mapID;
}
Beispiel #7
0
/// <summary>
/// Initializes a new instance of the <see cref="MapSpawnTable"/> class.
/// </summary>
/// <param name="amount">The initial value for the corresponding property.</param>
/// <param name="characterTemplateID">The initial value for the corresponding property.</param>
/// <param name="height">The initial value for the corresponding property.</param>
/// <param name="iD">The initial value for the corresponding property.</param>
/// <param name="mapID">The initial value for the corresponding property.</param>
/// <param name="width">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 MapSpawnTable(System.Byte @amount, DemoGame.CharacterTemplateID @characterTemplateID, System.Nullable <System.UInt16> @height, DemoGame.MapSpawnValuesID @iD, NetGore.World.MapID @mapID, System.Nullable <System.UInt16> @width, System.Nullable <System.UInt16> @x, System.Nullable <System.UInt16> @y)
        {
            this.Amount = (System.Byte)@amount;
            this.CharacterTemplateID = (DemoGame.CharacterTemplateID)@characterTemplateID;
            this.Height = (System.Nullable <System.UInt16>)@height;
            this.ID     = (DemoGame.MapSpawnValuesID)@iD;
            this.MapID  = (NetGore.World.MapID)@mapID;
            this.Width  = (System.Nullable <System.UInt16>)@width;
            this.X      = (System.Nullable <System.UInt16>)@x;
            this.Y      = (System.Nullable <System.UInt16>)@y;
        }
Beispiel #8
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this EventCountersMapTable.
/// </summary>
/// <param name="source">The IEventCountersMapTable to copy the values from.</param>
        public void CopyValuesFrom(IEventCountersMapTable source)
        {
            this.Counter           = (System.Int64)source.Counter;
            this.MapEventCounterId = (System.Byte)source.MapEventCounterId;
            this.MapID             = (NetGore.World.MapID)source.MapID;
        }
Beispiel #9
0
/// <summary>
/// Initializes a new instance of the <see cref="EventCountersMapTable"/> class.
/// </summary>
/// <param name="counter">The initial value for the corresponding property.</param>
/// <param name="mapEventCounterId">The initial value for the corresponding property.</param>
/// <param name="mapID">The initial value for the corresponding property.</param>
        public EventCountersMapTable(System.Int64 @counter, System.Byte @mapEventCounterId, NetGore.World.MapID @mapID)
        {
            this.Counter           = (System.Int64)@counter;
            this.MapEventCounterId = (System.Byte)@mapEventCounterId;
            this.MapID             = (NetGore.World.MapID)@mapID;
        }