|
| 1 | +/* |
| 2 | + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information |
| 3 | + * |
| 4 | + * This program is free software; you can redistribute it and/or modify it |
| 5 | + * under the terms of the GNU General Public License as published by the |
| 6 | + * Free Software Foundation; either version 2 of the License, or (at your |
| 7 | + * option) any later version. |
| 8 | + * |
| 9 | + * This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 12 | + * more details. |
| 13 | + * |
| 14 | + * You should have received a copy of the GNU General Public License along |
| 15 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + */ |
| 17 | + |
| 18 | +// DO NOT EDIT! |
| 19 | +// Autogenerated from DB2Structure.h |
| 20 | + |
| 21 | +#include "HotfixDatabase.h" |
| 22 | + |
| 23 | +// Force locale statments to appear exactly in locale declaration order, right after normal data fetch statement |
| 24 | +#define PREPARE_LOCALE_STMT(stmtBase, sql, con) \ |
| 25 | + static_assert(stmtBase + 1 == stmtBase##_LOCALE, "Invalid prepared statement index for " #stmtBase "_LOCALE"); \ |
| 26 | + PrepareStatement(stmtBase##_LOCALE, sql, con); |
| 27 | + |
| 28 | +void HotfixDatabaseConnection::DoPrepareStatements() |
| 29 | +{ |
| 30 | + if (!m_reconnecting) |
| 31 | + m_stmts.resize(MAX_HOTFIXDATABASE_STATEMENTS); |
| 32 | + |
| 33 | + // KeyChain.db2 |
| 34 | + PrepareStatement(HOTFIX_SEL_KEY_CHAIN, "SELECT Id, Key1, Key2, Key3, Key4, Key5, Key6, Key7, Key8, Key9, Key10, Key11, Key12, Key13, Key14, Key15, Key16, " |
| 35 | + "Key17, Key18, Key19, Key20, Key21, Key22, Key23, Key24, Key25, Key26, Key27, Key28, Key29, Key30, Key31, Key32 FROM key_chain ORDER BY ID DESC", CONNECTION_SYNCH); |
| 36 | + |
| 37 | + // Item.db2 |
| 38 | + PrepareStatement(HOTFIX_SEL_ITEM, "SELECT ID, Class, SubClass, SoundOverrideSubclass, Material, InventoryType, Sheath FROM item ORDER BY ID DESC", CONNECTION_SYNCH); |
| 39 | + |
| 40 | + // ItemCurrencyCost.db2 |
| 41 | + PrepareStatement(HOTFIX_SEL_ITEM_CURRENCY_COST, "SELECT ID, ItemID FROM item_currency_cost ORDER BY ItemID DESC", CONNECTION_SYNCH); |
| 42 | + |
| 43 | + // ItemExtendedCost.db2 |
| 44 | + PrepareStatement(HOTFIX_SEL_ITEM_EXTENDED_COST, "SELECT ID, RequiredHonorPoints, RequiredArenaPoints, RequiredArenaSlot, " |
| 45 | + "RequiredItem1, RequiredItem2, RequiredItem3, RequiredItem4, RequiredItem5, " |
| 46 | + "RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, " |
| 47 | + "RequiredPersonalArenaRating, ItemPurchaseGroup, " |
| 48 | + "RequiredCurrency1, RequiredCurrency2, RequiredCurrency3, RequiredCurrency4, RequiredCurrency5, " |
| 49 | + "RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, RequiredCurrencyCount5, " |
| 50 | + "RequiredFactionId, RequiredFactionStanding, RequirementFlags, RequiredAchievement FROM item_extended_cost ORDER BY ID DESC", CONNECTION_SYNCH); |
| 51 | + |
| 52 | + // Item-sparse.db2 |
| 53 | + PrepareStatement(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Quality, Flags1, Flags2, Unk1, Unk2, BuyCount, BuyPrice, SellPrice, InventoryType, " |
| 54 | + "AllowableClass, AllowableRace, ItemLevel, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredSpell, RequiredHonorRank, " |
| 55 | + "RequiredCityRank, RequiredReputationFaction, RequiredReputationRank, MaxCount, Stackable, ContainerSlots, " |
| 56 | + "ItemStatType1, ItemStatType2, ItemStatType3, ItemStatType4, ItemStatType5, " |
| 57 | + "ItemStatType6, ItemStatType7, ItemStatType8, ItemStatType9, ItemStatType10, " |
| 58 | + "ItemStatValue1, ItemStatValue2, ItemStatValue3, ItemStatValue4, ItemStatValue5, " |
| 59 | + "ItemStatValue6, ItemStatValue7, ItemStatValue8, ItemStatValue9, ItemStatValue10, " |
| 60 | + "ItemStatAllocation1, ItemStatAllocation2, ItemStatAllocation3, ItemStatAllocation4, ItemStatAllocation5, " |
| 61 | + "ItemStatAllocation6, ItemStatAllocation7, ItemStatAllocation8, ItemStatAllocation9, ItemStatAllocation10, " |
| 62 | + "ItemStatSocketCostMultiplier1, ItemStatSocketCostMultiplier2, ItemStatSocketCostMultiplier3, ItemStatSocketCostMultiplier4, ItemStatSocketCostMultiplier5, " |
| 63 | + "ItemStatSocketCostMultiplier6, ItemStatSocketCostMultiplier7, ItemStatSocketCostMultiplier8, ItemStatSocketCostMultiplier9, ItemStatSocketCostMultiplier10, " |
| 64 | + "ScalingStatDistribution, DamageType, Delay, RangedModRange, " |
| 65 | + "SpellID1, SpellID2, SpellID3, SpellID4, SpellID5, " |
| 66 | + "SpellTrigger1, SpellTrigger2, SpellTrigger3, SpellTrigger4, SpellTrigger5, " |
| 67 | + "SpellCharges1, SpellCharges2, SpellCharges3, SpellCharges4, SpellCharges5, " |
| 68 | + "SpellCooldown1, SpellCooldown2, SpellCooldown3, SpellCooldown4, SpellCooldown5, " |
| 69 | + "SpellCategory1, SpellCategory2, SpellCategory3, SpellCategory4, SpellCategory5, " |
| 70 | + "SpellCategoryCooldown1, SpellCategoryCooldown2, SpellCategoryCooldown3, SpellCategoryCooldown4, SpellCategoryCooldown5, " |
| 71 | + "Bonding, Name, Name2, Name3, Name4, Description, PageText, LanguageID, PageMaterial, StartQuest, LockID, Material, Sheath, RandomProperty, RandomSuffix, ItemSet, " |
| 72 | + "Area, Map, BagFamily, TotemCategory, SocketColor1, SocketColor2, SocketColor3, Content1, Content2, Content3, SocketBonus, GemProperties, ArmorDamageModifier, " |
| 73 | + "Duration, ItemLimitCategory, HolidayID, StatScalingFactor, CurrencySubstitutionID, CurrencySubstitutionCount FROM item_sparse ORDER BY ID DESC", CONNECTION_SYNCH); |
| 74 | + PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_SPARSE, "SELECT ID, Name_lang, Name2_lang, Name3_lang, Name4_lang, Description_lang FROM item_sparse_locale WHERE locale = ?", CONNECTION_SYNCH); |
| 75 | +} |
| 76 | + |
| 77 | +HotfixDatabaseConnection::HotfixDatabaseConnection(MySQLConnectionInfo& connInfo) : MySQLConnection(connInfo) |
| 78 | +{ |
| 79 | +} |
| 80 | + |
| 81 | +HotfixDatabaseConnection::HotfixDatabaseConnection(ProducerConsumerQueue<SQLOperation*>* q, MySQLConnectionInfo& connInfo) : MySQLConnection(q, connInfo) |
| 82 | +{ |
| 83 | +} |
| 84 | + |
| 85 | +HotfixDatabaseConnection::~HotfixDatabaseConnection() |
| 86 | +{ |
| 87 | +} |
0 commit comments