/// <summary>
 /// Copies the column values into the given Dictionary using the database column name
 /// with a prefixed @ as the key. The keys must already exist in the Dictionary;
 /// this method will not create them if they are missing.
 /// </summary>
 /// <param name="source">The object to copy the values from.</param>
 /// <param name="dic">The Dictionary to copy the values into.</param>
 public static void CopyValues(IViewNpcCharacterTable source, IDictionary <String, Object> dic)
 {
     dic["ai_id"]   = source.AIID;
     dic["body_id"] = source.BodyID;
     dic["cash"]    = source.Cash;
     dic["character_template_id"] = source.CharacterTemplateID;
     dic["chat_dialog"]           = source.ChatDialog;
     dic["exp"]            = source.Exp;
     dic["hp"]             = source.HP;
     dic["id"]             = source.ID;
     dic["level"]          = source.Level;
     dic["load_map_id"]    = source.LoadMapID;
     dic["load_x"]         = source.LoadX;
     dic["load_y"]         = source.LoadY;
     dic["move_speed"]     = source.MoveSpeed;
     dic["mp"]             = source.MP;
     dic["name"]           = source.Name;
     dic["respawn_map_id"] = source.RespawnMapID;
     dic["respawn_x"]      = source.RespawnX;
     dic["respawn_y"]      = source.RespawnY;
     dic["shop_id"]        = source.ShopID;
     dic["statpoints"]     = source.StatPoints;
     dic["stat_agi"]       = source.StatAgi;
     dic["stat_defence"]   = source.StatDefence;
     dic["stat_int"]       = source.StatInt;
     dic["stat_maxhit"]    = source.StatMaxhit;
     dic["stat_maxhp"]     = source.StatMaxhp;
     dic["stat_maxmp"]     = source.StatMaxmp;
     dic["stat_minhit"]    = source.StatMinhit;
     dic["stat_str"]       = source.StatStr;
 }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this ViewNpcCharacterTable.
 /// </summary>
 /// <param name="source">The IViewNpcCharacterTable to copy the values from.</param>
 public void CopyValuesFrom(IViewNpcCharacterTable source)
 {
     AIID   = source.AIID;
     BodyID = source.BodyID;
     Cash   = source.Cash;
     CharacterTemplateID = source.CharacterTemplateID;
     ChatDialog          = source.ChatDialog;
     Exp          = source.Exp;
     HP           = source.HP;
     ID           = source.ID;
     Level        = source.Level;
     LoadMapID    = source.LoadMapID;
     LoadX        = source.LoadX;
     LoadY        = source.LoadY;
     MoveSpeed    = source.MoveSpeed;
     MP           = source.MP;
     Name         = source.Name;
     RespawnMapID = source.RespawnMapID;
     RespawnX     = source.RespawnX;
     RespawnY     = source.RespawnY;
     ShopID       = source.ShopID;
     StatPoints   = source.StatPoints;
     StatAgi      = source.StatAgi;
     StatDefence  = source.StatDefence;
     StatInt      = source.StatInt;
     StatMaxhit   = source.StatMaxhit;
     StatMaxhp    = source.StatMaxhp;
     StatMaxmp    = source.StatMaxmp;
     StatMinhit   = source.StatMinhit;
     StatStr      = source.StatStr;
 }
