示例#1
0
        /// <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 IAllianceTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "id":
                    paramValues[i] = (Byte)source.ID;
                    break;

                case "name":
                    paramValues[i] = source.Name;
                    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 IActiveTradeCashTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "cash":
                    paramValues[i] = source.Cash;
                    break;

                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;
                }
            }
        }
示例#3
0
        /// <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 IAllianceAttackableTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "alliance_id":
                    paramValues[i] = (Byte)source.AllianceID;
                    break;

                case "attackable_id":
                    paramValues[i] = (Byte)source.AttackableID;
                    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 IShopItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "item_template_id":
                    paramValues[i] = (UInt16)source.ItemTemplateID;
                    break;

                case "shop_id":
                    paramValues[i] = (UInt16)source.ShopID;
                    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 ICharacterTemplateSkillTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_template_id":
                    paramValues[i] = (UInt16)source.CharacterTemplateID;
                    break;

                case "skill_id":
                    paramValues[i] = (Byte)source.SkillID;
                    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 IQuestRequireFinishQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "quest_id":
                    paramValues[i] = (UInt16)source.QuestID;
                    break;

                case "req_quest_id":
                    paramValues[i] = (UInt16)source.ReqQuestID;
                    break;
                }
            }
        }
示例#7
0
        /// <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 IAccountTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "creator_ip":
                    paramValues[i] = source.CreatorIp;
                    break;

                case "current_ip":
                    paramValues[i] = source.CurrentIp;
                    break;

                case "email":
                    paramValues[i] = source.Email;
                    break;

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

                case "name":
                    paramValues[i] = source.Name;
                    break;

                case "password":
                    paramValues[i] = source.Password;
                    break;

                case "permissions":
                    paramValues[i] = (Byte)source.Permissions;
                    break;

                case "time_created":
                    paramValues[i] = source.TimeCreated;
                    break;

                case "time_last_login":
                    paramValues[i] = source.TimeLastLogin;
                    break;
                }
            }
        }
示例#8
0
        /// <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 IWorldStatsNetworkTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "connections":
                    paramValues[i] = source.Connections;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "recv_bytes":
                    paramValues[i] = source.RecvBytes;
                    break;

                case "recv_messages":
                    paramValues[i] = source.RecvMessages;
                    break;

                case "recv_packets":
                    paramValues[i] = source.RecvPackets;
                    break;

                case "sent_bytes":
                    paramValues[i] = source.SentBytes;
                    break;

                case "sent_messages":
                    paramValues[i] = source.SentMessages;
                    break;

                case "sent_packets":
                    paramValues[i] = source.SentPackets;
                    break;

                case "when":
                    paramValues[i] = source.When;
                    break;
                }
            }
        }
示例#9
0
        /// <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 IGuildEventTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "arg0":
                    paramValues[i] = source.Arg0;
                    break;

                case "arg1":
                    paramValues[i] = source.Arg1;
                    break;

                case "arg2":
                    paramValues[i] = source.Arg2;
                    break;

                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "created":
                    paramValues[i] = source.Created;
                    break;

                case "event_id":
                    paramValues[i] = source.EventID;
                    break;

                case "guild_id":
                    paramValues[i] = (UInt16)source.GuildID;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "target_character_id":
                    paramValues[i] = (int?)source.TargetCharacterID;
                    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 ICharacterSkillTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "skill_id":
                    paramValues[i] = (Byte)source.SkillID;
                    break;

                case "time_added":
                    paramValues[i] = source.TimeAdded;
                    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 IShopTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "can_buy":
                    paramValues[i] = source.CanBuy;
                    break;

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

                case "name":
                    paramValues[i] = source.Name;
                    break;
                }
            }
        }
示例#12
0
        /// <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 IWorldStatsCountShopSellTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "count":
                    paramValues[i] = source.Count;
                    break;

                case "last_update":
                    paramValues[i] = source.LastUpdate;
                    break;

                case "shop_id":
                    paramValues[i] = (UInt16)source.ShopID;
                    break;
                }
            }
        }
示例#13
0
        /// <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 IEventCountersQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "counter":
                    paramValues[i] = source.Counter;
                    break;

                case "quest_event_counter_id":
                    paramValues[i] = source.QuestEventCounterId;
                    break;

                case "quest_id":
                    paramValues[i] = (UInt16)source.QuestID;
                    break;
                }
            }
        }
