mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core/DataStores: load ItemRandomProperties.db2 and ItemRandomSuffix.db2
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
--
|
||||
-- Table structure for table `item_random_properties`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `item_random_properties`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `item_random_properties` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Name` text,
|
||||
`Enchantment1` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment2` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment3` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment4` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment5` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `item_random_properties`
|
||||
--
|
||||
|
||||
LOCK TABLES `item_random_properties` WRITE;
|
||||
/*!40000 ALTER TABLE `item_random_properties` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `item_random_properties` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_random_properties_locale`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `item_random_properties_locale`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `item_random_properties_locale` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`Name_lang` text,
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
/*!50500 PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `item_random_properties_locale`
|
||||
--
|
||||
|
||||
LOCK TABLES `item_random_properties_locale` WRITE;
|
||||
/*!40000 ALTER TABLE `item_random_properties_locale` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `item_random_properties_locale` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_random_suffix`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `item_random_suffix`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `item_random_suffix` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`Name` text,
|
||||
`Enchantment1` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment2` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment3` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment4` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`Enchantment5` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`AllocationPct1` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`AllocationPct2` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`AllocationPct3` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`AllocationPct4` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`AllocationPct5` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `item_random_suffix`
|
||||
--
|
||||
|
||||
LOCK TABLES `item_random_suffix` WRITE;
|
||||
/*!40000 ALTER TABLE `item_random_suffix` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `item_random_suffix` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `item_random_suffix_locale`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `item_random_suffix_locale`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50503 SET character_set_client = utf8mb4 */;
|
||||
CREATE TABLE `item_random_suffix_locale` (
|
||||
`ID` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`locale` varchar(4) NOT NULL,
|
||||
`Name_lang` text,
|
||||
`VerifiedBuild` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ID`,`locale`,`VerifiedBuild`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
/*!50500 PARTITION BY LIST COLUMNS(locale)
|
||||
(PARTITION deDE VALUES IN ('deDE') ENGINE = InnoDB,
|
||||
PARTITION esES VALUES IN ('esES') ENGINE = InnoDB,
|
||||
PARTITION esMX VALUES IN ('esMX') ENGINE = InnoDB,
|
||||
PARTITION frFR VALUES IN ('frFR') ENGINE = InnoDB,
|
||||
PARTITION itIT VALUES IN ('itIT') ENGINE = InnoDB,
|
||||
PARTITION koKR VALUES IN ('koKR') ENGINE = InnoDB,
|
||||
PARTITION ptBR VALUES IN ('ptBR') ENGINE = InnoDB,
|
||||
PARTITION ruRU VALUES IN ('ruRU') ENGINE = InnoDB,
|
||||
PARTITION zhCN VALUES IN ('zhCN') ENGINE = InnoDB,
|
||||
PARTITION zhTW VALUES IN ('zhTW') ENGINE = InnoDB) */;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `item_random_suffix_locale`
|
||||
--
|
||||
|
||||
LOCK TABLES `item_random_suffix_locale` WRITE;
|
||||
/*!40000 ALTER TABLE `item_random_suffix_locale` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `item_random_suffix_locale` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@@ -722,8 +722,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GLYPH_REQUIRED_SPEC, "SELECT MAX(ID) + 1 FROM glyph_required_spec", CONNECTION_SYNCH);
|
||||
|
||||
// GossipNpcOption.db2
|
||||
PrepareStatement(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT ID, GossipNpcOption, LFGDungeonsID, Unk341_1, Unk341_2, Unk341_3, Unk341_4, Unk341_5, Unk341_6, "
|
||||
"Unk341_7, Unk341_8, Unk341_9, GossipOptionID FROM gossip_npc_option WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT ID, GossipNpcOption, LFGDungeonsID, Unk341_1, Unk341_2, Unk341_3, Unk341_4, Unk341_5, "
|
||||
"Unk341_6, Unk341_7, Unk341_8, Unk341_9, GossipOptionID FROM gossip_npc_option WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_GOSSIP_NPC_OPTION, "SELECT MAX(ID) + 1 FROM gossip_npc_option", CONNECTION_SYNCH);
|
||||
|
||||
// GuildColorBackground.db2
|
||||
@@ -930,6 +930,20 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT ID, ItemLevel, Armor, Weapon FROM item_price_base WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_PRICE_BASE, "SELECT MAX(ID) + 1 FROM item_price_base", CONNECTION_SYNCH);
|
||||
|
||||
// ItemRandomProperties.db2
|
||||
PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5"
|
||||
" FROM item_random_properties WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT MAX(ID) + 1 FROM item_random_properties", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_PROPERTIES, "SELECT ID, Name_lang FROM item_random_properties_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ItemRandomSuffix.db2
|
||||
PrepareStatement(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name, Enchantment1, Enchantment2, Enchantment3, Enchantment4, Enchantment5, "
|
||||
"AllocationPct1, AllocationPct2, AllocationPct3, AllocationPct4, AllocationPct5 FROM item_random_suffix WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
|
||||
PREPARE_MAX_ID_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT MAX(ID) + 1 FROM item_random_suffix", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_ITEM_RANDOM_SUFFIX, "SELECT ID, Name_lang FROM item_random_suffix_locale WHERE (`VerifiedBuild` > 0) = ?"
|
||||
" AND locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// ItemSearchName.db2
|
||||
PrepareStatement(HOTFIX_SEL_ITEM_SEARCH_NAME, "SELECT AllowableRace, Display, ID, OverallQualityID, ExpansionID, MinFactionID, MinReputation, "
|
||||
"AllowableClass, RequiredLevel, RequiredSkill, RequiredSkillRank, RequiredAbility, ItemLevel, Flags1, Flags2, Flags3, Flags4"
|
||||
|
||||
@@ -544,6 +544,14 @@ enum HotfixDatabaseStatements : uint32
|
||||
HOTFIX_SEL_ITEM_PRICE_BASE,
|
||||
HOTFIX_SEL_ITEM_PRICE_BASE_MAX_ID,
|
||||
|
||||
HOTFIX_SEL_ITEM_RANDOM_PROPERTIES,
|
||||
HOTFIX_SEL_ITEM_RANDOM_PROPERTIES_MAX_ID,
|
||||
HOTFIX_SEL_ITEM_RANDOM_PROPERTIES_LOCALE,
|
||||
|
||||
HOTFIX_SEL_ITEM_RANDOM_SUFFIX,
|
||||
HOTFIX_SEL_ITEM_RANDOM_SUFFIX_MAX_ID,
|
||||
HOTFIX_SEL_ITEM_RANDOM_SUFFIX_LOCALE,
|
||||
|
||||
HOTFIX_SEL_ITEM_SEARCH_NAME,
|
||||
HOTFIX_SEL_ITEM_SEARCH_NAME_MAX_ID,
|
||||
HOTFIX_SEL_ITEM_SEARCH_NAME_LOCALE,
|
||||
|
||||
@@ -2917,6 +2917,43 @@ struct ItemPriceBaseLoadInfo
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 4, &ItemPriceBaseMeta::Instance, HOTFIX_SEL_ITEM_PRICE_BASE };
|
||||
};
|
||||
|
||||
struct ItemRandomPropertiesLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[7] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_STRING, "Name" },
|
||||
{ false, FT_SHORT, "Enchantment1" },
|
||||
{ false, FT_SHORT, "Enchantment2" },
|
||||
{ false, FT_SHORT, "Enchantment3" },
|
||||
{ false, FT_SHORT, "Enchantment4" },
|
||||
{ false, FT_SHORT, "Enchantment5" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 7, &ItemRandomPropertiesMeta::Instance, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES };
|
||||
};
|
||||
|
||||
struct ItemRandomSuffixLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[12] =
|
||||
{
|
||||
{ false, FT_INT, "ID" },
|
||||
{ false, FT_STRING, "Name" },
|
||||
{ false, FT_SHORT, "Enchantment1" },
|
||||
{ false, FT_SHORT, "Enchantment2" },
|
||||
{ false, FT_SHORT, "Enchantment3" },
|
||||
{ false, FT_SHORT, "Enchantment4" },
|
||||
{ false, FT_SHORT, "Enchantment5" },
|
||||
{ false, FT_SHORT, "AllocationPct1" },
|
||||
{ false, FT_SHORT, "AllocationPct2" },
|
||||
{ false, FT_SHORT, "AllocationPct3" },
|
||||
{ false, FT_SHORT, "AllocationPct4" },
|
||||
{ false, FT_SHORT, "AllocationPct5" },
|
||||
};
|
||||
|
||||
static constexpr DB2LoadInfo Instance{ Fields, 12, &ItemRandomSuffixMeta::Instance, HOTFIX_SEL_ITEM_RANDOM_SUFFIX };
|
||||
};
|
||||
|
||||
struct ItemSearchNameLoadInfo
|
||||
{
|
||||
static constexpr DB2FieldMeta Fields[17] =
|
||||
|
||||
@@ -195,6 +195,8 @@ DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("It
|
||||
DB2Storage<ItemModifiedAppearanceExtraEntry> sItemModifiedAppearanceExtraStore("ItemModifiedAppearanceExtra.db2", &ItemModifiedAppearanceExtraLoadInfo::Instance);
|
||||
DB2Storage<ItemNameDescriptionEntry> sItemNameDescriptionStore("ItemNameDescription.db2", &ItemNameDescriptionLoadInfo::Instance);
|
||||
DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", &ItemPriceBaseLoadInfo::Instance);
|
||||
DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore("ItemRandomProperties.db2", &ItemRandomPropertiesLoadInfo::Instance);
|
||||
DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore("ItemRandomSuffix.db2", &ItemRandomSuffixLoadInfo::Instance);
|
||||
DB2Storage<ItemSearchNameEntry> sItemSearchNameStore("ItemSearchName.db2", &ItemSearchNameLoadInfo::Instance);
|
||||
DB2Storage<ItemSetEntry> sItemSetStore("ItemSet.db2", &ItemSetLoadInfo::Instance);
|
||||
DB2Storage<ItemSetSpellEntry> sItemSetSpellStore("ItemSetSpell.db2", &ItemSetSpellLoadInfo::Instance);
|
||||
|
||||
@@ -159,6 +159,8 @@ TC_GAME_API extern DB2Storage<ItemLimitCategoryEntry> sItemLimitCa
|
||||
TC_GAME_API extern DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore;
|
||||
TC_GAME_API extern DB2Storage<ItemModifiedAppearanceExtraEntry> sItemModifiedAppearanceExtraStore;
|
||||
TC_GAME_API extern DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore;
|
||||
TC_GAME_API extern DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore;
|
||||
TC_GAME_API extern DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore;
|
||||
TC_GAME_API extern DB2Storage<ItemSearchNameEntry> sItemSearchNameStore;
|
||||
TC_GAME_API extern DB2Storage<ItemSetEntry> sItemSetStore;
|
||||
TC_GAME_API extern DB2Storage<ItemSetSpellEntry> sItemSetSpellStore;
|
||||
|
||||
@@ -2240,6 +2240,21 @@ struct ItemPriceBaseEntry
|
||||
float Weapon;
|
||||
};
|
||||
|
||||
struct ItemRandomPropertiesEntry
|
||||
{
|
||||
uint32 ID;
|
||||
LocalizedString Name;
|
||||
std::array<uint16, 5> Enchantment;
|
||||
};
|
||||
|
||||
struct ItemRandomSuffixEntry
|
||||
{
|
||||
uint32 ID;
|
||||
LocalizedString Name;
|
||||
std::array<uint16, 5> Enchantment;
|
||||
std::array<uint16, 5> AllocationPct;
|
||||
};
|
||||
|
||||
struct ItemSearchNameEntry
|
||||
{
|
||||
Trinity::RaceMask<int64> AllowableRace;
|
||||
|
||||
Reference in New Issue
Block a user