/// <summary>
/// Checks if this <see cref="IViewNpcCharacterTable"/> contains the same values as another <see cref="IViewNpcCharacterTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IViewNpcCharacterTable"/>.</param>
/// <param name="otherItem">The <see cref="IViewNpcCharacterTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IViewNpcCharacterTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this IViewNpcCharacterTable source, IViewNpcCharacterTable otherItem)
        {
            return(Equals(source.AIID, otherItem.AIID) &&
                   Equals(source.BodyID, otherItem.BodyID) &&
                   Equals(source.Cash, otherItem.Cash) &&
                   Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) &&
                   Equals(source.ChatDialog, otherItem.ChatDialog) &&
                   Equals(source.Exp, otherItem.Exp) &&
                   Equals(source.HP, otherItem.HP) &&
                   Equals(source.ID, otherItem.ID) &&
                   Equals(source.Level, otherItem.Level) &&
                   Equals(source.LoadMapID, otherItem.LoadMapID) &&
                   Equals(source.LoadX, otherItem.LoadX) &&
                   Equals(source.LoadY, otherItem.LoadY) &&
                   Equals(source.MoveSpeed, otherItem.MoveSpeed) &&
                   Equals(source.MP, otherItem.MP) &&
                   Equals(source.Name, otherItem.Name) &&
                   Equals(source.RespawnMapID, otherItem.RespawnMapID) &&
                   Equals(source.RespawnX, otherItem.RespawnX) &&
                   Equals(source.RespawnY, otherItem.RespawnY) &&
                   Equals(source.ShopID, otherItem.ShopID) &&
                   Equals(source.StatPoints, otherItem.StatPoints) &&
                   Equals(source.StatAgi, otherItem.StatAgi) &&
                   Equals(source.StatDefence, otherItem.StatDefence) &&
                   Equals(source.StatInt, otherItem.StatInt) &&
                   Equals(source.StatMaxhit, otherItem.StatMaxhit) &&
                   Equals(source.StatMaxhp, otherItem.StatMaxhp) &&
                   Equals(source.StatMaxmp, otherItem.StatMaxmp) &&
                   Equals(source.StatMinhit, otherItem.StatMinhit) &&
                   Equals(source.StatStr, otherItem.StatStr));
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this ViewNpcCharacterTable.
/// </summary>
/// <param name="source">The IViewNpcCharacterTable to copy the values from.</param>
        public void CopyValuesFrom(IViewNpcCharacterTable source)
        {
            this.AIID   = (System.Nullable <NetGore.AI.AIID>)source.AIID;
            this.BodyID = (DemoGame.BodyID)source.BodyID;
            this.Cash   = (System.Int32)source.Cash;
            this.CharacterTemplateID = (System.Nullable <DemoGame.CharacterTemplateID>)source.CharacterTemplateID;
            this.ChatDialog          = (System.Nullable <NetGore.Features.NPCChat.NPCChatDialogID>)source.ChatDialog;
            this.Exp          = (System.Int32)source.Exp;
            this.HP           = (DemoGame.SPValueType)source.HP;
            this.ID           = (System.Int32)source.ID;
            this.Level        = (System.Int16)source.Level;
            this.LoadMapID    = (NetGore.World.MapID)source.LoadMapID;
            this.LoadX        = (System.UInt16)source.LoadX;
            this.LoadY        = (System.UInt16)source.LoadY;
            this.MoveSpeed    = (System.UInt16)source.MoveSpeed;
            this.MP           = (DemoGame.SPValueType)source.MP;
            this.Name         = (System.String)source.Name;
            this.RespawnMapID = (System.Nullable <NetGore.World.MapID>)source.RespawnMapID;
            this.RespawnX     = (System.Single)source.RespawnX;
            this.RespawnY     = (System.Single)source.RespawnY;
            this.ShopID       = (System.Nullable <NetGore.Features.Shops.ShopID>)source.ShopID;
            this.StatPoints   = (System.Int32)source.StatPoints;
            this.StatAgi      = (System.Int16)source.StatAgi;
            this.StatDefence  = (System.Int16)source.StatDefence;
            this.StatInt      = (System.Int16)source.StatInt;
            this.StatMaxhit   = (System.Int16)source.StatMaxhit;
            this.StatMaxhp    = (System.Int16)source.StatMaxhp;
            this.StatMaxmp    = (System.Int16)source.StatMaxmp;
            this.StatMinhit   = (System.Int16)source.StatMinhit;
            this.StatStr      = (System.Int16)source.StatStr;
        }