示例#14
0
        /// <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 IEventCountersUserTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "counter":
                    paramValues[i] = source.Counter;
                    break;

                case "user_event_counter_id":
                    paramValues[i] = source.UserEventCounterId;
                    break;

                case "user_id":
                    paramValues[i] = (Int32)source.UserID;
                    break;
                }
            }
        }
示例#15
0
        /// <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 IEventCountersItemTemplateTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "counter":
                    paramValues[i] = source.Counter;
                    break;

                case "item_template_event_counter_id":
                    paramValues[i] = source.ItemTemplateEventCounterId;
                    break;

                case "item_template_id":
                    paramValues[i] = (UInt16)source.ItemTemplateID;
                    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 ICharacterInventoryTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "item_id":
                    paramValues[i] = (Int32)source.ItemID;
                    break;

                case "slot":
                    paramValues[i] = (Byte)source.Slot;
                    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 IWorldStatsCountConsumeItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "count":
                    paramValues[i] = source.Count;
                    break;

                case "item_template_id":
                    paramValues[i] = (UInt16)source.ItemTemplateID;
                    break;

                case "last_update":
                    paramValues[i] = source.LastUpdate;
                    break;
                }
            }
        }
示例#18
0
        /// <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 IAccountCharacterTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "account_id":
                    paramValues[i] = (Int32)source.AccountID;
                    break;

                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "time_deleted":
                    paramValues[i] = source.TimeDeleted;
                    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 IQuestRequireStartItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "amount":
                    paramValues[i] = source.Amount;
                    break;

                case "item_template_id":
                    paramValues[i] = (UInt16)source.ItemTemplateID;
                    break;

                case "quest_id":
                    paramValues[i] = (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 IMapSpawnTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "amount":
                    paramValues[i] = source.Amount;
                    break;

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

                case "height":
                    paramValues[i] = source.Height;
                    break;

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

                case "map_id":
                    paramValues[i] = (UInt16)source.MapID;
                    break;

                case "width":
                    paramValues[i] = source.Width;
                    break;

                case "x":
                    paramValues[i] = source.X;
                    break;

                case "y":
                    paramValues[i] = source.Y;
                    break;
                }
            }
        }
示例#21
0
        /// <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 IWorldStatsCountNpcKillUserTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "count":
                    paramValues[i] = source.Count;
                    break;

                case "last_update":
                    paramValues[i] = source.LastUpdate;
                    break;

                case "npc_template_id":
                    paramValues[i] = (UInt16)source.NPCTemplateID;
                    break;

                case "user_id":
                    paramValues[i] = (Int32)source.UserID;
                    break;
                }
            }
        }
示例#22
0
        /// <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 IAccountIpsTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "account_id":
                    paramValues[i] = (Int32)source.AccountID;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "ip":
                    paramValues[i] = source.Ip;
                    break;

                case "time":
                    paramValues[i] = source.Time;
                    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 IQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "id":
                    paramValues[i] = (UInt16)source.ID;
                    break;

                case "repeatable":
                    paramValues[i] = source.Repeatable;
                    break;

                case "reward_cash":
                    paramValues[i] = source.RewardCash;
                    break;

                case "reward_exp":
                    paramValues[i] = source.RewardExp;
                    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 IWorldStatsUserLevelTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "level":
                    paramValues[i] = source.Level;
                    break;

                case "map_id":
                    paramValues[i] = (ushort?)source.MapID;
                    break;

                case "when":
                    paramValues[i] = source.When;
                    break;

                case "x":
                    paramValues[i] = source.X;
                    break;

                case "y":
                    paramValues[i] = source.Y;
                    break;
                }
            }
        }
示例#25
0
        /// <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 IGuildMemberTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "guild_id":
                    paramValues[i] = (UInt16)source.GuildID;
                    break;

                case "joined":
                    paramValues[i] = source.Joined;
                    break;

                case "rank":
                    paramValues[i] = (Byte)source.Rank;
                    break;
                }
            }
        }
