/// <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 IGuildMemberTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["guild_id"] = (System.UInt16)source.GuildID; paramValues["joined"] = (System.DateTime)source.Joined; paramValues["rank"] = (System.Byte)source.Rank; }
/// <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 ICharacterTemplateEquippedTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["chance"] = (System.UInt16)source.Chance; paramValues["character_template_id"] = (System.UInt16)source.CharacterTemplateID; paramValues["id"] = (System.Int32)source.ID; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; }
/// <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 ICharacterQuestStatusKillsTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["character_template_id"] = (System.UInt16)source.CharacterTemplateID; paramValues["count"] = (System.UInt16)source.Count; paramValues["quest_id"] = (System.UInt16)source.QuestID; }
/// <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 IItemTemplateTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["action_display_id"] = (System.Nullable<System.UInt16>)source.ActionDisplayID; paramValues["description"] = (System.String)source.Description; paramValues["equipped_body"] = (System.String)source.EquippedBody; paramValues["graphic"] = (System.UInt16)source.Graphic; paramValues["height"] = (System.Byte)source.Height; paramValues["hp"] = (System.Int16)source.HP; paramValues["id"] = (System.UInt16)source.ID; paramValues["mp"] = (System.Int16)source.MP; paramValues["name"] = (System.String)source.Name; paramValues["range"] = (System.UInt16)source.Range; paramValues["stat_agi"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Agi); paramValues["stat_defence"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Defence); paramValues["stat_int"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Int); paramValues["stat_maxhit"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxHit); paramValues["stat_maxhp"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxHP); paramValues["stat_maxmp"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxMP); paramValues["stat_minhit"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MinHit); paramValues["stat_req_agi"] = (System.Int16)source.GetReqStat((DemoGame.StatType)DemoGame.StatType.Agi); paramValues["stat_req_int"] = (System.Int16)source.GetReqStat((DemoGame.StatType)DemoGame.StatType.Int); paramValues["stat_req_str"] = (System.Int16)source.GetReqStat((DemoGame.StatType)DemoGame.StatType.Str); paramValues["stat_str"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Str); paramValues["type"] = (System.Byte)source.Type; paramValues["value"] = (System.Int32)source.Value; paramValues["weapon_type"] = (System.Byte)source.WeaponType; paramValues["width"] = (System.Byte)source.Width; }
/// <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 IViewUserCharacterTable 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 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 IQuestTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["id"] = (System.UInt16)source.ID; paramValues["repeatable"] = (System.Boolean)source.Repeatable; paramValues["reward_cash"] = (System.Int32)source.RewardCash; paramValues["reward_exp"] = (System.Int32)source.RewardExp; }
/// <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 ICharacterTemplateTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["ai_id"] = (System.Nullable<System.UInt16>)source.AIID; paramValues["alliance_id"] = (System.Byte)source.AllianceID; paramValues["body_id"] = (System.UInt16)source.BodyID; paramValues["chat_dialog"] = (System.Nullable<System.UInt16>)source.ChatDialog; paramValues["exp"] = (System.Int32)source.Exp; paramValues["give_cash"] = (System.Int32)source.GiveCash; paramValues["give_exp"] = (System.Int32)source.GiveExp; paramValues["id"] = (System.UInt16)source.ID; paramValues["level"] = (System.Int16)source.Level; paramValues["move_speed"] = (System.UInt16)source.MoveSpeed; paramValues["name"] = (System.String)source.Name; paramValues["respawn"] = (System.UInt16)source.Respawn; paramValues["shop_id"] = (System.Nullable<System.UInt16>)source.ShopID; paramValues["statpoints"] = (System.Int32)source.StatPoints; paramValues["stat_agi"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Agi); paramValues["stat_defence"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Defence); paramValues["stat_int"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Int); paramValues["stat_maxhit"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxHit); paramValues["stat_maxhp"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxHP); paramValues["stat_maxmp"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MaxMP); paramValues["stat_minhit"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.MinHit); paramValues["stat_str"] = (System.Int16)source.GetStat((DemoGame.StatType)DemoGame.StatType.Str); }
/// <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 IAccountIpsTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["account_id"] = (System.Int32)source.AccountID; paramValues["id"] = (System.UInt32)source.ID; paramValues["ip"] = (System.UInt32)source.Ip; paramValues["time"] = (System.DateTime)source.Time; }
/// <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 IWorldStatsGuildUserChangeTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["guild_id"] = (System.Nullable<System.UInt16>)source.GuildID; paramValues["id"] = (System.UInt32)source.ID; paramValues["user_id"] = (System.Int32)source.UserID; paramValues["when"] = (System.DateTime)source.When; }
/// <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 IWorldStatsCountUserKillNpcTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["count"] = (System.Int32)source.Count; paramValues["last_update"] = (System.DateTime)source.LastUpdate; paramValues["npc_template_id"] = (System.UInt16)source.NPCTemplateID; paramValues["user_id"] = (System.Int32)source.UserID; }
/// <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 IGuildTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["created"] = (System.DateTime)source.Created; paramValues["id"] = (System.UInt16)source.ID; paramValues["name"] = (System.String)source.Name; paramValues["tag"] = (System.String)source.Tag; }
/// <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 ICharacterQuestStatusTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["completed_on"] = (System.Nullable<System.DateTime>)source.CompletedOn; paramValues["quest_id"] = (System.UInt16)source.QuestID; paramValues["started_on"] = (System.DateTime)source.StartedOn; }
/// <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 ICharacterStatusEffectTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["id"] = (System.Int32)source.ID; paramValues["power"] = (System.UInt16)source.Power; paramValues["status_effect_id"] = (System.Byte)source.StatusEffect; paramValues["time_left_secs"] = (System.UInt16)source.TimeLeftSecs; }
/// <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 ICharacterTemplateInventoryTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["chance"] = (System.UInt16)source.Chance; paramValues["character_template_id"] = (System.UInt16)source.CharacterTemplateID; paramValues["id"] = (System.Int32)source.ID; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; paramValues["max"] = (System.Byte)source.Max; paramValues["min"] = (System.Byte)source.Min; }
/// <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 IWorldStatsUserConsumeItemTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["id"] = (System.UInt32)source.ID; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; paramValues["map_id"] = (System.Nullable<System.UInt16>)source.MapID; paramValues["user_id"] = (System.Int32)source.UserID; paramValues["when"] = (System.DateTime)source.When; paramValues["x"] = (System.UInt16)source.X; paramValues["y"] = (System.UInt16)source.Y; }
/// <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 IWorldStatsQuestAcceptTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["id"] = (System.UInt32)source.ID; paramValues["map_id"] = (System.Nullable<System.UInt16>)source.MapID; paramValues["quest_id"] = (System.UInt16)source.QuestID; paramValues["user_id"] = (System.Int32)source.UserID; paramValues["when"] = (System.DateTime)source.When; paramValues["x"] = (System.UInt16)source.X; paramValues["y"] = (System.UInt16)source.Y; }
/// <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 IWorldStatsUserLevelTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["id"] = (System.UInt32)source.ID; paramValues["level"] = (System.Int16)source.Level; paramValues["map_id"] = (System.Nullable<System.UInt16>)source.MapID; paramValues["when"] = (System.DateTime)source.When; paramValues["x"] = (System.UInt16)source.X; paramValues["y"] = (System.UInt16)source.Y; }
/// <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 IAccountBanTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["account_id"] = (System.Int32)source.AccountID; paramValues["end_time"] = (System.DateTime)source.EndTime; paramValues["expired"] = (System.Boolean)source.Expired; paramValues["id"] = (System.Int32)source.ID; paramValues["issued_by"] = (System.String)source.IssuedBy; paramValues["reason"] = (System.String)source.Reason; paramValues["start_time"] = (System.DateTime)source.StartTime; }
/// <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 IMapSpawnTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["amount"] = (System.Byte)source.Amount; paramValues["character_template_id"] = (System.UInt16)source.CharacterTemplateID; paramValues["height"] = (System.Nullable<System.UInt16>)source.Height; paramValues["id"] = (System.Int32)source.ID; paramValues["map_id"] = (System.UInt16)source.MapID; paramValues["width"] = (System.Nullable<System.UInt16>)source.Width; paramValues["x"] = (System.Nullable<System.UInt16>)source.X; paramValues["y"] = (System.Nullable<System.UInt16>)source.Y; }
/// <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 IGuildEventTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["arg0"] = (System.String)source.Arg0; paramValues["arg1"] = (System.String)source.Arg1; paramValues["arg2"] = (System.String)source.Arg2; paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["created"] = (System.DateTime)source.Created; paramValues["event_id"] = (System.Byte)source.EventID; paramValues["guild_id"] = (System.UInt16)source.GuildID; paramValues["id"] = (System.Int32)source.ID; paramValues["target_character_id"] = (System.Nullable<System.Int32>)source.TargetCharacterID; }
/// <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 IWorldStatsNetworkTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["connections"] = (System.UInt16)source.Connections; paramValues["id"] = (System.UInt32)source.ID; paramValues["recv_bytes"] = (System.UInt32)source.RecvBytes; paramValues["recv_messages"] = (System.UInt32)source.RecvMessages; paramValues["recv_packets"] = (System.UInt32)source.RecvPackets; paramValues["sent_bytes"] = (System.UInt32)source.SentBytes; paramValues["sent_messages"] = (System.UInt32)source.SentMessages; paramValues["sent_packets"] = (System.UInt32)source.SentPackets; paramValues["when"] = (System.DateTime)source.When; }
/// <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 IAccountTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["creator_ip"] = (System.UInt32)source.CreatorIp; paramValues["current_ip"] = (System.Nullable<System.UInt32>)source.CurrentIp; paramValues["email"] = (System.String)source.Email; paramValues["id"] = (System.Int32)source.ID; paramValues["name"] = (System.String)source.Name; paramValues["password"] = (System.String)source.Password; paramValues["permissions"] = (System.Byte)source.Permissions; paramValues["time_created"] = (System.DateTime)source.TimeCreated; paramValues["time_last_login"] = (System.DateTime)source.TimeLastLogin; }
/// <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 IWorldStatsNpcKillUserTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["id"] = (System.UInt32)source.ID; paramValues["map_id"] = (System.Nullable<System.UInt16>)source.MapID; paramValues["npc_template_id"] = (System.Nullable<System.UInt16>)source.NPCTemplateID; paramValues["npc_x"] = (System.UInt16)source.NpcX; paramValues["npc_y"] = (System.UInt16)source.NpcY; paramValues["user_id"] = (System.Int32)source.UserID; paramValues["user_level"] = (System.Int16)source.UserLevel; paramValues["user_x"] = (System.UInt16)source.UserX; paramValues["user_y"] = (System.UInt16)source.UserY; paramValues["when"] = (System.DateTime)source.When; }
/// <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 IWorldStatsUserShoppingTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["amount"] = (System.Byte)source.Amount; paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["cost"] = (System.Int32)source.Cost; paramValues["id"] = (System.UInt32)source.ID; paramValues["item_template_id"] = (System.Nullable<System.UInt16>)source.ItemTemplateID; paramValues["map_id"] = (System.Nullable<System.UInt16>)source.MapID; paramValues["sale_type"] = (System.SByte)source.SaleType; paramValues["shop_id"] = (System.UInt16)source.ShopID; paramValues["when"] = (System.DateTime)source.When; paramValues["x"] = (System.UInt16)source.X; paramValues["y"] = (System.UInt16)source.Y; }
/// <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 IQuestRequireStartItemTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["amount"] = (System.Byte)source.Amount; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; paramValues["quest_id"] = (System.UInt16)source.QuestID; }
/// <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 IQuestRequireStartItemTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "amount": paramValues[i] = (System.Byte)source.Amount; break; case "item_template_id": paramValues[i] = (System.UInt16)source.ItemTemplateID; break; case "quest_id": paramValues[i] = (System.UInt16)source.QuestID; break; } } }
/// <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 ICharacterStatusEffectTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "character_id": paramValues[i] = (System.Int32)source.CharacterID; break; case "id": paramValues[i] = (System.Int32)source.ID; break; case "power": paramValues[i] = (System.UInt16)source.Power; break; case "status_effect_id": paramValues[i] = (System.Byte)source.StatusEffect; break; case "time_left_secs": paramValues[i] = (System.UInt16)source.TimeLeftSecs; break; } } }
/// <summary> /// Writes the state of the object to an <see cref="IValueWriter"/>. /// </summary> /// <param name="writer">The <see cref="IValueWriter"/> to write the values to.</param> public virtual void WriteState(NetGore.IO.IValueWriter writer) { NetGore.IO.PersistableHelper.Write(this, writer); }
/// <summary> /// Reads the state of the object from an <see cref="IValueReader"/>. /// </summary> /// <param name="reader">The <see cref="IValueReader"/> to read the values from.</param> public virtual void ReadState(NetGore.IO.IValueReader reader) { NetGore.IO.PersistableHelper.Read(this, reader); }
/// <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 IActiveTradeItemTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["item_id"] = (System.Int32)source.ItemID; }