/// <summary>
/// Copies the column values into the given DbParameterValues using the database column name
/// with a prefixed @ as the key. The keys must already exist in the DbParameterValues;
///  this method will not create them if they are missing.
/// </summary>
/// <param name="source">The object to copy the values from.</param>
/// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void CopyValues(this IViewNpcCharacterTable source, NetGore.Db.DbParameterValues paramValues)
        {
            paramValues["ai_id"]   = (System.Nullable <System.UInt16>)source.AIID;
            paramValues["body_id"] = (System.UInt16)source.BodyID;
            paramValues["cash"]    = (System.Int32)source.Cash;
            paramValues["character_template_id"] = (System.Nullable <System.UInt16>)source.CharacterTemplateID;
            paramValues["chat_dialog"]           = (System.Nullable <System.UInt16>)source.ChatDialog;
            paramValues["exp"]            = (System.Int32)source.Exp;
            paramValues["hp"]             = (System.Int16)source.HP;
            paramValues["id"]             = (System.Int32)source.ID;
            paramValues["level"]          = (System.Int16)source.Level;
            paramValues["load_map_id"]    = (System.UInt16)source.LoadMapID;
            paramValues["load_x"]         = (System.UInt16)source.LoadX;
            paramValues["load_y"]         = (System.UInt16)source.LoadY;
            paramValues["move_speed"]     = (System.UInt16)source.MoveSpeed;
            paramValues["mp"]             = (System.Int16)source.MP;
            paramValues["name"]           = (System.String)source.Name;
            paramValues["respawn_map_id"] = (System.Nullable <System.UInt16>)source.RespawnMapID;
            paramValues["respawn_x"]      = (System.Single)source.RespawnX;
            paramValues["respawn_y"]      = (System.Single)source.RespawnY;
            paramValues["shop_id"]        = (System.Nullable <System.UInt16>)source.ShopID;
            paramValues["statpoints"]     = (System.Int32)source.StatPoints;
            paramValues["stat_agi"]       = (System.Int16)source.StatAgi;
            paramValues["stat_defence"]   = (System.Int16)source.StatDefence;
            paramValues["stat_int"]       = (System.Int16)source.StatInt;
            paramValues["stat_maxhit"]    = (System.Int16)source.StatMaxhit;
            paramValues["stat_maxhp"]     = (System.Int16)source.StatMaxhp;
            paramValues["stat_maxmp"]     = (System.Int16)source.StatMaxmp;
            paramValues["stat_minhit"]    = (System.Int16)source.StatMinhit;
            paramValues["stat_str"]       = (System.Int16)source.StatStr;
        }