示例#26
0
        /// <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 IAccountBanTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "account_id":
                    paramValues[i] = (Int32)source.AccountID;
                    break;

                case "end_time":
                    paramValues[i] = source.EndTime;
                    break;

                case "expired":
                    paramValues[i] = source.Expired;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "issued_by":
                    paramValues[i] = source.IssuedBy;
                    break;

                case "reason":
                    paramValues[i] = source.Reason;
                    break;

                case "start_time":
                    paramValues[i] = source.StartTime;
                    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 IWorldStatsQuestCancelTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "map_id":
                    paramValues[i] = (ushort?)source.MapID;
                    break;

                case "quest_id":
                    paramValues[i] = (UInt16)source.QuestID;
                    break;

                case "user_id":
                    paramValues[i] = (Int32)source.UserID;
                    break;

                case "when":
                    paramValues[i] = source.When;
                    break;

                case "x":
                    paramValues[i] = source.X;
                    break;

                case "y":
                    paramValues[i] = source.Y;
                    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 IGuildTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "created":
                    paramValues[i] = source.Created;
                    break;

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

                case "name":
                    paramValues[i] = source.Name;
                    break;

                case "tag":
                    paramValues[i] = source.Tag;
                    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 IWorldStatsGuildUserChangeTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "guild_id":
                    paramValues[i] = (ushort?)source.GuildID;
                    break;

                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "user_id":
                    paramValues[i] = (Int32)source.UserID;
                    break;

                case "when":
                    paramValues[i] = source.When;
                    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 ICharacterQuestStatusKillsTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

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

                case "count":
                    paramValues[i] = source.Count;
                    break;

                case "quest_id":
                    paramValues[i] = (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 IServerTimeTable source, DbParameterValues paramValues)
 {
     for (var i = 0; i < paramValues.Count; i++)
     {
         switch (paramValues.GetParameterName(i))
         {
             case "server_time":
                 paramValues[i] = source.ServerTime;
                 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 IWorldStatsUserShoppingTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "cost":
                        paramValues[i] = source.Cost;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "item_template_id":
                        paramValues[i] = (ushort?)source.ItemTemplateID;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "sale_type":
                        paramValues[i] = source.SaleType;
                        break;

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

                    case "when":
                        paramValues[i] = source.When;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        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 IActiveTradeItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "item_id":
                        paramValues[i] = (Int32)source.ItemID;
                        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 IAccountBanTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "account_id":
                        paramValues[i] = (Int32)source.AccountID;
                        break;

                    case "end_time":
                        paramValues[i] = source.EndTime;
                        break;

                    case "expired":
                        paramValues[i] = source.Expired;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "issued_by":
                        paramValues[i] = source.IssuedBy;
                        break;

                    case "reason":
                        paramValues[i] = source.Reason;
                        break;

                    case "start_time":
                        paramValues[i] = source.StartTime;
                        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 IWorldStatsCountUserKillNpcTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "count":
                        paramValues[i] = source.Count;
                        break;

                    case "last_update":
                        paramValues[i] = source.LastUpdate;
                        break;

                    case "npc_template_id":
                        paramValues[i] = (UInt16)source.NPCTemplateID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        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 IMapSpawnTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

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

                    case "height":
                        paramValues[i] = source.Height;
                        break;

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

                    case "map_id":
                        paramValues[i] = (UInt16)source.MapID;
                        break;

                    case "width":
                        paramValues[i] = source.Width;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        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 IAllianceAttackableTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "alliance_id":
                        paramValues[i] = (Byte)source.AllianceID;
                        break;

                    case "attackable_id":
                        paramValues[i] = (Byte)source.AttackableID;
                        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 IWorldStatsGuildUserChangeTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "guild_id":
                        paramValues[i] = (ushort?)source.GuildID;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        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 IShopItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        break;

                    case "shop_id":
                        paramValues[i] = (UInt16)source.ShopID;
                        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 IWorldStatsUserKillNpcTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "npc_template_id":
                        paramValues[i] = (ushort?)source.NPCTemplateID;
                        break;

                    case "npc_x":
                        paramValues[i] = source.NpcX;
                        break;

                    case "npc_y":
                        paramValues[i] = source.NpcY;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;

                    case "user_level":
                        paramValues[i] = source.UserLevel;
                        break;

                    case "user_x":
                        paramValues[i] = source.UserX;
                        break;

                    case "user_y":
                        paramValues[i] = source.UserY;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        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 ICharacterSkillTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "skill_id":
                        paramValues[i] = (Byte)source.SkillID;
                        break;

                    case "time_added":
                        paramValues[i] = source.TimeAdded;
                        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 IGuildTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "created":
                        paramValues[i] = source.Created;
                        break;

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

                    case "name":
                        paramValues[i] = source.Name;
                        break;

                    case "tag":
                        paramValues[i] = source.Tag;
                        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 ICharacterTemplateEquippedTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "chance":
                        paramValues[i] = (UInt16)source.Chance;
                        break;

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

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        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 IQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "id":
                        paramValues[i] = (UInt16)source.ID;
                        break;

                    case "repeatable":
                        paramValues[i] = source.Repeatable;
                        break;

                    case "reward_cash":
                        paramValues[i] = source.RewardCash;
                        break;

                    case "reward_exp":
                        paramValues[i] = source.RewardExp;
                        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 IWorldStatsUserLevelTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "level":
                        paramValues[i] = source.Level;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        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 IEventCountersQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "counter":
                        paramValues[i] = source.Counter;
                        break;

                    case "quest_event_counter_id":
                        paramValues[i] = source.QuestEventCounterId;
                        break;

                    case "quest_id":
                        paramValues[i] = (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 IItemTemplateTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "action_display_id":
                        paramValues[i] = (ushort?)source.ActionDisplayID;
                        break;

                    case "description":
                        paramValues[i] = source.Description;
                        break;

                    case "equipped_body":
                        paramValues[i] = source.EquippedBody;
                        break;

                    case "graphic":
                        paramValues[i] = (UInt16)source.Graphic;
                        break;

                    case "height":
                        paramValues[i] = source.Height;
                        break;

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

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

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

                    case "name":
                        paramValues[i] = source.Name;
                        break;

                    case "range":
                        paramValues[i] = source.Range;
                        break;

                    case "stat_agi":
                        paramValues[i] = (Int16)source.GetStat(StatType.Agi);
                        break;

                    case "stat_defence":
                        paramValues[i] = (Int16)source.GetStat(StatType.Defence);
                        break;

                    case "stat_int":
                        paramValues[i] = (Int16)source.GetStat(StatType.Int);
                        break;

                    case "stat_maxhit":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxHit);
                        break;

                    case "stat_maxhp":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxHP);
                        break;

                    case "stat_maxmp":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxMP);
                        break;

                    case "stat_minhit":
                        paramValues[i] = (Int16)source.GetStat(StatType.MinHit);
                        break;

                    case "stat_req_agi":
                        paramValues[i] = (Int16)source.GetReqStat(StatType.Agi);
                        break;

                    case "stat_req_int":
                        paramValues[i] = (Int16)source.GetReqStat(StatType.Int);
                        break;

                    case "stat_req_str":
                        paramValues[i] = (Int16)source.GetReqStat(StatType.Str);
                        break;

                    case "stat_str":
                        paramValues[i] = (Int16)source.GetStat(StatType.Str);
                        break;

                    case "type":
                        paramValues[i] = (Byte)source.Type;
                        break;

                    case "value":
                        paramValues[i] = source.Value;
                        break;

                    case "weapon_type":
                        paramValues[i] = (Byte)source.WeaponType;
                        break;

                    case "width":
                        paramValues[i] = source.Width;
                        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 IGuildMemberTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "guild_id":
                        paramValues[i] = (UInt16)source.GuildID;
                        break;

                    case "joined":
                        paramValues[i] = source.Joined;
                        break;

                    case "rank":
                        paramValues[i] = (Byte)source.Rank;
                        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 IQuestRequireFinishItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "amount":
                        paramValues[i] = source.Amount;
                        break;

                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        break;

                    case "quest_id":
                        paramValues[i] = (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, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

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

                    case "power":
                        paramValues[i] = source.Power;
                        break;

                    case "status_effect_id":
                        paramValues[i] = (Byte)source.StatusEffect;
                        break;

                    case "time_left_secs":
                        paramValues[i] = source.TimeLeftSecs;
                        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 ICharacterQuestStatusTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "completed_on":
                        paramValues[i] = source.CompletedOn;
                        break;

                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;

                    case "started_on":
                        paramValues[i] = source.StartedOn;
                        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 IWorldStatsQuestCancelTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "map_id":
                        paramValues[i] = (ushort?)source.MapID;
                        break;

                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;

                    case "user_id":
                        paramValues[i] = (Int32)source.UserID;
                        break;

                    case "when":
                        paramValues[i] = source.When;
                        break;

                    case "x":
                        paramValues[i] = source.X;
                        break;

                    case "y":
                        paramValues[i] = source.Y;
                        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 IQuestRequireFinishQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "quest_id":
                        paramValues[i] = (UInt16)source.QuestID;
                        break;

                    case "req_quest_id":
                        paramValues[i] = (UInt16)source.ReqQuestID;
                        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 IAccountIpsTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "account_id":
                        paramValues[i] = (Int32)source.AccountID;
                        break;

                    case "id":
                        paramValues[i] = source.ID;
                        break;

                    case "ip":
                        paramValues[i] = source.Ip;
                        break;

                    case "time":
                        paramValues[i] = source.Time;
                        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 IWorldStatsCountConsumeItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "count":
                        paramValues[i] = source.Count;
                        break;

                    case "item_template_id":
                        paramValues[i] = (UInt16)source.ItemTemplateID;
                        break;

                    case "last_update":
                        paramValues[i] = source.LastUpdate;
                        break;
                }
            }
        }
示例#56
0
        /// <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 IAccountTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "creator_ip":
                        paramValues[i] = source.CreatorIp;
                        break;

                    case "current_ip":
                        paramValues[i] = source.CurrentIp;
                        break;

                    case "email":
                        paramValues[i] = source.Email;
                        break;

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

                    case "name":
                        paramValues[i] = source.Name;
                        break;

                    case "password":
                        paramValues[i] = source.Password;
                        break;

                    case "permissions":
                        paramValues[i] = (Byte)source.Permissions;
                        break;

                    case "time_created":
                        paramValues[i] = source.TimeCreated;
                        break;

                    case "time_last_login":
                        paramValues[i] = source.TimeLastLogin;
                        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 ICharacterEquippedTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_id":
                        paramValues[i] = (Int32)source.CharacterID;
                        break;

                    case "item_id":
                        paramValues[i] = (Int32)source.ItemID;
                        break;

                    case "slot":
                        paramValues[i] = (Byte)source.Slot;
                        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 IWorldStatsCountShopBuyTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "count":
                        paramValues[i] = source.Count;
                        break;

                    case "last_update":
                        paramValues[i] = source.LastUpdate;
                        break;

                    case "shop_id":
                        paramValues[i] = (UInt16)source.ShopID;
                        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 ICharacterTemplateSkillTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "character_template_id":
                        paramValues[i] = (UInt16)source.CharacterTemplateID;
                        break;

                    case "skill_id":
                        paramValues[i] = (Byte)source.SkillID;
                        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 ICharacterTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                    case "ai_id":
                        paramValues[i] = (ushort?)source.AIID;
                        break;

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

                    case "cash":
                        paramValues[i] = source.Cash;
                        break;

                    case "character_template_id":
                        paramValues[i] = (ushort?)source.CharacterTemplateID;
                        break;

                    case "chat_dialog":
                        paramValues[i] = (ushort?)source.ChatDialog;
                        break;

                    case "exp":
                        paramValues[i] = source.Exp;
                        break;

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

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

                    case "level":
                        paramValues[i] = source.Level;
                        break;

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

                    case "load_x":
                        paramValues[i] = source.LoadX;
                        break;

                    case "load_y":
                        paramValues[i] = source.LoadY;
                        break;

                    case "move_speed":
                        paramValues[i] = source.MoveSpeed;
                        break;

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

                    case "name":
                        paramValues[i] = source.Name;
                        break;

                    case "respawn_map_id":
                        paramValues[i] = (ushort?)source.RespawnMapID;
                        break;

                    case "respawn_x":
                        paramValues[i] = source.RespawnX;
                        break;

                    case "respawn_y":
                        paramValues[i] = source.RespawnY;
                        break;

                    case "shop_id":
                        paramValues[i] = (ushort?)source.ShopID;
                        break;

                    case "statpoints":
                        paramValues[i] = source.StatPoints;
                        break;

                    case "stat_agi":
                        paramValues[i] = (Int16)source.GetStat(StatType.Agi);
                        break;

                    case "stat_defence":
                        paramValues[i] = (Int16)source.GetStat(StatType.Defence);
                        break;

                    case "stat_int":
                        paramValues[i] = (Int16)source.GetStat(StatType.Int);
                        break;

                    case "stat_maxhit":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxHit);
                        break;

                    case "stat_maxhp":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxHP);
                        break;

                    case "stat_maxmp":
                        paramValues[i] = (Int16)source.GetStat(StatType.MaxMP);
                        break;

                    case "stat_minhit":
                        paramValues[i] = (Int16)source.GetStat(StatType.MinHit);
                        break;

                    case "stat_str":
                        paramValues[i] = (Int16)source.GetStat(StatType.Str);
                        break;
                }
            }
        }