/// <summary>
/// Copies the column values into the given Dictionary using the database column name
/// with a prefixed @ as the key. The keys must already exist in the Dictionary;
/// this method will not create them if they are missing.
/// </summary>
/// <param name="source">The object to copy the values from.</param>
/// <param name="dic">The Dictionary to copy the values into.</param>
        public static void CopyValues(IViewNpcCharacterTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["ai_id"]   = (System.Nullable <NetGore.AI.AIID>)source.AIID;
            dic["body_id"] = (DemoGame.BodyID)source.BodyID;
            dic["cash"]    = (System.Int32)source.Cash;
            dic["character_template_id"] = (System.Nullable <DemoGame.CharacterTemplateID>)source.CharacterTemplateID;
            dic["chat_dialog"]           = (System.Nullable <NetGore.Features.NPCChat.NPCChatDialogID>)source.ChatDialog;
            dic["exp"]            = (System.Int32)source.Exp;
            dic["hp"]             = (DemoGame.SPValueType)source.HP;
            dic["id"]             = (System.Int32)source.ID;
            dic["level"]          = (System.Int16)source.Level;
            dic["load_map_id"]    = (NetGore.World.MapID)source.LoadMapID;
            dic["load_x"]         = (System.UInt16)source.LoadX;
            dic["load_y"]         = (System.UInt16)source.LoadY;
            dic["move_speed"]     = (System.UInt16)source.MoveSpeed;
            dic["mp"]             = (DemoGame.SPValueType)source.MP;
            dic["name"]           = (System.String)source.Name;
            dic["respawn_map_id"] = (System.Nullable <NetGore.World.MapID>)source.RespawnMapID;
            dic["respawn_x"]      = (System.Single)source.RespawnX;
            dic["respawn_y"]      = (System.Single)source.RespawnY;
            dic["shop_id"]        = (System.Nullable <NetGore.Features.Shops.ShopID>)source.ShopID;
            dic["statpoints"]     = (System.Int32)source.StatPoints;
            dic["stat_agi"]       = (System.Int16)source.StatAgi;
            dic["stat_defence"]   = (System.Int16)source.StatDefence;
            dic["stat_int"]       = (System.Int16)source.StatInt;
            dic["stat_maxhit"]    = (System.Int16)source.StatMaxhit;
            dic["stat_maxhp"]     = (System.Int16)source.StatMaxhp;
            dic["stat_maxmp"]     = (System.Int16)source.StatMaxmp;
            dic["stat_minhit"]    = (System.Int16)source.StatMinhit;
            dic["stat_str"]       = (System.Int16)source.StatStr;
        }
 /// <summary>
 /// Checks if this <see cref="IViewNpcCharacterTable"/> contains the same values as another <see cref="IViewNpcCharacterTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IViewNpcCharacterTable"/>.</param>
 /// <param name="otherItem">The <see cref="IViewNpcCharacterTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IViewNpcCharacterTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IViewNpcCharacterTable source, IViewNpcCharacterTable otherItem)
 {
     return Equals(source.AIID, otherItem.AIID) && Equals(source.BodyID, otherItem.BodyID) &&
            Equals(source.Cash, otherItem.Cash) && Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) &&
            Equals(source.ChatDialog, otherItem.ChatDialog) && Equals(source.Exp, otherItem.Exp) &&
            Equals(source.HP, otherItem.HP) && Equals(source.ID, otherItem.ID) && Equals(source.Level, otherItem.Level) &&
            Equals(source.LoadMapID, otherItem.LoadMapID) && Equals(source.LoadX, otherItem.LoadX) &&
            Equals(source.LoadY, otherItem.LoadY) && Equals(source.MoveSpeed, otherItem.MoveSpeed) &&
            Equals(source.MP, otherItem.MP) && Equals(source.Name, otherItem.Name) &&
            Equals(source.RespawnMapID, otherItem.RespawnMapID) && Equals(source.RespawnX, otherItem.RespawnX) &&
            Equals(source.RespawnY, otherItem.RespawnY) && Equals(source.ShopID, otherItem.ShopID) &&
            Equals(source.StatPoints, otherItem.StatPoints) && Equals(source.StatAgi, otherItem.StatAgi) &&
            Equals(source.StatDefence, otherItem.StatDefence) && Equals(source.StatInt, otherItem.StatInt) &&
            Equals(source.StatMaxhit, otherItem.StatMaxhit) && Equals(source.StatMaxhp, otherItem.StatMaxhp) &&
            Equals(source.StatMaxmp, otherItem.StatMaxmp) && Equals(source.StatMinhit, otherItem.StatMinhit) &&
            Equals(source.StatStr, otherItem.StatStr);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this ViewNpcCharacterTable.
 /// </summary>
 /// <param name="source">The IViewNpcCharacterTable to copy the values from.</param>
 public void CopyValuesFrom(IViewNpcCharacterTable source)
 {
     AIID = source.AIID;
     BodyID = source.BodyID;
     Cash = source.Cash;
     CharacterTemplateID = source.CharacterTemplateID;
     ChatDialog = source.ChatDialog;
     Exp = source.Exp;
     HP = source.HP;
     ID = source.ID;
     Level = source.Level;
     LoadMapID = source.LoadMapID;
     LoadX = source.LoadX;
     LoadY = source.LoadY;
     MoveSpeed = source.MoveSpeed;
     MP = source.MP;
     Name = source.Name;
     RespawnMapID = source.RespawnMapID;
     RespawnX = source.RespawnX;
     RespawnY = source.RespawnY;
     ShopID = source.ShopID;
     StatPoints = source.StatPoints;
     StatAgi = source.StatAgi;
     StatDefence = source.StatDefence;
     StatInt = source.StatInt;
     StatMaxhit = source.StatMaxhit;
     StatMaxhp = source.StatMaxhp;
     StatMaxmp = source.StatMaxmp;
     StatMinhit = source.StatMinhit;
     StatStr = source.StatStr;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Copies the column values into the given Dictionary using the database column name
 /// with a prefixed @ as the key. The keys must already exist in the Dictionary;
 /// this method will not create them if they are missing.
 /// </summary>
 /// <param name="source">The object to copy the values from.</param>
 /// <param name="dic">The Dictionary to copy the values into.</param>
 public static void CopyValues(IViewNpcCharacterTable source, IDictionary<String, Object> dic)
 {
     dic["ai_id"] = source.AIID;
     dic["body_id"] = source.BodyID;
     dic["cash"] = source.Cash;
     dic["character_template_id"] = source.CharacterTemplateID;
     dic["chat_dialog"] = source.ChatDialog;
     dic["exp"] = source.Exp;
     dic["hp"] = source.HP;
     dic["id"] = source.ID;
     dic["level"] = source.Level;
     dic["load_map_id"] = source.LoadMapID;
     dic["load_x"] = source.LoadX;
     dic["load_y"] = source.LoadY;
     dic["move_speed"] = source.MoveSpeed;
     dic["mp"] = source.MP;
     dic["name"] = source.Name;
     dic["respawn_map_id"] = source.RespawnMapID;
     dic["respawn_x"] = source.RespawnX;
     dic["respawn_y"] = source.RespawnY;
     dic["shop_id"] = source.ShopID;
     dic["statpoints"] = source.StatPoints;
     dic["stat_agi"] = source.StatAgi;
     dic["stat_defence"] = source.StatDefence;
     dic["stat_int"] = source.StatInt;
     dic["stat_maxhit"] = source.StatMaxhit;
     dic["stat_maxhp"] = source.StatMaxhp;
     dic["stat_maxmp"] = source.StatMaxmp;
     dic["stat_minhit"] = source.StatMinhit;
     dic["stat_str"] = source.StatStr;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewNpcCharacterTable"/> class.
 /// </summary>
 /// <param name="source">IViewNpcCharacterTable to copy the initial values from.</param>
 public ViewNpcCharacterTable(IViewNpcCharacterTable source)
 {
     CopyValuesFrom(source);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ViewNpcCharacterTable"/> class.
 /// </summary>
 /// <param name="source">IViewNpcCharacterTable to copy the initial values from.</param>
 public ViewNpcCharacterTable(IViewNpcCharacterTable source)
 {
     CopyValuesFrom(source);
 }
/// <summary>
/// Copies the column values into the given DbParameterValues using the database column name
/// with a prefixed @ as the key. The key must already exist in the DbParameterValues
/// for the value to be copied over. If any of the keys in the DbParameterValues do not
/// match one of the column names, or if there is no field for a key, then it will be
/// ignored. Because of this, it is important to be careful when using this method
/// since columns or keys can be skipped without any indication.
/// </summary>
/// <param name="source">The object to copy the values from.</param>
/// <param name="paramValues">The DbParameterValues to copy the values into.</param>
        public static void TryCopyValues(this IViewNpcCharacterTable source, NetGore.Db.DbParameterValues paramValues)
        {
            for (int i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "ai_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.AIID;
                    break;


                case "body_id":
                    paramValues[i] = (System.UInt16)source.BodyID;
                    break;


                case "cash":
                    paramValues[i] = (System.Int32)source.Cash;
                    break;


                case "character_template_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.CharacterTemplateID;
                    break;


                case "chat_dialog":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.ChatDialog;
                    break;


                case "exp":
                    paramValues[i] = (System.Int32)source.Exp;
                    break;


                case "hp":
                    paramValues[i] = (System.Int16)source.HP;
                    break;


                case "id":
                    paramValues[i] = (System.Int32)source.ID;
                    break;


                case "level":
                    paramValues[i] = (System.Int16)source.Level;
                    break;


                case "load_map_id":
                    paramValues[i] = (System.UInt16)source.LoadMapID;
                    break;


                case "load_x":
                    paramValues[i] = (System.UInt16)source.LoadX;
                    break;


                case "load_y":
                    paramValues[i] = (System.UInt16)source.LoadY;
                    break;


                case "move_speed":
                    paramValues[i] = (System.UInt16)source.MoveSpeed;
                    break;


                case "mp":
                    paramValues[i] = (System.Int16)source.MP;
                    break;


                case "name":
                    paramValues[i] = (System.String)source.Name;
                    break;


                case "respawn_map_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.RespawnMapID;
                    break;


                case "respawn_x":
                    paramValues[i] = (System.Single)source.RespawnX;
                    break;


                case "respawn_y":
                    paramValues[i] = (System.Single)source.RespawnY;
                    break;


                case "shop_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.ShopID;
                    break;


                case "statpoints":
                    paramValues[i] = (System.Int32)source.StatPoints;
                    break;


                case "stat_agi":
                    paramValues[i] = (System.Int16)source.StatAgi;
                    break;


                case "stat_defence":
                    paramValues[i] = (System.Int16)source.StatDefence;
                    break;


                case "stat_int":
                    paramValues[i] = (System.Int16)source.StatInt;
                    break;


                case "stat_maxhit":
                    paramValues[i] = (System.Int16)source.StatMaxhit;
                    break;


                case "stat_maxhp":
                    paramValues[i] = (System.Int16)source.StatMaxhp;
                    break;


                case "stat_maxmp":
                    paramValues[i] = (System.Int16)source.StatMaxmp;
                    break;


                case "stat_minhit":
                    paramValues[i] = (System.Int16)source.StatMinhit;
                    break;


                case "stat_str":
                    paramValues[i] = (System.Int16)source.StatStr;
                    break;
                }
            }
        }
Exemplo n.º 13
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this ViewNpcCharacterTable.
/// </summary>
/// <param name="source">The IViewNpcCharacterTable to copy the values from.</param>
public void CopyValuesFrom(IViewNpcCharacterTable source)
{
this.AIID = (System.Nullable<NetGore.AI.AIID>)source.AIID;
this.BodyID = (DemoGame.BodyID)source.BodyID;
this.Cash = (System.Int32)source.Cash;
this.CharacterTemplateID = (System.Nullable<DemoGame.CharacterTemplateID>)source.CharacterTemplateID;
this.ChatDialog = (System.Nullable<NetGore.Features.NPCChat.NPCChatDialogID>)source.ChatDialog;
this.Exp = (System.Int32)source.Exp;
this.HP = (DemoGame.SPValueType)source.HP;
this.ID = (System.Int32)source.ID;
this.Level = (System.Int16)source.Level;
this.LoadMapID = (NetGore.World.MapID)source.LoadMapID;
this.LoadX = (System.UInt16)source.LoadX;
this.LoadY = (System.UInt16)source.LoadY;
this.MoveSpeed = (System.UInt16)source.MoveSpeed;
this.MP = (DemoGame.SPValueType)source.MP;
this.Name = (System.String)source.Name;
this.RespawnMapID = (System.Nullable<NetGore.World.MapID>)source.RespawnMapID;
this.RespawnX = (System.Single)source.RespawnX;
this.RespawnY = (System.Single)source.RespawnY;
this.ShopID = (System.Nullable<NetGore.Features.Shops.ShopID>)source.ShopID;
this.StatPoints = (System.Int32)source.StatPoints;
this.StatAgi = (System.Int16)source.StatAgi;
this.StatDefence = (System.Int16)source.StatDefence;
this.StatInt = (System.Int16)source.StatInt;
this.StatMaxhit = (System.Int16)source.StatMaxhit;
this.StatMaxhp = (System.Int16)source.StatMaxhp;
this.StatMaxmp = (System.Int16)source.StatMaxmp;
this.StatMinhit = (System.Int16)source.StatMinhit;
this.StatStr = (System.Int16)source.StatStr;
}
Exemplo n.º 14
0
/// <summary>
/// Copies the column values into the given Dictionary using the database column name
/// with a prefixed @ as the key. The keys must already exist in the Dictionary;
/// this method will not create them if they are missing.
/// </summary>
/// <param name="source">The object to copy the values from.</param>
/// <param name="dic">The Dictionary to copy the values into.</param>
public static void CopyValues(IViewNpcCharacterTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["ai_id"] = (System.Nullable<NetGore.AI.AIID>)source.AIID;
dic["body_id"] = (DemoGame.BodyID)source.BodyID;
dic["cash"] = (System.Int32)source.Cash;
dic["character_template_id"] = (System.Nullable<DemoGame.CharacterTemplateID>)source.CharacterTemplateID;
dic["chat_dialog"] = (System.Nullable<NetGore.Features.NPCChat.NPCChatDialogID>)source.ChatDialog;
dic["exp"] = (System.Int32)source.Exp;
dic["hp"] = (DemoGame.SPValueType)source.HP;
dic["id"] = (System.Int32)source.ID;
dic["level"] = (System.Int16)source.Level;
dic["load_map_id"] = (NetGore.World.MapID)source.LoadMapID;
dic["load_x"] = (System.UInt16)source.LoadX;
dic["load_y"] = (System.UInt16)source.LoadY;
dic["move_speed"] = (System.UInt16)source.MoveSpeed;
dic["mp"] = (DemoGame.SPValueType)source.MP;
dic["name"] = (System.String)source.Name;
dic["respawn_map_id"] = (System.Nullable<NetGore.World.MapID>)source.RespawnMapID;
dic["respawn_x"] = (System.Single)source.RespawnX;
dic["respawn_y"] = (System.Single)source.RespawnY;
dic["shop_id"] = (System.Nullable<NetGore.Features.Shops.ShopID>)source.ShopID;
dic["statpoints"] = (System.Int32)source.StatPoints;
dic["stat_agi"] = (System.Int16)source.StatAgi;
dic["stat_defence"] = (System.Int16)source.StatDefence;
dic["stat_int"] = (System.Int16)source.StatInt;
dic["stat_maxhit"] = (System.Int16)source.StatMaxhit;
dic["stat_maxhp"] = (System.Int16)source.StatMaxhp;
dic["stat_maxmp"] = (System.Int16)source.StatMaxmp;
dic["stat_minhit"] = (System.Int16)source.StatMinhit;
dic["stat_str"] = (System.Int16)source.StatStr;
}