mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/DataStores: Fixed loading signed db2 fields
This commit is contained in:
25
sql/updates/hotfixes/6.x/2016_10_09_00_hotfixes.sql
Normal file
25
sql/updates/hotfixes/6.x/2016_10_09_00_hotfixes.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
ALTER TABLE `artifact_power` MODIFY `RelicType` int(11) NOT NULL DEFAULT '0' AFTER `ID`;
|
||||
ALTER TABLE `criteria_tree` MODIFY `OrderIndex` int(11) NOT NULL DEFAULT '0' AFTER `Operator`;
|
||||
ALTER TABLE `dungeon_encounter` MODIFY `OrderIndex` int(11) NOT NULL DEFAULT '0' AFTER `Flags`;
|
||||
ALTER TABLE `emotes` MODIFY `ClassMask` int(11) NOT NULL DEFAULT '0' AFTER `EmoteSoundID`;
|
||||
ALTER TABLE `emotes` MODIFY `RaceMask` int(11) NOT NULL DEFAULT '0' AFTER `ClassMask`;
|
||||
ALTER TABLE `garr_building` MODIFY `BuildDuration` int(11) NOT NULL DEFAULT '0' AFTER `GarrTypeID`;
|
||||
ALTER TABLE `garr_building` MODIFY `BonusAmount` int(11) NOT NULL DEFAULT '0' AFTER `CostCurrencyAmount`;
|
||||
ALTER TABLE `item_search_name` MODIFY `AllowableClass` int(11) NOT NULL DEFAULT '0' AFTER `RequiredLevel`;
|
||||
ALTER TABLE `player_condition` MODIFY `ClassMask` int(11) NOT NULL DEFAULT '0' AFTER `PowerTypeValue`;
|
||||
ALTER TABLE `player_condition` MODIFY `Unknown7001` int(11) NOT NULL DEFAULT '0' AFTER `MaxAvgItemLevel`;
|
||||
ALTER TABLE `player_condition` MODIFY `Unknown7002` int(11) NOT NULL DEFAULT '0' AFTER `Unknown7001`;
|
||||
ALTER TABLE `skill_line_ability` MODIFY `ClassMask` int(11) NOT NULL DEFAULT '0' AFTER `NumSkillUps`;
|
||||
ALTER TABLE `spell_category` CHANGE `Unk703` `ChargeCategoryType` int(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `MaxCharges`;
|
||||
ALTER TABLE `spell_effect` MODIFY `EffectBasePoints` int(11) NOT NULL DEFAULT '0' AFTER `EffectAuraPeriod`;
|
||||
ALTER TABLE `spell_effect` MODIFY `EffectDieSides` int(11) NOT NULL DEFAULT '0' AFTER `EffectChainTargets`;
|
||||
ALTER TABLE `spell_power` MODIFY `ManaCostPerLevel` int(11) NOT NULL DEFAULT '0' AFTER `ID`;
|
||||
ALTER TABLE `spell_power` MODIFY `ManaCostPerSecond` int(11) NOT NULL DEFAULT '0' AFTER `ManaCostPerLevel`;
|
||||
ALTER TABLE `summon_properties` MODIFY `Type` int(11) NOT NULL DEFAULT '0' AFTER `Faction`;
|
||||
ALTER TABLE `tact_key` CHANGE `Id` `ID` int(10) UNSIGNED NOT NULL DEFAULT '0' FIRST ;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `OffsetX` int(11) NOT NULL DEFAULT '0' AFTER `AreaID4`;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `OffsetY` int(11) NOT NULL DEFAULT '0' AFTER `OffsetX`;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `HitRectTop` int(11) NOT NULL DEFAULT '0' AFTER `OffsetY`;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `HitRectLeft` int(11) NOT NULL DEFAULT '0' AFTER `HitRectTop`;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `HitRectBottom` int(11) NOT NULL DEFAULT '0' AFTER `HitRectLeft`;
|
||||
ALTER TABLE `world_map_overlay` MODIFY `HitRectRight` int(11) NOT NULL DEFAULT '0' AFTER `HitRectBottom`;
|
||||
@@ -99,3 +99,8 @@ uint32 DB2Meta::GetStringFieldCount(bool localizedOnly) const
|
||||
|
||||
return stringFields;
|
||||
}
|
||||
|
||||
DB2FieldMeta::DB2FieldMeta(bool isSigned, DBCFormer type, char const* name)
|
||||
: IsSigned(isSigned), Type(type), Name(name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -44,4 +44,13 @@ struct TC_COMMON_API DB2Meta
|
||||
uint8 const* ArraySizes;
|
||||
};
|
||||
|
||||
struct TC_COMMON_API DB2FieldMeta
|
||||
{
|
||||
DB2FieldMeta(bool isSigned, DBCFormer type, char const* name);
|
||||
|
||||
bool IsSigned;
|
||||
DBCFormer Type;
|
||||
char const* Name;
|
||||
};
|
||||
|
||||
#endif // DB2Meta_h__
|
||||
|
||||
@@ -204,8 +204,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_CREATURE_TYPE, "SELECT ID, Name_lang FROM creature_type_locale WHERE locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// Criteria.db2
|
||||
PrepareStatement(HOTFIX_SEL_CRITERIA, "SELECT ID, StartAsset, FailAsset, StartTimer, ModifierTreeId, EligibilityWorldStateID, Type, StartEvent, "
|
||||
"FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_CRITERIA, "SELECT ID, Asset, StartAsset, FailAsset, StartTimer, ModifierTreeId, EligibilityWorldStateID, Type, "
|
||||
"StartEvent, FailEvent, Flags, EligibilityWorldStateValue FROM criteria ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
// CriteriaTree.db2
|
||||
PrepareStatement(HOTFIX_SEL_CRITERIA_TREE, "SELECT ID, CriteriaID, Amount, Description, Parent, Flags, Operator, OrderIndex FROM criteria_tree"
|
||||
@@ -746,8 +746,8 @@ void HotfixDatabaseConnection::DoPrepareStatements()
|
||||
"DispelType, Mechanic, PreventionType FROM spell_categories ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
|
||||
// SpellCategory.db2
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges, Unk703 FROM spell_category"
|
||||
" ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
PrepareStatement(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name, ChargeRecoveryTime, Flags, UsesPerWeek, MaxCharges, ChargeCategoryType"
|
||||
" FROM spell_category ORDER BY ID DESC", CONNECTION_SYNCH);
|
||||
PREPARE_LOCALE_STMT(HOTFIX_SEL_SPELL_CATEGORY, "SELECT ID, Name_lang FROM spell_category_locale WHERE locale = ?", CONNECTION_SYNCH);
|
||||
|
||||
// SpellClassOptions.db2
|
||||
|
||||
@@ -1910,7 +1910,7 @@ void Battleground::StartCriteriaTimer(CriteriaTimedTypes type, uint32 entry)
|
||||
player->StartCriteriaTimer(type, entry);
|
||||
}
|
||||
|
||||
void Battleground::SetBracket(PvPDifficultyEntry const* bracketEntry)
|
||||
void Battleground::SetBracket(PvpDifficultyEntry const* bracketEntry)
|
||||
{
|
||||
m_BracketId = bracketEntry->GetBracketId();
|
||||
SetLevelRange(bracketEntry->MinLevel, bracketEntry->MaxLevel);
|
||||
|
||||
@@ -39,7 +39,7 @@ class WorldObject;
|
||||
class WorldPacket;
|
||||
class BattlegroundMap;
|
||||
|
||||
struct PvPDifficultyEntry;
|
||||
struct PvpDifficultyEntry;
|
||||
struct WorldSafeLocsEntry;
|
||||
|
||||
enum BattlegroundCriteriaId
|
||||
@@ -290,7 +290,7 @@ class TC_GAME_API Battleground
|
||||
void SetTypeID(BattlegroundTypeId TypeID) { m_TypeID = TypeID; }
|
||||
void SetRandomTypeID(BattlegroundTypeId TypeID) { m_RandomTypeID = TypeID; }
|
||||
//here we can count minlevel and maxlevel for players
|
||||
void SetBracket(PvPDifficultyEntry const* bracketEntry);
|
||||
void SetBracket(PvpDifficultyEntry const* bracketEntry);
|
||||
void SetInstanceID(uint32 InstanceID) { m_InstanceID = InstanceID; }
|
||||
void SetStatus(BattlegroundStatus Status) { m_Status = Status; }
|
||||
void SetClientInstanceID(uint32 InstanceID) { m_ClientInstanceID = InstanceID; }
|
||||
|
||||
@@ -281,7 +281,7 @@ uint32 BattlegroundMgr::CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeI
|
||||
}
|
||||
|
||||
// create a new battleground that will really be used to play
|
||||
Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId originalBgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
|
||||
Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId originalBgTypeId, PvpDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated)
|
||||
{
|
||||
BattlegroundTypeId bgTypeId = GetRandomBG(originalBgTypeId);
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ class TC_GAME_API BattlegroundMgr
|
||||
/* Battlegrounds */
|
||||
Battleground* GetBattleground(uint32 InstanceID, BattlegroundTypeId bgTypeId);
|
||||
Battleground* GetBattlegroundTemplate(BattlegroundTypeId bgTypeId);
|
||||
Battleground* CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated);
|
||||
Battleground* CreateNewBattleground(BattlegroundTypeId bgTypeId, PvpDifficultyEntry const* bracketEntry, uint8 arenaType, bool isRated);
|
||||
|
||||
void AddBattleground(Battleground* bg);
|
||||
void RemoveBattleground(BattlegroundTypeId bgTypeId, uint32 instanceId);
|
||||
|
||||
@@ -126,7 +126,7 @@ bool BattlegroundQueue::SelectionPool::AddGroup(GroupQueueInfo* ginfo, uint32 de
|
||||
/*********************************************************/
|
||||
|
||||
// add group or player (grp == NULL) to bg queue with the given leader and bg specifications
|
||||
GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, BattlegroundTypeId BgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid)
|
||||
GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, BattlegroundTypeId BgTypeId, PvpDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 arenateamid)
|
||||
{
|
||||
BattlegroundBracketId bracketId = bracketEntry->GetBracketId();
|
||||
|
||||
@@ -814,7 +814,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundTyp
|
||||
return;
|
||||
}
|
||||
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id);
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketById(bg_template->GetMapId(), bracket_id);
|
||||
if (!bracketEntry)
|
||||
{
|
||||
TC_LOG_ERROR("bg.battleground", "Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->GetMapId(), bracket_id);
|
||||
|
||||
@@ -85,7 +85,7 @@ class TC_GAME_API BattlegroundQueue
|
||||
bool CheckPremadeMatch(BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam);
|
||||
bool CheckNormalMatch(Battleground* bg_template, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers);
|
||||
bool CheckSkirmishForSameFaction(BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam);
|
||||
GroupQueueInfo* AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0);
|
||||
GroupQueueInfo* AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvpDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0);
|
||||
void RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount);
|
||||
bool IsPlayerInvited(ObjectGuid pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime);
|
||||
bool GetPlayerGroupInfoData(ObjectGuid guid, GroupQueueInfo* ginfo);
|
||||
|
||||
4683
src/server/game/DataStores/DB2LoadInfo.h
Normal file
4683
src/server/game/DataStores/DB2LoadInfo.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,215 +19,215 @@
|
||||
#include "Common.h"
|
||||
#include "Containers.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DB2Metadata.h"
|
||||
#include "DB2LoadInfo.h"
|
||||
#include "Log.h"
|
||||
#include "TransportMgr.h"
|
||||
#include "World.h"
|
||||
|
||||
DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementMeta::Instance(), HOTFIX_SEL_ACHIEVEMENT);
|
||||
DB2Storage<AnimKitEntry> sAnimKitStore("AnimKit.db2", AnimKitMeta::Instance(), HOTFIX_SEL_ANIM_KIT);
|
||||
DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberMeta::Instance(), HOTFIX_SEL_AREA_GROUP_MEMBER);
|
||||
DB2Storage<AreaTableEntry> sAreaTableStore("AreaTable.db2", AreaTableMeta::Instance(), HOTFIX_SEL_AREA_TABLE);
|
||||
DB2Storage<AreaTriggerEntry> sAreaTriggerStore("AreaTrigger.db2", AreaTriggerMeta::Instance(), HOTFIX_SEL_AREA_TRIGGER);
|
||||
DB2Storage<ArmorLocationEntry> sArmorLocationStore("ArmorLocation.db2", ArmorLocationMeta::Instance(), HOTFIX_SEL_ARMOR_LOCATION);
|
||||
DB2Storage<ArtifactEntry> sArtifactStore("Artifact.db2", ArtifactMeta::Instance(), HOTFIX_SEL_ARTIFACT);
|
||||
DB2Storage<ArtifactAppearanceEntry> sArtifactAppearanceStore("ArtifactAppearance.db2", ArtifactAppearanceMeta::Instance(), HOTFIX_SEL_ARTIFACT_APPEARANCE);
|
||||
DB2Storage<ArtifactAppearanceSetEntry> sArtifactAppearanceSetStore("ArtifactAppearanceSet.db2", ArtifactAppearanceSetMeta::Instance(), HOTFIX_SEL_ARTIFACT_APPEARANCE_SET);
|
||||
DB2Storage<ArtifactCategoryEntry> sArtifactCategoryStore("ArtifactCategory.db2", ArtifactCategoryMeta::Instance(), HOTFIX_SEL_ARTIFACT_CATEGORY);
|
||||
DB2Storage<ArtifactPowerEntry> sArtifactPowerStore("ArtifactPower.db2", ArtifactPowerMeta::Instance(), HOTFIX_SEL_ARTIFACT_POWER);
|
||||
DB2Storage<ArtifactPowerLinkEntry> sArtifactPowerLinkStore("ArtifactPowerLink.db2", ArtifactPowerLinkMeta::Instance(), HOTFIX_SEL_ARTIFACT_POWER_LINK);
|
||||
DB2Storage<ArtifactPowerRankEntry> sArtifactPowerRankStore("ArtifactPowerRank.db2", ArtifactPowerRankMeta::Instance(), HOTFIX_SEL_ARTIFACT_POWER_RANK);
|
||||
DB2Storage<ArtifactQuestXPEntry> sArtifactQuestXPStore("ArtifactQuestXP.db2", ArtifactQuestXPMeta::Instance(), HOTFIX_SEL_ARTIFACT_QUEST_XP);
|
||||
DB2Storage<AuctionHouseEntry> sAuctionHouseStore("AuctionHouse.db2", AuctionHouseMeta::Instance(), HOTFIX_SEL_AUCTION_HOUSE);
|
||||
DB2Storage<BankBagSlotPricesEntry> sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesMeta::Instance(), HOTFIX_SEL_BANK_BAG_SLOT_PRICES);
|
||||
DB2Storage<BannedAddOnsEntry> sBannedAddOnsStore("BannedAddOns.db2", BannedAddOnsMeta::Instance(), HOTFIX_SEL_BANNED_ADDONS);
|
||||
DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleMeta::Instance(), HOTFIX_SEL_BARBER_SHOP_STYLE);
|
||||
DB2Storage<BattlePetBreedQualityEntry> sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityMeta::Instance(), HOTFIX_SEL_BATTLE_PET_BREED_QUALITY);
|
||||
DB2Storage<BattlePetBreedStateEntry> sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateMeta::Instance(), HOTFIX_SEL_BATTLE_PET_BREED_STATE);
|
||||
DB2Storage<BattlePetSpeciesEntry> sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesMeta::Instance(), HOTFIX_SEL_BATTLE_PET_SPECIES);
|
||||
DB2Storage<BattlePetSpeciesStateEntry> sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateMeta::Instance(), HOTFIX_SEL_BATTLE_PET_SPECIES_STATE);
|
||||
DB2Storage<BattlemasterListEntry> sBattlemasterListStore("BattlemasterList.db2", BattlemasterListMeta::Instance(), HOTFIX_SEL_BATTLEMASTER_LIST);
|
||||
DB2Storage<BroadcastTextEntry> sBroadcastTextStore("BroadcastText.db2", BroadcastTextMeta::Instance(), HOTFIX_SEL_BROADCAST_TEXT);
|
||||
DB2Storage<CharSectionsEntry> sCharSectionsStore("CharSections.db2", CharSectionsMeta::Instance(), HOTFIX_SEL_CHAR_SECTIONS);
|
||||
DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitMeta::Instance(), HOTFIX_SEL_CHAR_START_OUTFIT);
|
||||
DB2Storage<CharTitlesEntry> sCharTitlesStore("CharTitles.db2", CharTitlesMeta::Instance(), HOTFIX_SEL_CHAR_TITLES);
|
||||
DB2Storage<ChatChannelsEntry> sChatChannelsStore("ChatChannels.db2", ChatChannelsMeta::Instance(), HOTFIX_SEL_CHAT_CHANNELS);
|
||||
DB2Storage<ChrClassesEntry> sChrClassesStore("ChrClasses.db2", ChrClassesMeta::Instance(), HOTFIX_SEL_CHR_CLASSES);
|
||||
DB2Storage<ChrClassesXPowerTypesEntry> sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesMeta::Instance(), HOTFIX_SEL_CHR_CLASSES_X_POWER_TYPES);
|
||||
DB2Storage<ChrRacesEntry> sChrRacesStore("ChrRaces.db2", ChrRacesMeta::Instance(), HOTFIX_SEL_CHR_RACES);
|
||||
DB2Storage<ChrSpecializationEntry> sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationMeta::Instance(), HOTFIX_SEL_CHR_SPECIALIZATION);
|
||||
DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesMeta::Instance(), HOTFIX_SEL_CINEMATIC_SEQUENCES);
|
||||
DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoMeta::Instance(), HOTFIX_SEL_CREATURE_DISPLAY_INFO);
|
||||
DB2Storage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraMeta::Instance(), HOTFIX_SEL_CREATURE_DISPLAY_INFO_EXTRA);
|
||||
DB2Storage<CreatureFamilyEntry> sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyMeta::Instance(), HOTFIX_SEL_CREATURE_FAMILY);
|
||||
DB2Storage<CreatureModelDataEntry> sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataMeta::Instance(), HOTFIX_SEL_CREATURE_MODEL_DATA);
|
||||
DB2Storage<CreatureTypeEntry> sCreatureTypeStore("CreatureType.db2", CreatureTypeMeta::Instance(), HOTFIX_SEL_CREATURE_TYPE);
|
||||
DB2Storage<CriteriaEntry> sCriteriaStore("Criteria.db2", CriteriaMeta::Instance(), HOTFIX_SEL_CRITERIA);
|
||||
DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeMeta::Instance(), HOTFIX_SEL_CRITERIA_TREE);
|
||||
DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesMeta::Instance(), HOTFIX_SEL_CURRENCY_TYPES);
|
||||
DB2Storage<CurveEntry> sCurveStore("Curve.db2", CurveMeta::Instance(), HOTFIX_SEL_CURVE);
|
||||
DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointMeta::Instance(), HOTFIX_SEL_CURVE_POINT);
|
||||
DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataMeta::Instance(), HOTFIX_SEL_DESTRUCTIBLE_MODEL_DATA);
|
||||
DB2Storage<DifficultyEntry> sDifficultyStore("Difficulty.db2", DifficultyMeta::Instance(), HOTFIX_SEL_DIFFICULTY);
|
||||
DB2Storage<DungeonEncounterEntry> sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterMeta::Instance(), HOTFIX_SEL_DUNGEON_ENCOUNTER);
|
||||
DB2Storage<DurabilityCostsEntry> sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsMeta::Instance(), HOTFIX_SEL_DURABILITY_COSTS);
|
||||
DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityMeta::Instance(), HOTFIX_SEL_DURABILITY_QUALITY);
|
||||
DB2Storage<EmotesEntry> sEmotesStore("Emotes.db2", EmotesMeta::Instance(), HOTFIX_SEL_EMOTES);
|
||||
DB2Storage<EmotesTextEntry> sEmotesTextStore("EmotesText.db2", EmotesTextMeta::Instance(), HOTFIX_SEL_EMOTES_TEXT);
|
||||
DB2Storage<EmotesTextSoundEntry> sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundMeta::Instance(), HOTFIX_SEL_EMOTES_TEXT_SOUND);
|
||||
DB2Storage<FactionEntry> sFactionStore("Faction.db2", FactionMeta::Instance(), HOTFIX_SEL_FACTION);
|
||||
DB2Storage<FactionTemplateEntry> sFactionTemplateStore("FactionTemplate.db2", FactionTemplateMeta::Instance(), HOTFIX_SEL_FACTION_TEMPLATE);
|
||||
DB2Storage<GameObjectsEntry> sGameObjectsStore("GameObjects.db2", GameObjectsMeta::Instance(), HOTFIX_SEL_GAMEOBJECTS);
|
||||
DB2Storage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameObjectDisplayInfoMeta::Instance(), HOTFIX_SEL_GAMEOBJECT_DISPLAY_INFO);
|
||||
DB2Storage<GarrAbilityEntry> sGarrAbilityStore("GarrAbility.db2", GarrAbilityMeta::Instance(), HOTFIX_SEL_GARR_ABILITY);
|
||||
DB2Storage<GarrBuildingEntry> sGarrBuildingStore("GarrBuilding.db2", GarrBuildingMeta::Instance(), HOTFIX_SEL_GARR_BUILDING);
|
||||
DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstMeta::Instance(), HOTFIX_SEL_GARR_BUILDING_PLOT_INST);
|
||||
DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecMeta::Instance(), HOTFIX_SEL_GARR_CLASS_SPEC);
|
||||
DB2Storage<GarrFollowerEntry> sGarrFollowerStore("GarrFollower.db2", GarrFollowerMeta::Instance(), HOTFIX_SEL_GARR_FOLLOWER);
|
||||
DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityMeta::Instance(), HOTFIX_SEL_GARR_FOLLOWER_X_ABILITY);
|
||||
DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingMeta::Instance(), HOTFIX_SEL_GARR_PLOT_BUILDING);
|
||||
DB2Storage<GarrPlotEntry> sGarrPlotStore("GarrPlot.db2", GarrPlotMeta::Instance(), HOTFIX_SEL_GARR_PLOT);
|
||||
DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceMeta::Instance(), HOTFIX_SEL_GARR_PLOT_INSTANCE);
|
||||
DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelMeta::Instance(), HOTFIX_SEL_GARR_SITE_LEVEL);
|
||||
DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstMeta::Instance(), HOTFIX_SEL_GARR_SITE_LEVEL_PLOT_INST);
|
||||
DB2Storage<GemPropertiesEntry> sGemPropertiesStore("GemProperties.db2", GemPropertiesMeta::Instance(), HOTFIX_SEL_GEM_PROPERTIES);
|
||||
DB2Storage<GlyphBindableSpellEntry> sGlyphBindableSpellStore("GlyphBindableSpell.db2", GlyphBindableSpellMeta::Instance(), HOTFIX_SEL_GLYPH_BINDABLE_SPELL);
|
||||
DB2Storage<GlyphPropertiesEntry> sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesMeta::Instance(), HOTFIX_SEL_GLYPH_PROPERTIES);
|
||||
DB2Storage<GlyphRequiredSpecEntry> sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", GlyphRequiredSpecMeta::Instance(), HOTFIX_SEL_GLYPH_REQUIRED_SPEC);
|
||||
DB2Storage<GuildColorBackgroundEntry> sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_BACKGROUND);
|
||||
DB2Storage<GuildColorBorderEntry> sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_BORDER);
|
||||
DB2Storage<GuildColorEmblemEntry> sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemMeta::Instance(), HOTFIX_SEL_GUILD_COLOR_EMBLEM);
|
||||
DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsMeta::Instance(), HOTFIX_SEL_GUILD_PERK_SPELLS);
|
||||
DB2Storage<HeirloomEntry> sHeirloomStore("Heirloom.db2", HeirloomMeta::Instance(), HOTFIX_SEL_HEIRLOOM);
|
||||
DB2Storage<HolidaysEntry> sHolidaysStore("Holidays.db2", HolidaysMeta::Instance(), HOTFIX_SEL_HOLIDAYS);
|
||||
DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_ARMOR);
|
||||
DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_QUALITY);
|
||||
DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_SHIELD);
|
||||
DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponMeta::Instance(), HOTFIX_SEL_IMPORT_PRICE_WEAPON);
|
||||
DB2Storage<ItemAppearanceEntry> sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceMeta::Instance(), HOTFIX_SEL_ITEM_APPEARANCE);
|
||||
DB2Storage<ItemArmorQualityEntry> sItemArmorQualityStore("ItemArmorQuality.db2", ItemArmorQualityMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_QUALITY);
|
||||
DB2Storage<ItemArmorShieldEntry> sItemArmorShieldStore("ItemArmorShield.db2", ItemArmorShieldMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_SHIELD);
|
||||
DB2Storage<ItemArmorTotalEntry> sItemArmorTotalStore("ItemArmorTotal.db2", ItemArmorTotalMeta::Instance(), HOTFIX_SEL_ITEM_ARMOR_TOTAL);
|
||||
DB2Storage<ItemBagFamilyEntry> sItemBagFamilyStore("ItemBagFamily.db2", ItemBagFamilyMeta::Instance(), HOTFIX_SEL_ITEM_BAG_FAMILY);
|
||||
DB2Storage<ItemBonusEntry> sItemBonusStore("ItemBonus.db2", ItemBonusMeta::Instance(), HOTFIX_SEL_ITEM_BONUS);
|
||||
DB2Storage<ItemBonusListLevelDeltaEntry> sItemBonusListLevelDeltaStore("ItemBonusListLevelDelta.db2", ItemBonusListLevelDeltaMeta::Instance(), HOTFIX_SEL_ITEM_BONUS_LIST_LEVEL_DELTA);
|
||||
DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeMeta::Instance(), HOTFIX_SEL_ITEM_BONUS_TREE_NODE);
|
||||
DB2Storage<ItemChildEquipmentEntry> sItemChildEquipmentStore("ItemChildEquipment.db2", ItemChildEquipmentMeta::Instance(), HOTFIX_SEL_ITEM_CHILD_EQUIPMENT);
|
||||
DB2Storage<ItemClassEntry> sItemClassStore("ItemClass.db2", ItemClassMeta::Instance(), HOTFIX_SEL_ITEM_CLASS);
|
||||
DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostMeta::Instance(), HOTFIX_SEL_ITEM_CURRENCY_COST);
|
||||
DB2Storage<ItemDamageAmmoEntry> sItemDamageAmmoStore("ItemDamageAmmo.db2", ItemDamageAmmoMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_AMMO);
|
||||
DB2Storage<ItemDamageOneHandEntry> sItemDamageOneHandStore("ItemDamageOneHand.db2", ItemDamageOneHandMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND);
|
||||
DB2Storage<ItemDamageOneHandCasterEntry> sItemDamageOneHandCasterStore("ItemDamageOneHandCaster.db2", ItemDamageOneHandCasterMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_ONE_HAND_CASTER);
|
||||
DB2Storage<ItemDamageTwoHandEntry> sItemDamageTwoHandStore("ItemDamageTwoHand.db2", ItemDamageTwoHandMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND);
|
||||
DB2Storage<ItemDamageTwoHandCasterEntry> sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", ItemDamageTwoHandCasterMeta::Instance(), HOTFIX_SEL_ITEM_DAMAGE_TWO_HAND_CASTER);
|
||||
DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootMeta::Instance(), HOTFIX_SEL_ITEM_DISENCHANT_LOOT);
|
||||
DB2Storage<ItemEffectEntry> sItemEffectStore("ItemEffect.db2", ItemEffectMeta::Instance(), HOTFIX_SEL_ITEM_EFFECT);
|
||||
DB2Storage<ItemEntry> sItemStore("Item.db2", ItemMeta::Instance(), HOTFIX_SEL_ITEM);
|
||||
DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostMeta::Instance(), HOTFIX_SEL_ITEM_EXTENDED_COST);
|
||||
DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryMeta::Instance(), HOTFIX_SEL_ITEM_LIMIT_CATEGORY);
|
||||
DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceMeta::Instance(), HOTFIX_SEL_ITEM_MODIFIED_APPEARANCE);
|
||||
DB2Storage<ItemPriceBaseEntry> sItemPriceBaseStore("ItemPriceBase.db2", ItemPriceBaseMeta::Instance(), HOTFIX_SEL_ITEM_PRICE_BASE);
|
||||
DB2Storage<ItemRandomPropertiesEntry> sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesMeta::Instance(), HOTFIX_SEL_ITEM_RANDOM_PROPERTIES);
|
||||
DB2Storage<ItemRandomSuffixEntry> sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixMeta::Instance(), HOTFIX_SEL_ITEM_RANDOM_SUFFIX);
|
||||
DB2Storage<ItemSearchNameEntry> sItemSearchNameStore("ItemSearchName.db2", ItemSearchNameMeta::Instance(), HOTFIX_SEL_ITEM_SEARCH_NAME);
|
||||
DB2Storage<ItemSetEntry> sItemSetStore("ItemSet.db2", ItemSetMeta::Instance(), HOTFIX_SEL_ITEM_SET);
|
||||
DB2Storage<ItemSetSpellEntry> sItemSetSpellStore("ItemSetSpell.db2", ItemSetSpellMeta::Instance(), HOTFIX_SEL_ITEM_SET_SPELL);
|
||||
DB2Storage<ItemSparseEntry> sItemSparseStore("Item-sparse.db2", ItemSparseMeta::Instance(), HOTFIX_SEL_ITEM_SPARSE);
|
||||
DB2Storage<ItemSpecEntry> sItemSpecStore("ItemSpec.db2", ItemSpecMeta::Instance(), HOTFIX_SEL_ITEM_SPEC);
|
||||
DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideMeta::Instance(), HOTFIX_SEL_ITEM_SPEC_OVERRIDE);
|
||||
DB2Storage<ItemUpgradeEntry> sItemUpgradeStore("ItemUpgrade.db2", ItemUpgradeMeta::Instance(), HOTFIX_SEL_ITEM_UPGRADE);
|
||||
DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeMeta::Instance(), HOTFIX_SEL_ITEM_X_BONUS_TREE);
|
||||
DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainMeta::Instance(), HOTFIX_SEL_KEY_CHAIN);
|
||||
DB2Storage<LfgDungeonsEntry> sLfgDungeonsStore("LfgDungeons.db2", LfgDungeonsMeta::Instance(), HOTFIX_SEL_LFG_DUNGEONS);
|
||||
DB2Storage<LightEntry> sLightStore("Light.db2", LightMeta::Instance(), HOTFIX_SEL_LIGHT);
|
||||
DB2Storage<LiquidTypeEntry> sLiquidTypeStore("LiquidType.db2", LiquidTypeMeta::Instance(), HOTFIX_SEL_LIQUID_TYPE);
|
||||
DB2Storage<LockEntry> sLockStore("Lock.db2", LockMeta::Instance(), HOTFIX_SEL_LOCK);
|
||||
DB2Storage<MailTemplateEntry> sMailTemplateStore("MailTemplate.db2", MailTemplateMeta::Instance(), HOTFIX_SEL_MAIL_TEMPLATE);
|
||||
DB2Storage<MapEntry> sMapStore("Map.db2", MapMeta::Instance(), HOTFIX_SEL_MAP);
|
||||
DB2Storage<MapDifficultyEntry> sMapDifficultyStore("MapDifficulty.db2", MapDifficultyMeta::Instance(), HOTFIX_SEL_MAP_DIFFICULTY);
|
||||
DB2Storage<ModifierTreeEntry> sModifierTreeStore("ModifierTree.db2", ModifierTreeMeta::Instance(), HOTFIX_SEL_MODIFIER_TREE);
|
||||
DB2Storage<MountCapabilityEntry> sMountCapabilityStore("MountCapability.db2", MountCapabilityMeta::Instance(), HOTFIX_SEL_MOUNT_CAPABILITY);
|
||||
DB2Storage<MountEntry> sMountStore("Mount.db2", MountMeta::Instance(), HOTFIX_SEL_MOUNT);
|
||||
DB2Storage<MountTypeXCapabilityEntry> sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityMeta::Instance(), HOTFIX_SEL_MOUNT_TYPE_X_CAPABILITY);
|
||||
DB2Storage<MovieEntry> sMovieStore("Movie.db2", MovieMeta::Instance(), HOTFIX_SEL_MOVIE);
|
||||
DB2Storage<NameGenEntry> sNameGenStore("NameGen.db2", NameGenMeta::Instance(), HOTFIX_SEL_NAME_GEN);
|
||||
DB2Storage<NamesProfanityEntry> sNamesProfanityStore("NamesProfanity.db2", NamesProfanityMeta::Instance(), HOTFIX_SEL_NAMES_PROFANITY);
|
||||
DB2Storage<NamesReservedEntry> sNamesReservedStore("NamesReserved.db2", NamesReservedMeta::Instance(), HOTFIX_SEL_NAMES_RESERVED);
|
||||
DB2Storage<NamesReservedLocaleEntry> sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleMeta::Instance(), HOTFIX_SEL_NAMES_RESERVED_LOCALE);
|
||||
DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataMeta::Instance(), HOTFIX_SEL_OVERRIDE_SPELL_DATA);
|
||||
DB2Storage<PhaseEntry> sPhaseStore("Phase.db2", PhaseMeta::Instance(), HOTFIX_SEL_PHASE);
|
||||
DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupMeta::Instance(), HOTFIX_SEL_PHASE_X_PHASE_GROUP);
|
||||
DB2Storage<PlayerConditionEntry> sPlayerConditionStore("PlayerCondition.db2", PlayerConditionMeta::Instance(), HOTFIX_SEL_PLAYER_CONDITION);
|
||||
DB2Storage<PowerDisplayEntry> sPowerDisplayStore("PowerDisplay.db2", PowerDisplayMeta::Instance(), HOTFIX_SEL_POWER_DISPLAY);
|
||||
DB2Storage<PowerTypeEntry> sPowerTypeStore("PowerType.db2", PowerTypeMeta::Instance(), HOTFIX_SEL_POWER_TYPE);
|
||||
DB2Storage<PvPDifficultyEntry> sPvpDifficultyStore("PvpDifficulty.db2", PvpDifficultyMeta::Instance(), HOTFIX_SEL_PVP_DIFFICULTY);
|
||||
DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardMeta::Instance(), HOTFIX_SEL_QUEST_FACTION_REWARD);
|
||||
DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardMeta::Instance(), HOTFIX_SEL_QUEST_MONEY_REWARD);
|
||||
DB2Storage<QuestPackageItemEntry> sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemMeta::Instance(), HOTFIX_SEL_QUEST_PACKAGE_ITEM);
|
||||
DB2Storage<QuestSortEntry> sQuestSortStore("QuestSort.db2", QuestSortMeta::Instance(), HOTFIX_SEL_QUEST_SORT);
|
||||
DB2Storage<QuestV2Entry> sQuestV2Store("QuestV2.db2", QuestV2Meta::Instance(), HOTFIX_SEL_QUEST_V2);
|
||||
DB2Storage<QuestXPEntry> sQuestXPStore("QuestXP.db2", QuestXPMeta::Instance(), HOTFIX_SEL_QUEST_XP);
|
||||
DB2Storage<RandPropPointsEntry> sRandPropPointsStore("RandPropPoints.db2", RandPropPointsMeta::Instance(), HOTFIX_SEL_RAND_PROP_POINTS);
|
||||
DB2Storage<RulesetItemUpgradeEntry> sRulesetItemUpgradeStore("RulesetItemUpgrade.db2", RulesetItemUpgradeMeta::Instance(), HOTFIX_SEL_RULESET_ITEM_UPGRADE);
|
||||
DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionMeta::Instance(), HOTFIX_SEL_SCALING_STAT_DISTRIBUTION);
|
||||
DB2Storage<SceneScriptEntry> sSceneScriptStore("SceneScript.db2", SceneScriptMeta::Instance(), HOTFIX_SEL_SCENE_SCRIPT);
|
||||
DB2Storage<SceneScriptPackageEntry> sSceneScriptPackageStore("SceneScriptPackage.db2", SceneScriptPackageMeta::Instance(), HOTFIX_SEL_SCENE_SCRIPT_PACKAGE);
|
||||
DB2Storage<SkillLineEntry> sSkillLineStore("SkillLine.db2", SkillLineMeta::Instance(), HOTFIX_SEL_SKILL_LINE);
|
||||
DB2Storage<SkillLineAbilityEntry> sSkillLineAbilityStore("SkillLineAbility.db2", SkillLineAbilityMeta::Instance(), HOTFIX_SEL_SKILL_LINE_ABILITY);
|
||||
DB2Storage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", SkillRaceClassInfoMeta::Instance(), HOTFIX_SEL_SKILL_RACE_CLASS_INFO);
|
||||
DB2Storage<SoundKitEntry> sSoundKitStore("SoundKit.db2", SoundKitMeta::Instance(), HOTFIX_SEL_SOUND_KIT);
|
||||
DB2Storage<SpecializationSpellsEntry> sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsMeta::Instance(), HOTFIX_SEL_SPECIALIZATION_SPELLS);
|
||||
DB2Storage<SpellEntry> sSpellStore("Spell.db2", SpellMeta::Instance(), HOTFIX_SEL_SPELL);
|
||||
DB2Storage<SpellAuraOptionsEntry> sSpellAuraOptionsStore("SpellAuraOptions.db2", SpellAuraOptionsMeta::Instance(), HOTFIX_SEL_SPELL_AURA_OPTIONS);
|
||||
DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsMeta::Instance(), HOTFIX_SEL_SPELL_AURA_RESTRICTIONS);
|
||||
DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesMeta::Instance(), HOTFIX_SEL_SPELL_CAST_TIMES);
|
||||
DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsMeta::Instance(), HOTFIX_SEL_SPELL_CASTING_REQUIREMENTS);
|
||||
DB2Storage<SpellCategoriesEntry> sSpellCategoriesStore("SpellCategories.db2", SpellCategoriesMeta::Instance(), HOTFIX_SEL_SPELL_CATEGORIES);
|
||||
DB2Storage<SpellCategoryEntry> sSpellCategoryStore("SpellCategory.db2", SpellCategoryMeta::Instance(), HOTFIX_SEL_SPELL_CATEGORY);
|
||||
DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsMeta::Instance(), HOTFIX_SEL_SPELL_CLASS_OPTIONS);
|
||||
DB2Storage<SpellCooldownsEntry> sSpellCooldownsStore("SpellCooldowns.db2", SpellCooldownsMeta::Instance(), HOTFIX_SEL_SPELL_COOLDOWNS);
|
||||
DB2Storage<SpellDurationEntry> sSpellDurationStore("SpellDuration.db2", SpellDurationMeta::Instance(), HOTFIX_SEL_SPELL_DURATION);
|
||||
DB2Storage<SpellEffectEntry> sSpellEffectStore("SpellEffect.db2", SpellEffectMeta::Instance(), HOTFIX_SEL_SPELL_EFFECT);
|
||||
DB2Storage<SpellEffectScalingEntry> sSpellEffectScalingStore("SpellEffectScaling.db2", SpellEffectScalingMeta::Instance(), HOTFIX_SEL_SPELL_EFFECT_SCALING);
|
||||
DB2Storage<SpellEquippedItemsEntry> sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsMeta::Instance(), HOTFIX_SEL_SPELL_EQUIPPED_ITEMS);
|
||||
DB2Storage<SpellFocusObjectEntry> sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectMeta::Instance(), HOTFIX_SEL_SPELL_FOCUS_OBJECT);
|
||||
DB2Storage<SpellInterruptsEntry> sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsMeta::Instance(), HOTFIX_SEL_SPELL_INTERRUPTS);
|
||||
DB2Storage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentMeta::Instance(), HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT);
|
||||
DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionMeta::Instance(), HOTFIX_SEL_SPELL_ITEM_ENCHANTMENT_CONDITION);
|
||||
DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellMeta::Instance(), HOTFIX_SEL_SPELL_LEARN_SPELL);
|
||||
DB2Storage<SpellLevelsEntry> sSpellLevelsStore("SpellLevels.db2", SpellLevelsMeta::Instance(), HOTFIX_SEL_SPELL_LEVELS);
|
||||
DB2Storage<SpellMiscEntry> sSpellMiscStore("SpellMisc.db2", SpellMiscMeta::Instance(), HOTFIX_SEL_SPELL_MISC);
|
||||
DB2Storage<SpellPowerEntry> sSpellPowerStore("SpellPower.db2", SpellPowerMeta::Instance(), HOTFIX_SEL_SPELL_POWER);
|
||||
DB2Storage<SpellPowerDifficultyEntry> sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyMeta::Instance(), HOTFIX_SEL_SPELL_POWER_DIFFICULTY);
|
||||
DB2Storage<SpellProcsPerMinuteEntry> sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", SpellProcsPerMinuteMeta::Instance(), HOTFIX_SEL_SPELL_PROCS_PER_MINUTE);
|
||||
DB2Storage<SpellProcsPerMinuteModEntry> sSpellProcsPerMinuteModStore("SpellProcsPerMinuteMod.db2", SpellProcsPerMinuteModMeta::Instance(), HOTFIX_SEL_SPELL_PROCS_PER_MINUTE_MOD);
|
||||
DB2Storage<SpellRadiusEntry> sSpellRadiusStore("SpellRadius.db2", SpellRadiusMeta::Instance(), HOTFIX_SEL_SPELL_RADIUS);
|
||||
DB2Storage<SpellRangeEntry> sSpellRangeStore("SpellRange.db2", SpellRangeMeta::Instance(), HOTFIX_SEL_SPELL_RANGE);
|
||||
DB2Storage<SpellReagentsEntry> sSpellReagentsStore("SpellReagents.db2", SpellReagentsMeta::Instance(), HOTFIX_SEL_SPELL_REAGENTS);
|
||||
DB2Storage<SpellScalingEntry> sSpellScalingStore("SpellScaling.db2", SpellScalingMeta::Instance(), HOTFIX_SEL_SPELL_SCALING);
|
||||
DB2Storage<SpellShapeshiftEntry> sSpellShapeshiftStore("SpellShapeshift.db2", SpellShapeshiftMeta::Instance(), HOTFIX_SEL_SPELL_SHAPESHIFT);
|
||||
DB2Storage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", SpellShapeshiftFormMeta::Instance(), HOTFIX_SEL_SPELL_SHAPESHIFT_FORM);
|
||||
DB2Storage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsMeta::Instance(), HOTFIX_SEL_SPELL_TARGET_RESTRICTIONS);
|
||||
DB2Storage<SpellTotemsEntry> sSpellTotemsStore("SpellTotems.db2", SpellTotemsMeta::Instance(), HOTFIX_SEL_SPELL_TOTEMS);
|
||||
DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualMeta::Instance(), HOTFIX_SEL_SPELL_X_SPELL_VISUAL);
|
||||
DB2Storage<SummonPropertiesEntry> sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesMeta::Instance(), HOTFIX_SEL_SUMMON_PROPERTIES);
|
||||
DB2Storage<TactKeyEntry> sTactKeyStore("TactKey.db2", TactKeyMeta::Instance(), HOTFIX_SEL_TACT_KEY);
|
||||
DB2Storage<TalentEntry> sTalentStore("Talent.db2", TalentMeta::Instance(), HOTFIX_SEL_TALENT);
|
||||
DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", TaxiNodesMeta::Instance(), HOTFIX_SEL_TAXI_NODES);
|
||||
DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", TaxiPathMeta::Instance(), HOTFIX_SEL_TAXI_PATH);
|
||||
DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeMeta::Instance(), HOTFIX_SEL_TAXI_PATH_NODE);
|
||||
DB2Storage<TotemCategoryEntry> sTotemCategoryStore("TotemCategory.db2", TotemCategoryMeta::Instance(), HOTFIX_SEL_TOTEM_CATEGORY);
|
||||
DB2Storage<ToyEntry> sToyStore("Toy.db2", ToyMeta::Instance(), HOTFIX_SEL_TOY);
|
||||
DB2Storage<TransportAnimationEntry> sTransportAnimationStore("TransportAnimation.db2", TransportAnimationMeta::Instance(), HOTFIX_SEL_TRANSPORT_ANIMATION);
|
||||
DB2Storage<TransportRotationEntry> sTransportRotationStore("TransportRotation.db2", TransportRotationMeta::Instance(), HOTFIX_SEL_TRANSPORT_ROTATION);
|
||||
DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarMeta::Instance(), HOTFIX_SEL_UNIT_POWER_BAR);
|
||||
DB2Storage<VehicleEntry> sVehicleStore("Vehicle.db2", VehicleMeta::Instance(), HOTFIX_SEL_VEHICLE);
|
||||
DB2Storage<VehicleSeatEntry> sVehicleSeatStore("VehicleSeat.db2", VehicleSeatMeta::Instance(), HOTFIX_SEL_VEHICLE_SEAT);
|
||||
DB2Storage<WMOAreaTableEntry> sWMOAreaTableStore("WMOAreaTable.db2", WMOAreaTableMeta::Instance(), HOTFIX_SEL_WMO_AREA_TABLE);
|
||||
DB2Storage<WorldMapAreaEntry> sWorldMapAreaStore("WorldMapArea.db2", WorldMapAreaMeta::Instance(), HOTFIX_SEL_WORLD_MAP_AREA);
|
||||
DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayMeta::Instance(), HOTFIX_SEL_WORLD_MAP_OVERLAY);
|
||||
DB2Storage<WorldMapTransformsEntry> sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsMeta::Instance(), HOTFIX_SEL_WORLD_MAP_TRANSFORMS);
|
||||
DB2Storage<WorldSafeLocsEntry> sWorldSafeLocsStore("WorldSafeLocs.db2", WorldSafeLocsMeta::Instance(), HOTFIX_SEL_WORLD_SAFE_LOCS);
|
||||
DB2Storage<AchievementEntry> sAchievementStore("Achievement.db2", AchievementLoadInfo::Instance());
|
||||
DB2Storage<AnimKitEntry> sAnimKitStore("AnimKit.db2", AnimKitLoadInfo::Instance());
|
||||
DB2Storage<AreaGroupMemberEntry> sAreaGroupMemberStore("AreaGroupMember.db2", AreaGroupMemberLoadInfo::Instance());
|
||||
DB2Storage<AreaTableEntry> sAreaTableStore("AreaTable.db2", AreaTableLoadInfo::Instance());
|
||||
DB2Storage<AreaTriggerEntry> sAreaTriggerStore("AreaTrigger.db2", AreaTriggerLoadInfo::Instance());
|
||||
DB2Storage<ArmorLocationEntry> sArmorLocationStore("ArmorLocation.db2", ArmorLocationLoadInfo::Instance());
|
||||
DB2Storage<ArtifactEntry> sArtifactStore("Artifact.db2", ArtifactLoadInfo::Instance());
|
||||
DB2Storage<ArtifactAppearanceEntry> sArtifactAppearanceStore("ArtifactAppearance.db2", ArtifactAppearanceLoadInfo::Instance());
|
||||
DB2Storage<ArtifactAppearanceSetEntry> sArtifactAppearanceSetStore("ArtifactAppearanceSet.db2", ArtifactAppearanceSetLoadInfo::Instance());
|
||||
DB2Storage<ArtifactCategoryEntry> sArtifactCategoryStore("ArtifactCategory.db2", ArtifactCategoryLoadInfo::Instance());
|
||||
DB2Storage<ArtifactPowerEntry> sArtifactPowerStore("ArtifactPower.db2", ArtifactPowerLoadInfo::Instance());
|
||||
DB2Storage<ArtifactPowerLinkEntry> sArtifactPowerLinkStore("ArtifactPowerLink.db2", ArtifactPowerLinkLoadInfo::Instance());
|
||||
DB2Storage<ArtifactPowerRankEntry> sArtifactPowerRankStore("ArtifactPowerRank.db2", ArtifactPowerRankLoadInfo::Instance());
|
||||
DB2Storage<ArtifactQuestXPEntry> sArtifactQuestXPStore("ArtifactQuestXP.db2", ArtifactQuestXpLoadInfo::Instance());
|
||||
DB2Storage<AuctionHouseEntry> sAuctionHouseStore("AuctionHouse.db2", AuctionHouseLoadInfo::Instance());
|
||||
DB2Storage<BankBagSlotPricesEntry> sBankBagSlotPricesStore("BankBagSlotPrices.db2", BankBagSlotPricesLoadInfo::Instance());
|
||||
DB2Storage<BannedAddOnsEntry> sBannedAddOnsStore("BannedAddOns.db2", BannedAddonsLoadInfo::Instance());
|
||||
DB2Storage<BarberShopStyleEntry> sBarberShopStyleStore("BarberShopStyle.db2", BarberShopStyleLoadInfo::Instance());
|
||||
DB2Storage<BattlePetBreedQualityEntry> sBattlePetBreedQualityStore("BattlePetBreedQuality.db2", BattlePetBreedQualityLoadInfo::Instance());
|
||||
DB2Storage<BattlePetBreedStateEntry> sBattlePetBreedStateStore("BattlePetBreedState.db2", BattlePetBreedStateLoadInfo::Instance());
|
||||
DB2Storage<BattlePetSpeciesEntry> sBattlePetSpeciesStore("BattlePetSpecies.db2", BattlePetSpeciesLoadInfo::Instance());
|
||||
DB2Storage<BattlePetSpeciesStateEntry> sBattlePetSpeciesStateStore("BattlePetSpeciesState.db2", BattlePetSpeciesStateLoadInfo::Instance());
|
||||
DB2Storage<BattlemasterListEntry> sBattlemasterListStore("BattlemasterList.db2", BattlemasterListLoadInfo::Instance());
|
||||
DB2Storage<BroadcastTextEntry> sBroadcastTextStore("BroadcastText.db2", BroadcastTextLoadInfo::Instance());
|
||||
DB2Storage<CharSectionsEntry> sCharSectionsStore("CharSections.db2", CharSectionsLoadInfo::Instance());
|
||||
DB2Storage<CharStartOutfitEntry> sCharStartOutfitStore("CharStartOutfit.db2", CharStartOutfitLoadInfo::Instance());
|
||||
DB2Storage<CharTitlesEntry> sCharTitlesStore("CharTitles.db2", CharTitlesLoadInfo::Instance());
|
||||
DB2Storage<ChatChannelsEntry> sChatChannelsStore("ChatChannels.db2", ChatChannelsLoadInfo::Instance());
|
||||
DB2Storage<ChrClassesEntry> sChrClassesStore("ChrClasses.db2", ChrClassesLoadInfo::Instance());
|
||||
DB2Storage<ChrClassesXPowerTypesEntry> sChrClassesXPowerTypesStore("ChrClassesXPowerTypes.db2", ChrClassesXPowerTypesLoadInfo::Instance());
|
||||
DB2Storage<ChrRacesEntry> sChrRacesStore("ChrRaces.db2", ChrRacesLoadInfo::Instance());
|
||||
DB2Storage<ChrSpecializationEntry> sChrSpecializationStore("ChrSpecialization.db2", ChrSpecializationLoadInfo::Instance());
|
||||
DB2Storage<CinematicSequencesEntry> sCinematicSequencesStore("CinematicSequences.db2", CinematicSequencesLoadInfo::Instance());
|
||||
DB2Storage<CreatureDisplayInfoEntry> sCreatureDisplayInfoStore("CreatureDisplayInfo.db2", CreatureDisplayInfoLoadInfo::Instance());
|
||||
DB2Storage<CreatureDisplayInfoExtraEntry> sCreatureDisplayInfoExtraStore("CreatureDisplayInfoExtra.db2", CreatureDisplayInfoExtraLoadInfo::Instance());
|
||||
DB2Storage<CreatureFamilyEntry> sCreatureFamilyStore("CreatureFamily.db2", CreatureFamilyLoadInfo::Instance());
|
||||
DB2Storage<CreatureModelDataEntry> sCreatureModelDataStore("CreatureModelData.db2", CreatureModelDataLoadInfo::Instance());
|
||||
DB2Storage<CreatureTypeEntry> sCreatureTypeStore("CreatureType.db2", CreatureTypeLoadInfo::Instance());
|
||||
DB2Storage<CriteriaEntry> sCriteriaStore("Criteria.db2", CriteriaLoadInfo::Instance());
|
||||
DB2Storage<CriteriaTreeEntry> sCriteriaTreeStore("CriteriaTree.db2", CriteriaTreeLoadInfo::Instance());
|
||||
DB2Storage<CurrencyTypesEntry> sCurrencyTypesStore("CurrencyTypes.db2", CurrencyTypesLoadInfo::Instance());
|
||||
DB2Storage<CurveEntry> sCurveStore("Curve.db2", CurveLoadInfo::Instance());
|
||||
DB2Storage<CurvePointEntry> sCurvePointStore("CurvePoint.db2", CurvePointLoadInfo::Instance());
|
||||
DB2Storage<DestructibleModelDataEntry> sDestructibleModelDataStore("DestructibleModelData.db2", DestructibleModelDataLoadInfo::Instance());
|
||||
DB2Storage<DifficultyEntry> sDifficultyStore("Difficulty.db2", DifficultyLoadInfo::Instance());
|
||||
DB2Storage<DungeonEncounterEntry> sDungeonEncounterStore("DungeonEncounter.db2", DungeonEncounterLoadInfo::Instance());
|
||||
DB2Storage<DurabilityCostsEntry> sDurabilityCostsStore("DurabilityCosts.db2", DurabilityCostsLoadInfo::Instance());
|
||||
DB2Storage<DurabilityQualityEntry> sDurabilityQualityStore("DurabilityQuality.db2", DurabilityQualityLoadInfo::Instance());
|
||||
DB2Storage<EmotesEntry> sEmotesStore("Emotes.db2", EmotesLoadInfo::Instance());
|
||||
DB2Storage<EmotesTextEntry> sEmotesTextStore("EmotesText.db2", EmotesTextLoadInfo::Instance());
|
||||
DB2Storage<EmotesTextSoundEntry> sEmotesTextSoundStore("EmotesTextSound.db2", EmotesTextSoundLoadInfo::Instance());
|
||||
DB2Storage<FactionEntry> sFactionStore("Faction.db2", FactionLoadInfo::Instance());
|
||||
DB2Storage<FactionTemplateEntry> sFactionTemplateStore("FactionTemplate.db2", FactionTemplateLoadInfo::Instance());
|
||||
DB2Storage<GameObjectsEntry> sGameObjectsStore("GameObjects.db2", GameobjectsLoadInfo::Instance());
|
||||
DB2Storage<GameObjectDisplayInfoEntry> sGameObjectDisplayInfoStore("GameObjectDisplayInfo.db2", GameobjectDisplayInfoLoadInfo::Instance());
|
||||
DB2Storage<GarrAbilityEntry> sGarrAbilityStore("GarrAbility.db2", GarrAbilityLoadInfo::Instance());
|
||||
DB2Storage<GarrBuildingEntry> sGarrBuildingStore("GarrBuilding.db2", GarrBuildingLoadInfo::Instance());
|
||||
DB2Storage<GarrBuildingPlotInstEntry> sGarrBuildingPlotInstStore("GarrBuildingPlotInst.db2", GarrBuildingPlotInstLoadInfo::Instance());
|
||||
DB2Storage<GarrClassSpecEntry> sGarrClassSpecStore("GarrClassSpec.db2", GarrClassSpecLoadInfo::Instance());
|
||||
DB2Storage<GarrFollowerEntry> sGarrFollowerStore("GarrFollower.db2", GarrFollowerLoadInfo::Instance());
|
||||
DB2Storage<GarrFollowerXAbilityEntry> sGarrFollowerXAbilityStore("GarrFollowerXAbility.db2", GarrFollowerXAbilityLoadInfo::Instance());
|
||||
DB2Storage<GarrPlotBuildingEntry> sGarrPlotBuildingStore("GarrPlotBuilding.db2", GarrPlotBuildingLoadInfo::Instance());
|
||||
DB2Storage<GarrPlotEntry> sGarrPlotStore("GarrPlot.db2", GarrPlotLoadInfo::Instance());
|
||||
DB2Storage<GarrPlotInstanceEntry> sGarrPlotInstanceStore("GarrPlotInstance.db2", GarrPlotInstanceLoadInfo::Instance());
|
||||
DB2Storage<GarrSiteLevelEntry> sGarrSiteLevelStore("GarrSiteLevel.db2", GarrSiteLevelLoadInfo::Instance());
|
||||
DB2Storage<GarrSiteLevelPlotInstEntry> sGarrSiteLevelPlotInstStore("GarrSiteLevelPlotInst.db2", GarrSiteLevelPlotInstLoadInfo::Instance());
|
||||
DB2Storage<GemPropertiesEntry> sGemPropertiesStore("GemProperties.db2", GemPropertiesLoadInfo::Instance());
|
||||
DB2Storage<GlyphBindableSpellEntry> sGlyphBindableSpellStore("GlyphBindableSpell.db2", GlyphBindableSpellLoadInfo::Instance());
|
||||
DB2Storage<GlyphPropertiesEntry> sGlyphPropertiesStore("GlyphProperties.db2", GlyphPropertiesLoadInfo::Instance());
|
||||
DB2Storage<GlyphRequiredSpecEntry> sGlyphRequiredSpecStore("GlyphRequiredSpec.db2", GlyphRequiredSpecLoadInfo::Instance());
|
||||
DB2Storage<GuildColorBackgroundEntry> sGuildColorBackgroundStore("GuildColorBackground.db2", GuildColorBackgroundLoadInfo::Instance());
|
||||
DB2Storage<GuildColorBorderEntry> sGuildColorBorderStore("GuildColorBorder.db2", GuildColorBorderLoadInfo::Instance());
|
||||
DB2Storage<GuildColorEmblemEntry> sGuildColorEmblemStore("GuildColorEmblem.db2", GuildColorEmblemLoadInfo::Instance());
|
||||
DB2Storage<GuildPerkSpellsEntry> sGuildPerkSpellsStore("GuildPerkSpells.db2", GuildPerkSpellsLoadInfo::Instance());
|
||||
DB2Storage<HeirloomEntry> sHeirloomStore("Heirloom.db2", HeirloomLoadInfo::Instance());
|
||||
DB2Storage<HolidaysEntry> sHolidaysStore("Holidays.db2", HolidaysLoadInfo::Instance());
|
||||
DB2Storage<ImportPriceArmorEntry> sImportPriceArmorStore("ImportPriceArmor.db2", ImportPriceArmorLoadInfo::Instance());
|
||||
DB2Storage<ImportPriceQualityEntry> sImportPriceQualityStore("ImportPriceQuality.db2", ImportPriceQualityLoadInfo::Instance());
|
||||
DB2Storage<ImportPriceShieldEntry> sImportPriceShieldStore("ImportPriceShield.db2", ImportPriceShieldLoadInfo::Instance());
|
||||
DB2Storage<ImportPriceWeaponEntry> sImportPriceWeaponStore("ImportPriceWeapon.db2", ImportPriceWeaponLoadInfo::Instance());
|
||||
DB2Storage<ItemAppearanceEntry> sItemAppearanceStore("ItemAppearance.db2", ItemAppearanceLoadInfo::Instance());
|
||||
DB2Storage<ItemArmorQualityEntry> sItemArmorQualityStore("ItemArmorQuality.db2", ItemArmorQualityLoadInfo::Instance());
|
||||
DB2Storage<ItemArmorShieldEntry> sItemArmorShieldStore("ItemArmorShield.db2", ItemArmorShieldLoadInfo::Instance());
|
||||
DB2Storage<ItemArmorTotalEntry> sItemArmorTotalStore("ItemArmorTotal.db2", ItemArmorTotalLoadInfo::Instance());
|
||||
DB2Storage<ItemBagFamilyEntry> sItemBagFamilyStore("ItemBagFamily.db2", ItemBagFamilyLoadInfo::Instance());
|
||||
DB2Storage<ItemBonusEntry> sItemBonusStore("ItemBonus.db2", ItemBonusLoadInfo::Instance());
|
||||
DB2Storage<ItemBonusListLevelDeltaEntry> sItemBonusListLevelDeltaStore("ItemBonusListLevelDelta.db2", ItemBonusListLevelDeltaLoadInfo::Instance());
|
||||
DB2Storage<ItemBonusTreeNodeEntry> sItemBonusTreeNodeStore("ItemBonusTreeNode.db2", ItemBonusTreeNodeLoadInfo::Instance());
|
||||
DB2Storage<ItemChildEquipmentEntry> sItemChildEquipmentStore("ItemChildEquipment.db2", ItemChildEquipmentLoadInfo::Instance());
|
||||
DB2Storage<ItemClassEntry> sItemClassStore("ItemClass.db2", ItemClassLoadInfo::Instance());
|
||||
DB2Storage<ItemCurrencyCostEntry> sItemCurrencyCostStore("ItemCurrencyCost.db2", ItemCurrencyCostLoadInfo::Instance());
|
||||
DB2Storage<ItemDamageAmmoEntry> sItemDamageAmmoStore("ItemDamageAmmo.db2", ItemDamageAmmoLoadInfo::Instance());
|
||||
DB2Storage<ItemDamageOneHandEntry> sItemDamageOneHandStore("ItemDamageOneHand.db2", ItemDamageOneHandLoadInfo::Instance());
|
||||
DB2Storage<ItemDamageOneHandCasterEntry> sItemDamageOneHandCasterStore("ItemDamageOneHandCaster.db2", ItemDamageOneHandCasterLoadInfo::Instance());
|
||||
DB2Storage<ItemDamageTwoHandEntry> sItemDamageTwoHandStore("ItemDamageTwoHand.db2", ItemDamageTwoHandLoadInfo::Instance());
|
||||
DB2Storage<ItemDamageTwoHandCasterEntry> sItemDamageTwoHandCasterStore("ItemDamageTwoHandCaster.db2", ItemDamageTwoHandCasterLoadInfo::Instance());
|
||||
DB2Storage<ItemDisenchantLootEntry> sItemDisenchantLootStore("ItemDisenchantLoot.db2", ItemDisenchantLootLoadInfo::Instance());
|
||||
DB2Storage<ItemEffectEntry> sItemEffectStore("ItemEffect.db2", ItemEffectLoadInfo::Instance());
|
||||
DB2Storage<ItemEntry> sItemStore("Item.db2", ItemLoadInfo::Instance());
|
||||
DB2Storage<ItemExtendedCostEntry> sItemExtendedCostStore("ItemExtendedCost.db2", ItemExtendedCostLoadInfo::Instance());
|
||||
DB2Storage<ItemLimitCategoryEntry> sItemLimitCategoryStore("ItemLimitCategory.db2", ItemLimitCategoryLoadInfo::Instance());
|
||||
DB2Storage<ItemModifiedAppearanceEntry> sItemModifiedAppearanceStore("ItemModifiedAppearance.db2", ItemModifiedAppearanceLoadInfo::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());
|
||||
DB2Storage<ItemSparseEntry> sItemSparseStore("Item-sparse.db2", ItemSparseLoadInfo::Instance());
|
||||
DB2Storage<ItemSpecEntry> sItemSpecStore("ItemSpec.db2", ItemSpecLoadInfo::Instance());
|
||||
DB2Storage<ItemSpecOverrideEntry> sItemSpecOverrideStore("ItemSpecOverride.db2", ItemSpecOverrideLoadInfo::Instance());
|
||||
DB2Storage<ItemUpgradeEntry> sItemUpgradeStore("ItemUpgrade.db2", ItemUpgradeLoadInfo::Instance());
|
||||
DB2Storage<ItemXBonusTreeEntry> sItemXBonusTreeStore("ItemXBonusTree.db2", ItemXBonusTreeLoadInfo::Instance());
|
||||
DB2Storage<KeyChainEntry> sKeyChainStore("KeyChain.db2", KeyChainLoadInfo::Instance());
|
||||
DB2Storage<LfgDungeonsEntry> sLfgDungeonsStore("LfgDungeons.db2", LfgDungeonsLoadInfo::Instance());
|
||||
DB2Storage<LightEntry> sLightStore("Light.db2", LightLoadInfo::Instance());
|
||||
DB2Storage<LiquidTypeEntry> sLiquidTypeStore("LiquidType.db2", LiquidTypeLoadInfo::Instance());
|
||||
DB2Storage<LockEntry> sLockStore("Lock.db2", LockLoadInfo::Instance());
|
||||
DB2Storage<MailTemplateEntry> sMailTemplateStore("MailTemplate.db2", MailTemplateLoadInfo::Instance());
|
||||
DB2Storage<MapEntry> sMapStore("Map.db2", MapLoadInfo::Instance());
|
||||
DB2Storage<MapDifficultyEntry> sMapDifficultyStore("MapDifficulty.db2", MapDifficultyLoadInfo::Instance());
|
||||
DB2Storage<ModifierTreeEntry> sModifierTreeStore("ModifierTree.db2", ModifierTreeLoadInfo::Instance());
|
||||
DB2Storage<MountCapabilityEntry> sMountCapabilityStore("MountCapability.db2", MountCapabilityLoadInfo::Instance());
|
||||
DB2Storage<MountEntry> sMountStore("Mount.db2", MountLoadInfo::Instance());
|
||||
DB2Storage<MountTypeXCapabilityEntry> sMountTypeXCapabilityStore("MountTypeXCapability.db2", MountTypeXCapabilityLoadInfo::Instance());
|
||||
DB2Storage<MovieEntry> sMovieStore("Movie.db2", MovieLoadInfo::Instance());
|
||||
DB2Storage<NameGenEntry> sNameGenStore("NameGen.db2", NameGenLoadInfo::Instance());
|
||||
DB2Storage<NamesProfanityEntry> sNamesProfanityStore("NamesProfanity.db2", NamesProfanityLoadInfo::Instance());
|
||||
DB2Storage<NamesReservedEntry> sNamesReservedStore("NamesReserved.db2", NamesReservedLoadInfo::Instance());
|
||||
DB2Storage<NamesReservedLocaleEntry> sNamesReservedLocaleStore("NamesReservedLocale.db2", NamesReservedLocaleLoadInfo::Instance());
|
||||
DB2Storage<OverrideSpellDataEntry> sOverrideSpellDataStore("OverrideSpellData.db2", OverrideSpellDataLoadInfo::Instance());
|
||||
DB2Storage<PhaseEntry> sPhaseStore("Phase.db2", PhaseLoadInfo::Instance());
|
||||
DB2Storage<PhaseXPhaseGroupEntry> sPhaseXPhaseGroupStore("PhaseXPhaseGroup.db2", PhaseXPhaseGroupLoadInfo::Instance());
|
||||
DB2Storage<PlayerConditionEntry> sPlayerConditionStore("PlayerCondition.db2", PlayerConditionLoadInfo::Instance());
|
||||
DB2Storage<PowerDisplayEntry> sPowerDisplayStore("PowerDisplay.db2", PowerDisplayLoadInfo::Instance());
|
||||
DB2Storage<PowerTypeEntry> sPowerTypeStore("PowerType.db2", PowerTypeLoadInfo::Instance());
|
||||
DB2Storage<PvpDifficultyEntry> sPvpDifficultyStore("PvpDifficulty.db2", PvpDifficultyLoadInfo::Instance());
|
||||
DB2Storage<QuestFactionRewardEntry> sQuestFactionRewardStore("QuestFactionReward.db2", QuestFactionRewardLoadInfo::Instance());
|
||||
DB2Storage<QuestMoneyRewardEntry> sQuestMoneyRewardStore("QuestMoneyReward.db2", QuestMoneyRewardLoadInfo::Instance());
|
||||
DB2Storage<QuestPackageItemEntry> sQuestPackageItemStore("QuestPackageItem.db2", QuestPackageItemLoadInfo::Instance());
|
||||
DB2Storage<QuestSortEntry> sQuestSortStore("QuestSort.db2", QuestSortLoadInfo::Instance());
|
||||
DB2Storage<QuestV2Entry> sQuestV2Store("QuestV2.db2", QuestV2LoadInfo::Instance());
|
||||
DB2Storage<QuestXPEntry> sQuestXPStore("QuestXP.db2", QuestXpLoadInfo::Instance());
|
||||
DB2Storage<RandPropPointsEntry> sRandPropPointsStore("RandPropPoints.db2", RandPropPointsLoadInfo::Instance());
|
||||
DB2Storage<RulesetItemUpgradeEntry> sRulesetItemUpgradeStore("RulesetItemUpgrade.db2", RulesetItemUpgradeLoadInfo::Instance());
|
||||
DB2Storage<ScalingStatDistributionEntry> sScalingStatDistributionStore("ScalingStatDistribution.db2", ScalingStatDistributionLoadInfo::Instance());
|
||||
DB2Storage<SceneScriptEntry> sSceneScriptStore("SceneScript.db2", SceneScriptLoadInfo::Instance());
|
||||
DB2Storage<SceneScriptPackageEntry> sSceneScriptPackageStore("SceneScriptPackage.db2", SceneScriptPackageLoadInfo::Instance());
|
||||
DB2Storage<SkillLineEntry> sSkillLineStore("SkillLine.db2", SkillLineLoadInfo::Instance());
|
||||
DB2Storage<SkillLineAbilityEntry> sSkillLineAbilityStore("SkillLineAbility.db2", SkillLineAbilityLoadInfo::Instance());
|
||||
DB2Storage<SkillRaceClassInfoEntry> sSkillRaceClassInfoStore("SkillRaceClassInfo.db2", SkillRaceClassInfoLoadInfo::Instance());
|
||||
DB2Storage<SoundKitEntry> sSoundKitStore("SoundKit.db2", SoundKitLoadInfo::Instance());
|
||||
DB2Storage<SpecializationSpellsEntry> sSpecializationSpellsStore("SpecializationSpells.db2", SpecializationSpellsLoadInfo::Instance());
|
||||
DB2Storage<SpellEntry> sSpellStore("Spell.db2", SpellLoadInfo::Instance());
|
||||
DB2Storage<SpellAuraOptionsEntry> sSpellAuraOptionsStore("SpellAuraOptions.db2", SpellAuraOptionsLoadInfo::Instance());
|
||||
DB2Storage<SpellAuraRestrictionsEntry> sSpellAuraRestrictionsStore("SpellAuraRestrictions.db2", SpellAuraRestrictionsLoadInfo::Instance());
|
||||
DB2Storage<SpellCastTimesEntry> sSpellCastTimesStore("SpellCastTimes.db2", SpellCastTimesLoadInfo::Instance());
|
||||
DB2Storage<SpellCastingRequirementsEntry> sSpellCastingRequirementsStore("SpellCastingRequirements.db2", SpellCastingRequirementsLoadInfo::Instance());
|
||||
DB2Storage<SpellCategoriesEntry> sSpellCategoriesStore("SpellCategories.db2", SpellCategoriesLoadInfo::Instance());
|
||||
DB2Storage<SpellCategoryEntry> sSpellCategoryStore("SpellCategory.db2", SpellCategoryLoadInfo::Instance());
|
||||
DB2Storage<SpellClassOptionsEntry> sSpellClassOptionsStore("SpellClassOptions.db2", SpellClassOptionsLoadInfo::Instance());
|
||||
DB2Storage<SpellCooldownsEntry> sSpellCooldownsStore("SpellCooldowns.db2", SpellCooldownsLoadInfo::Instance());
|
||||
DB2Storage<SpellDurationEntry> sSpellDurationStore("SpellDuration.db2", SpellDurationLoadInfo::Instance());
|
||||
DB2Storage<SpellEffectEntry> sSpellEffectStore("SpellEffect.db2", SpellEffectLoadInfo::Instance());
|
||||
DB2Storage<SpellEffectScalingEntry> sSpellEffectScalingStore("SpellEffectScaling.db2", SpellEffectScalingLoadInfo::Instance());
|
||||
DB2Storage<SpellEquippedItemsEntry> sSpellEquippedItemsStore("SpellEquippedItems.db2", SpellEquippedItemsLoadInfo::Instance());
|
||||
DB2Storage<SpellFocusObjectEntry> sSpellFocusObjectStore("SpellFocusObject.db2", SpellFocusObjectLoadInfo::Instance());
|
||||
DB2Storage<SpellInterruptsEntry> sSpellInterruptsStore("SpellInterrupts.db2", SpellInterruptsLoadInfo::Instance());
|
||||
DB2Storage<SpellItemEnchantmentEntry> sSpellItemEnchantmentStore("SpellItemEnchantment.db2", SpellItemEnchantmentLoadInfo::Instance());
|
||||
DB2Storage<SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore("SpellItemEnchantmentCondition.db2", SpellItemEnchantmentConditionLoadInfo::Instance());
|
||||
DB2Storage<SpellLearnSpellEntry> sSpellLearnSpellStore("SpellLearnSpell.db2", SpellLearnSpellLoadInfo::Instance());
|
||||
DB2Storage<SpellLevelsEntry> sSpellLevelsStore("SpellLevels.db2", SpellLevelsLoadInfo::Instance());
|
||||
DB2Storage<SpellMiscEntry> sSpellMiscStore("SpellMisc.db2", SpellMiscLoadInfo::Instance());
|
||||
DB2Storage<SpellPowerEntry> sSpellPowerStore("SpellPower.db2", SpellPowerLoadInfo::Instance());
|
||||
DB2Storage<SpellPowerDifficultyEntry> sSpellPowerDifficultyStore("SpellPowerDifficulty.db2", SpellPowerDifficultyLoadInfo::Instance());
|
||||
DB2Storage<SpellProcsPerMinuteEntry> sSpellProcsPerMinuteStore("SpellProcsPerMinute.db2", SpellProcsPerMinuteLoadInfo::Instance());
|
||||
DB2Storage<SpellProcsPerMinuteModEntry> sSpellProcsPerMinuteModStore("SpellProcsPerMinuteMod.db2", SpellProcsPerMinuteModLoadInfo::Instance());
|
||||
DB2Storage<SpellRadiusEntry> sSpellRadiusStore("SpellRadius.db2", SpellRadiusLoadInfo::Instance());
|
||||
DB2Storage<SpellRangeEntry> sSpellRangeStore("SpellRange.db2", SpellRangeLoadInfo::Instance());
|
||||
DB2Storage<SpellReagentsEntry> sSpellReagentsStore("SpellReagents.db2", SpellReagentsLoadInfo::Instance());
|
||||
DB2Storage<SpellScalingEntry> sSpellScalingStore("SpellScaling.db2", SpellScalingLoadInfo::Instance());
|
||||
DB2Storage<SpellShapeshiftEntry> sSpellShapeshiftStore("SpellShapeshift.db2", SpellShapeshiftLoadInfo::Instance());
|
||||
DB2Storage<SpellShapeshiftFormEntry> sSpellShapeshiftFormStore("SpellShapeshiftForm.db2", SpellShapeshiftFormLoadInfo::Instance());
|
||||
DB2Storage<SpellTargetRestrictionsEntry> sSpellTargetRestrictionsStore("SpellTargetRestrictions.db2", SpellTargetRestrictionsLoadInfo::Instance());
|
||||
DB2Storage<SpellTotemsEntry> sSpellTotemsStore("SpellTotems.db2", SpellTotemsLoadInfo::Instance());
|
||||
DB2Storage<SpellXSpellVisualEntry> sSpellXSpellVisualStore("SpellXSpellVisual.db2", SpellXSpellVisualLoadInfo::Instance());
|
||||
DB2Storage<SummonPropertiesEntry> sSummonPropertiesStore("SummonProperties.db2", SummonPropertiesLoadInfo::Instance());
|
||||
DB2Storage<TactKeyEntry> sTactKeyStore("TactKey.db2", TactKeyLoadInfo::Instance());
|
||||
DB2Storage<TalentEntry> sTalentStore("Talent.db2", TalentLoadInfo::Instance());
|
||||
DB2Storage<TaxiNodesEntry> sTaxiNodesStore("TaxiNodes.db2", TaxiNodesLoadInfo::Instance());
|
||||
DB2Storage<TaxiPathEntry> sTaxiPathStore("TaxiPath.db2", TaxiPathLoadInfo::Instance());
|
||||
DB2Storage<TaxiPathNodeEntry> sTaxiPathNodeStore("TaxiPathNode.db2", TaxiPathNodeLoadInfo::Instance());
|
||||
DB2Storage<TotemCategoryEntry> sTotemCategoryStore("TotemCategory.db2", TotemCategoryLoadInfo::Instance());
|
||||
DB2Storage<ToyEntry> sToyStore("Toy.db2", ToyLoadInfo::Instance());
|
||||
DB2Storage<TransportAnimationEntry> sTransportAnimationStore("TransportAnimation.db2", TransportAnimationLoadInfo::Instance());
|
||||
DB2Storage<TransportRotationEntry> sTransportRotationStore("TransportRotation.db2", TransportRotationLoadInfo::Instance());
|
||||
DB2Storage<UnitPowerBarEntry> sUnitPowerBarStore("UnitPowerBar.db2", UnitPowerBarLoadInfo::Instance());
|
||||
DB2Storage<VehicleEntry> sVehicleStore("Vehicle.db2", VehicleLoadInfo::Instance());
|
||||
DB2Storage<VehicleSeatEntry> sVehicleSeatStore("VehicleSeat.db2", VehicleSeatLoadInfo::Instance());
|
||||
DB2Storage<WMOAreaTableEntry> sWMOAreaTableStore("WMOAreaTable.db2", WmoAreaTableLoadInfo::Instance());
|
||||
DB2Storage<WorldMapAreaEntry> sWorldMapAreaStore("WorldMapArea.db2", WorldMapAreaLoadInfo::Instance());
|
||||
DB2Storage<WorldMapOverlayEntry> sWorldMapOverlayStore("WorldMapOverlay.db2", WorldMapOverlayLoadInfo::Instance());
|
||||
DB2Storage<WorldMapTransformsEntry> sWorldMapTransformsStore("WorldMapTransforms.db2", WorldMapTransformsLoadInfo::Instance());
|
||||
DB2Storage<WorldSafeLocsEntry> sWorldSafeLocsStore("WorldSafeLocs.db2", WorldSafeLocsLoadInfo::Instance());
|
||||
|
||||
TaxiMask sTaxiNodesMask;
|
||||
TaxiMask sOldContinentsNodesMask;
|
||||
@@ -243,10 +243,24 @@ uint32 DB2FilesCount = 0;
|
||||
template<class T, template<class> class DB2>
|
||||
inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, DB2Manager::StorageMap& stores, DB2StorageBase* storage, std::string const& db2Path, uint32 defaultLocale, DB2<T> const& /*hint*/)
|
||||
{
|
||||
// compatibility format and C++ structure sizes
|
||||
ASSERT(storage->GetMeta()->GetRecordSize() == sizeof(T),
|
||||
"Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
|
||||
storage->GetFileName().c_str(), storage->GetMeta()->GetRecordSize(), sizeof(T));
|
||||
// validate structure
|
||||
DB2LoadInfo const* loadInfo = storage->GetLoadInfo();
|
||||
{
|
||||
std::string clientMetaString, ourMetaString;
|
||||
for (std::size_t i = 0; i < loadInfo->Meta->FieldCount; ++i)
|
||||
for (std::size_t j = 0; j < loadInfo->Meta->ArraySizes[i]; ++j)
|
||||
clientMetaString += loadInfo->Meta->Types[i];
|
||||
|
||||
for (std::size_t i = loadInfo->Meta->HasIndexFieldInData() ? 0 : 1; i < loadInfo->FieldCount; ++i)
|
||||
ourMetaString += char(loadInfo->Fields[i].Type);
|
||||
|
||||
ASSERT(clientMetaString == ourMetaString, "C++ structure fields %s do not match generated types from the client %s", ourMetaString.c_str(), clientMetaString.c_str());
|
||||
|
||||
// compatibility format and C++ structure sizes
|
||||
ASSERT(loadInfo->Meta->GetRecordSize() == sizeof(T),
|
||||
"Size of '%s' set by format string (%u) not equal size of C++ structure (" SZFMTD ").",
|
||||
storage->GetFileName().c_str(), loadInfo->Meta->GetRecordSize(), sizeof(T));
|
||||
}
|
||||
|
||||
++DB2FilesCount;
|
||||
|
||||
@@ -276,7 +290,7 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D
|
||||
if (FILE* f = fopen((db2Path + localeNames[defaultLocale] + '/' + storage->GetFileName()).c_str(), "rb"))
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << storage->GetMeta()->FieldCount
|
||||
stream << storage->GetFileName() << " exists, and has " << storage->GetFieldCount() << " field(s) (expected " << loadInfo->Meta->FieldCount
|
||||
<< "). Extracted file might be from wrong client version.";
|
||||
std::string buf = stream.str();
|
||||
errlist.push_back(buf);
|
||||
@@ -763,7 +777,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale)
|
||||
_powerTypes[powerType->PowerTypeEnum] = powerType;
|
||||
}
|
||||
|
||||
for (PvPDifficultyEntry const* entry : sPvpDifficultyStore)
|
||||
for (PvpDifficultyEntry const* entry : sPvpDifficultyStore)
|
||||
{
|
||||
ASSERT(entry->BracketID < MAX_BATTLEGROUND_BRACKETS, "PvpDifficulty bracket (%d) exceeded max allowed value (%d)", entry->BracketID, MAX_BATTLEGROUND_BRACKETS);
|
||||
}
|
||||
@@ -1557,12 +1571,12 @@ ResponseCodes DB2Manager::ValidateName(std::wstring const& name, LocaleConstant
|
||||
return CHAR_NAME_SUCCESS;
|
||||
}
|
||||
|
||||
PvPDifficultyEntry const* DB2Manager::GetBattlegroundBracketByLevel(uint32 mapid, uint32 level)
|
||||
PvpDifficultyEntry const* DB2Manager::GetBattlegroundBracketByLevel(uint32 mapid, uint32 level)
|
||||
{
|
||||
PvPDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case
|
||||
PvpDifficultyEntry const* maxEntry = NULL; // used for level > max listed level case
|
||||
for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i)
|
||||
{
|
||||
if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
|
||||
if (PvpDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
|
||||
{
|
||||
// skip unrelated and too-high brackets
|
||||
if (entry->MapID != mapid || entry->MinLevel > level)
|
||||
@@ -1581,10 +1595,10 @@ PvPDifficultyEntry const* DB2Manager::GetBattlegroundBracketByLevel(uint32 mapid
|
||||
return maxEntry;
|
||||
}
|
||||
|
||||
PvPDifficultyEntry const* DB2Manager::GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id)
|
||||
PvpDifficultyEntry const* DB2Manager::GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id)
|
||||
{
|
||||
for (uint32 i = 0; i < sPvpDifficultyStore.GetNumRows(); ++i)
|
||||
if (PvPDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
|
||||
if (PvpDifficultyEntry const* entry = sPvpDifficultyStore.LookupEntry(i))
|
||||
if (entry->MapID == mapid && entry->GetBracketId() == id)
|
||||
return entry;
|
||||
|
||||
|
||||
@@ -324,8 +324,8 @@ public:
|
||||
ResponseCodes ValidateName(std::wstring const& name, LocaleConstant locale) const;
|
||||
std::set<uint32> GetPhasesForGroup(uint32 group) const;
|
||||
PowerTypeEntry const* GetPowerTypeEntry(Powers power) const;
|
||||
static PvPDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
|
||||
static PvPDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
|
||||
static PvpDifficultyEntry const* GetBattlegroundBracketByLevel(uint32 mapid, uint32 level);
|
||||
static PvpDifficultyEntry const* GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id);
|
||||
std::vector<QuestPackageItemEntry const*> const* GetQuestPackageItems(uint32 questPackageID) const;
|
||||
uint32 GetQuestUniqueBitFlag(uint32 questId);
|
||||
uint32 GetRulesetItemUpgrade(uint32 itemId) const;
|
||||
|
||||
@@ -178,7 +178,7 @@ struct ArtifactPowerEntry
|
||||
uint8 Flags;
|
||||
uint8 MaxRank;
|
||||
uint32 ID;
|
||||
uint32 RelicType;
|
||||
int32 RelicType;
|
||||
};
|
||||
|
||||
struct ArtifactPowerLinkEntry
|
||||
@@ -695,7 +695,7 @@ struct CriteriaTreeEntry
|
||||
uint16 Parent;
|
||||
uint16 Flags;
|
||||
uint8 Operator;
|
||||
uint32 OrderIndex;
|
||||
int32 OrderIndex;
|
||||
};
|
||||
|
||||
struct CurrencyTypesEntry
|
||||
@@ -784,7 +784,7 @@ struct DungeonEncounterEntry
|
||||
uint8 DifficultyID;
|
||||
uint8 Bit;
|
||||
uint8 Flags;
|
||||
uint32 OrderIndex;
|
||||
int32 OrderIndex;
|
||||
};
|
||||
|
||||
struct DurabilityCostsEntry
|
||||
@@ -810,8 +810,8 @@ struct EmotesEntry
|
||||
uint8 EmoteSpecProc;
|
||||
uint32 EmoteSpecProcParam;
|
||||
uint32 EmoteSoundID;
|
||||
uint32 ClassMask;
|
||||
uint32 RaceMask;
|
||||
int32 ClassMask;
|
||||
int32 RaceMask;
|
||||
};
|
||||
|
||||
struct EmotesTextEntry
|
||||
@@ -981,9 +981,9 @@ struct GarrBuildingEntry
|
||||
uint8 Flags;
|
||||
uint8 MaxShipments;
|
||||
uint8 GarrTypeID;
|
||||
uint32 BuildDuration;
|
||||
int32 BuildDuration;
|
||||
int32 CostCurrencyAmount;
|
||||
uint32 BonusAmount;
|
||||
int32 BonusAmount;
|
||||
};
|
||||
|
||||
struct GarrBuildingPlotInstEntry
|
||||
@@ -1452,7 +1452,7 @@ struct ItemSearchNameEntry
|
||||
uint8 RequiredExpansion;
|
||||
uint8 RequiredReputationRank;
|
||||
uint8 RequiredLevel;
|
||||
uint32 AllowableClass;
|
||||
int32 AllowableClass;
|
||||
};
|
||||
|
||||
#define MAX_ITEM_SET_ITEMS 17
|
||||
@@ -1930,7 +1930,7 @@ struct PlayerConditionEntry
|
||||
int8 PowerType;
|
||||
int8 PowerTypeComp;
|
||||
int8 PowerTypeValue;
|
||||
uint32 ClassMask;
|
||||
int32 ClassMask;
|
||||
uint32 LanguageID;
|
||||
uint32 MinFactionID[3];
|
||||
uint32 SpellID[4];
|
||||
@@ -1944,7 +1944,7 @@ struct PlayerConditionEntry
|
||||
uint32 PhaseGroupID;
|
||||
uint32 MinAvgItemLevel;
|
||||
uint32 MaxAvgItemLevel;
|
||||
uint32 Unknown700[2];
|
||||
int32 Unknown700[2];
|
||||
};
|
||||
|
||||
struct PowerDisplayEntry
|
||||
@@ -1974,7 +1974,7 @@ struct PowerTypeEntry
|
||||
uint8 UIModifier;
|
||||
};
|
||||
|
||||
struct PvPDifficultyEntry
|
||||
struct PvpDifficultyEntry
|
||||
{
|
||||
uint32 ID;
|
||||
uint16 MapID;
|
||||
@@ -2092,7 +2092,7 @@ struct SkillLineAbilityEntry
|
||||
uint16 TradeSkillCategoryID;
|
||||
uint8 AcquireMethod;
|
||||
uint8 NumSkillUps;
|
||||
uint32 ClassMask;
|
||||
int32 ClassMask;
|
||||
};
|
||||
|
||||
struct SkillRaceClassInfoEntry
|
||||
@@ -2219,7 +2219,7 @@ struct SpellCategoryEntry
|
||||
uint8 Flags;
|
||||
uint8 UsesPerWeek;
|
||||
uint8 MaxCharges;
|
||||
uint32 Unk703;
|
||||
uint32 ChargeCategoryType;
|
||||
};
|
||||
|
||||
struct SpellClassOptionsEntry
|
||||
@@ -2264,9 +2264,9 @@ struct SpellEffectEntry
|
||||
uint32 Effect;
|
||||
uint32 EffectAura;
|
||||
uint32 EffectAuraPeriod;
|
||||
uint32 EffectBasePoints;
|
||||
int32 EffectBasePoints;
|
||||
uint32 EffectChainTargets;
|
||||
uint32 EffectDieSides;
|
||||
int32 EffectDieSides;
|
||||
uint32 EffectItemType;
|
||||
uint32 EffectMechanic;
|
||||
int32 EffectMiscValue;
|
||||
@@ -2411,8 +2411,8 @@ struct SpellPowerEntry
|
||||
uint8 PowerIndex;
|
||||
uint8 PowerType;
|
||||
uint32 ID;
|
||||
uint32 ManaCostPerLevel;
|
||||
uint32 ManaCostPerSecond;
|
||||
int32 ManaCostPerLevel;
|
||||
int32 ManaCostPerSecond;
|
||||
uint32 ManaCostAdditional; // Spell uses [ManaCost, ManaCost+ManaCostAdditional] power - affects tooltip parsing as multiplier on SpellEffectEntry::EffectPointsPerResource
|
||||
// only SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE, SPELL_EFFECT_WEAPON_DAMAGE, SPELL_EFFECT_NORMALIZED_WEAPON_DMG
|
||||
uint32 PowerDisplayID;
|
||||
@@ -2549,7 +2549,7 @@ struct SummonPropertiesEntry
|
||||
uint32 Flags;
|
||||
uint32 Category;
|
||||
uint32 Faction;
|
||||
uint32 Type;
|
||||
int32 Type;
|
||||
int32 Slot;
|
||||
};
|
||||
|
||||
@@ -2835,12 +2835,12 @@ struct WorldMapOverlayEntry
|
||||
uint16 TextureHeight;
|
||||
uint32 MapAreaID; // idx in WorldMapArea.dbc
|
||||
uint32 AreaID[MAX_WORLD_MAP_OVERLAY_AREA_IDX];
|
||||
uint32 OffsetX;
|
||||
uint32 OffsetY;
|
||||
uint32 HitRectTop;
|
||||
uint32 HitRectLeft;
|
||||
uint32 HitRectBottom;
|
||||
uint32 HitRectRight;
|
||||
int32 OffsetX;
|
||||
int32 OffsetY;
|
||||
int32 HitRectTop;
|
||||
int32 HitRectLeft;
|
||||
int32 HitRectBottom;
|
||||
int32 HitRectRight;
|
||||
uint32 PlayerConditionID;
|
||||
uint32 Flags;
|
||||
};
|
||||
|
||||
@@ -1783,7 +1783,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
if (!reference)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bgOrTemplate->GetMapId(), reference->getLevel());
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bgOrTemplate->GetMapId(), reference->getLevel());
|
||||
if (!bracketEntry)
|
||||
return ERR_BATTLEGROUND_JOIN_FAILED;
|
||||
|
||||
@@ -1807,7 +1807,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
return ERR_BATTLEGROUND_JOIN_TIMED_OUT;
|
||||
}
|
||||
// not in the same battleground level braket, don't let join
|
||||
PvPDifficultyEntry const* memberBracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel());
|
||||
PvpDifficultyEntry const* memberBracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bracketEntry->MapID, member->getLevel());
|
||||
if (memberBracketEntry != bracketEntry)
|
||||
return ERR_BATTLEGROUND_JOIN_RANGE_INDEX;
|
||||
// don't let join rated matches if the arena team id doesn't match
|
||||
|
||||
@@ -95,7 +95,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
return;
|
||||
|
||||
// expected bracket entry
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
@@ -314,7 +314,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
bgTypeId = bg->GetTypeID();
|
||||
|
||||
// expected bracket entry
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
@@ -475,7 +475,7 @@ void WorldSession::HandleRequestBattlefieldStatusOpcode(WorldPackets::Battlegrou
|
||||
continue;
|
||||
|
||||
// expected bracket entry
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
if (!bracketEntry)
|
||||
continue;
|
||||
|
||||
@@ -511,7 +511,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPackets::Battleground::Battl
|
||||
|
||||
BattlegroundTypeId bgTypeId = bg->GetTypeID();
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, arenatype);
|
||||
PvPDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
PvpDifficultyEntry const* bracketEntry = DB2Manager::GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
|
||||
if (!bracketEntry)
|
||||
return;
|
||||
|
||||
|
||||
@@ -20,11 +20,20 @@
|
||||
#include "DB2Meta.h"
|
||||
#include "Utilities/ByteConverter.h"
|
||||
|
||||
DB2LoadInfo::DB2LoadInfo() : Fields(nullptr), FieldCount(0), Meta(nullptr), Statement(MAX_HOTFIXDATABASE_STATEMENTS)
|
||||
{
|
||||
}
|
||||
|
||||
DB2LoadInfo::DB2LoadInfo(DB2FieldMeta const* fields, std::size_t fieldCount, DB2Meta const* meta, HotfixDatabaseStatements statement)
|
||||
: Fields(fields), FieldCount(fieldCount), Meta(meta), Statement(statement)
|
||||
{
|
||||
}
|
||||
|
||||
class DB2FileLoaderImpl
|
||||
{
|
||||
public:
|
||||
virtual ~DB2FileLoaderImpl() { }
|
||||
virtual bool Load(char const* filename, FILE* file, DB2Meta const* meta, DB2Header const* header) = 0;
|
||||
virtual bool Load(char const* filename, FILE* file, DB2LoadInfo const& loadInfo, DB2Header const* header) = 0;
|
||||
virtual char* AutoProduceData(uint32& count, char**& indexTable, std::vector<char*>& stringPool) = 0;
|
||||
virtual char* AutoProduceStrings(char* dataTable, uint32 locale) = 0;
|
||||
virtual void AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable) = 0;
|
||||
@@ -36,7 +45,7 @@ public:
|
||||
DB2FileLoaderRegularImpl();
|
||||
~DB2FileLoaderRegularImpl();
|
||||
|
||||
bool Load(char const* filename, FILE* file, DB2Meta const* meta, DB2Header const* header) override;
|
||||
bool Load(char const* filename, FILE* file, DB2LoadInfo const& loadInfo, DB2Header const* header) override;
|
||||
char* AutoProduceData(uint32& count, char**& indexTable, std::vector<char*>& stringPool) override;
|
||||
char* AutoProduceStrings(char* dataTable, uint32 locale) override;
|
||||
void AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable) override;
|
||||
@@ -46,7 +55,7 @@ private:
|
||||
{
|
||||
public:
|
||||
float getFloat(uint32 field, uint32 arrayIndex) const;
|
||||
uint32 getUInt(uint32 field, uint32 arrayIndex) const;
|
||||
uint32 getUInt(uint32 field, uint32 arrayIndex, bool isSigned) const;
|
||||
uint8 getUInt8(uint32 field, uint32 arrayIndex) const;
|
||||
uint16 getUInt16(uint32 field, uint32 arrayIndex) const;
|
||||
char const* getString(uint32 field, uint32 arrayIndex) const;
|
||||
@@ -54,7 +63,7 @@ private:
|
||||
private:
|
||||
uint16 GetOffset(uint32 field) const;
|
||||
uint16 GetByteSize(uint32 field) const;
|
||||
uint32 GetVarInt(uint32 field, uint16 size, uint32 arrayIndex) const;
|
||||
uint32 GetVarInt(uint32 field, uint32 arrayIndex, bool isSigned) const;
|
||||
|
||||
Record(DB2FileLoaderRegularImpl &file_, unsigned char *offset_);
|
||||
unsigned char *offset;
|
||||
@@ -75,8 +84,8 @@ private:
|
||||
#pragma pack(pop)
|
||||
|
||||
char const* fileName;
|
||||
DB2Meta const* meta;
|
||||
DB2Header const* header;
|
||||
DB2LoadInfo _loadInfo;
|
||||
DB2Header const* _header;
|
||||
|
||||
unsigned char* data;
|
||||
unsigned char* stringTable;
|
||||
@@ -92,7 +101,7 @@ public:
|
||||
DB2FileLoaderSparseImpl();
|
||||
~DB2FileLoaderSparseImpl();
|
||||
|
||||
bool Load(char const* filename, FILE* file, DB2Meta const* meta, DB2Header const* header) override;
|
||||
bool Load(char const* filename, FILE* file, DB2LoadInfo const& loadInfo, DB2Header const* header) override;
|
||||
char* AutoProduceData(uint32& records, char**& indexTable, std::vector<char*>& stringPool) override;
|
||||
char* AutoProduceStrings(char* dataTable, uint32 locale) override;
|
||||
void AutoProduceRecordCopies(uint32 /*records*/, char** /*indexTable*/, char* /*dataTable*/) override { }
|
||||
@@ -112,8 +121,8 @@ private:
|
||||
#pragma pack(pop)
|
||||
|
||||
char const* fileName;
|
||||
DB2Meta const* meta;
|
||||
DB2Header const* header;
|
||||
DB2LoadInfo _loadInfo;
|
||||
DB2Header const* _header;
|
||||
FieldEntry* fields;
|
||||
|
||||
uint32 dataStart;
|
||||
@@ -123,28 +132,28 @@ private:
|
||||
|
||||
float DB2FileLoaderRegularImpl::Record::getFloat(uint32 field, uint32 arrayIndex) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
float val = *reinterpret_cast<float*>(offset + GetOffset(field) + arrayIndex * sizeof(float));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
uint32 DB2FileLoaderRegularImpl::Record::getUInt(uint32 field, uint32 arrayIndex) const
|
||||
uint32 DB2FileLoaderRegularImpl::Record::getUInt(uint32 field, uint32 arrayIndex, bool isSigned) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
return GetVarInt(field, GetByteSize(field), arrayIndex);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
return GetVarInt(field, arrayIndex, isSigned);
|
||||
}
|
||||
|
||||
uint8 DB2FileLoaderRegularImpl::Record::getUInt8(uint32 field, uint32 arrayIndex) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
ASSERT(GetByteSize(field) == 1);
|
||||
return *reinterpret_cast<uint8*>(offset + GetOffset(field) + arrayIndex * sizeof(uint8));
|
||||
}
|
||||
|
||||
uint16 DB2FileLoaderRegularImpl::Record::getUInt16(uint32 field, uint32 arrayIndex) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
ASSERT(GetByteSize(field) == 2);
|
||||
uint16 val = *reinterpret_cast<uint16*>(offset + GetOffset(field) + arrayIndex * sizeof(uint16));
|
||||
EndianConvert(val);
|
||||
@@ -153,73 +162,45 @@ uint16 DB2FileLoaderRegularImpl::Record::getUInt16(uint32 field, uint32 arrayInd
|
||||
|
||||
char const* DB2FileLoaderRegularImpl::Record::getString(uint32 field, uint32 arrayIndex) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
uint32 stringOffset = *reinterpret_cast<uint32*>(offset + GetOffset(field) + arrayIndex * sizeof(uint32));
|
||||
EndianConvert(stringOffset);
|
||||
ASSERT(stringOffset < file.header->StringTableSize);
|
||||
ASSERT(stringOffset < file._header->StringTableSize);
|
||||
return reinterpret_cast<char*>(file.stringTable + stringOffset);
|
||||
}
|
||||
|
||||
uint16 DB2FileLoaderRegularImpl::Record::GetOffset(uint32 field) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
return file.fields[field].Offset;
|
||||
}
|
||||
|
||||
uint16 DB2FileLoaderRegularImpl::Record::GetByteSize(uint32 field) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
return 4 - file.fields[field].UnusedBits / 8;
|
||||
}
|
||||
|
||||
uint32 DB2FileLoaderRegularImpl::Record::GetVarInt(uint32 field, uint16 size, uint32 arrayIndex) const
|
||||
uint32 DB2FileLoaderRegularImpl::Record::GetVarInt(uint32 field, uint32 arrayIndex, bool isSigned) const
|
||||
{
|
||||
ASSERT(field < file.header->FieldCount);
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
return *reinterpret_cast<uint8*>(offset + GetOffset(field) + arrayIndex * sizeof(uint8));
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
uint16 val = *reinterpret_cast<uint16*>(offset + GetOffset(field) + arrayIndex * sizeof(uint16));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
#pragma pack(push, 1)
|
||||
struct dbcint24 { uint8 v[3]; };
|
||||
#pragma pack(pop)
|
||||
dbcint24 val = *reinterpret_cast<dbcint24*>(offset + GetOffset(field) + arrayIndex * sizeof(dbcint24));
|
||||
EndianConvert(val);
|
||||
return uint32(val.v[0]) | (uint32(val.v[1]) << 8) | (uint32(val.v[2]) << 16);
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
uint32 val = *reinterpret_cast<uint32*>(offset + GetOffset(field) + arrayIndex * sizeof(uint32));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ASSERT(field < file._header->FieldCount);
|
||||
uint32 val = *reinterpret_cast<uint32*>(offset + GetOffset(field) + arrayIndex * sizeof(uint32));
|
||||
EndianConvert(val);
|
||||
if (isSigned)
|
||||
return int32(val) << file.fields[field].UnusedBits >> file.fields[field].UnusedBits;
|
||||
|
||||
ASSERT(false, "GetByteSize(field) < 4");
|
||||
return 0;
|
||||
return val << file.fields[field].UnusedBits >> file.fields[field].UnusedBits;
|
||||
}
|
||||
|
||||
DB2FileLoaderRegularImpl::Record::Record(DB2FileLoaderRegularImpl &file_, unsigned char *offset_) : offset(offset_), file(file_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DB2FileLoaderRegularImpl::DB2FileLoaderRegularImpl()
|
||||
{
|
||||
fileName = nullptr;
|
||||
meta = nullptr;
|
||||
header = nullptr;
|
||||
memset(&_loadInfo, 0, sizeof(_loadInfo));
|
||||
_header = nullptr;
|
||||
data = nullptr;
|
||||
stringTable = nullptr;
|
||||
idTable = nullptr;
|
||||
@@ -228,18 +209,18 @@ DB2FileLoaderRegularImpl::DB2FileLoaderRegularImpl()
|
||||
fields = nullptr;
|
||||
}
|
||||
|
||||
bool DB2FileLoaderRegularImpl::Load(char const* filename, FILE* file, DB2Meta const* meta_, DB2Header const* header_)
|
||||
bool DB2FileLoaderRegularImpl::Load(char const* filename, FILE* file, DB2LoadInfo const& loadInfo, DB2Header const* header)
|
||||
{
|
||||
meta = meta_;
|
||||
header = header_;
|
||||
ASSERT(meta->IndexField == -1 || meta->IndexField == int32(header->IndexField));
|
||||
_loadInfo = loadInfo;
|
||||
_header = header;
|
||||
ASSERT(loadInfo.Meta->IndexField == -1 || loadInfo.Meta->IndexField == int32(header->IndexField));
|
||||
|
||||
fileName = filename;
|
||||
fields = new FieldEntry[header->FieldCount];
|
||||
if (fread(fields, header->FieldCount * sizeof(FieldEntry), 1, file) != 1)
|
||||
return false;
|
||||
|
||||
if (!meta->HasIndexFieldInData())
|
||||
if (!loadInfo.Meta->HasIndexFieldInData())
|
||||
idTableSize = header->RecordCount * sizeof(uint32);
|
||||
|
||||
data = new unsigned char[header->RecordSize * header->RecordCount + header->StringTableSize];
|
||||
@@ -276,34 +257,34 @@ DB2FileLoaderRegularImpl::~DB2FileLoaderRegularImpl()
|
||||
DB2FileLoaderRegularImpl::Record DB2FileLoaderRegularImpl::getRecord(size_t id)
|
||||
{
|
||||
assert(data);
|
||||
return Record(*this, data + id * header->RecordSize);
|
||||
return Record(*this, data + id * _header->RecordSize);
|
||||
}
|
||||
|
||||
static char const* const nullStr = "";
|
||||
|
||||
char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTable, std::vector<char*>& stringPool)
|
||||
{
|
||||
if (meta->FieldCount != header->FieldCount)
|
||||
if (_loadInfo.Meta->FieldCount != _header->FieldCount)
|
||||
return NULL;
|
||||
|
||||
//get struct size and index pos
|
||||
uint32 indexField = meta->GetIndexField();
|
||||
uint32 recordsize = meta->GetRecordSize();
|
||||
uint32 indexField = _loadInfo.Meta->GetIndexField();
|
||||
uint32 recordsize = _loadInfo.Meta->GetRecordSize();
|
||||
|
||||
uint32 maxi = 0;
|
||||
//find max index
|
||||
if (!idTableSize)
|
||||
{
|
||||
for (uint32 y = 0; y < header->RecordCount; ++y)
|
||||
for (uint32 y = 0; y < _header->RecordCount; ++y)
|
||||
{
|
||||
uint32 ind = getRecord(y).getUInt(indexField, 0);
|
||||
uint32 ind = getRecord(y).getUInt(indexField, 0, false);
|
||||
if (ind > maxi)
|
||||
maxi = ind;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (uint32 y = 0; y < header->RecordCount; ++y)
|
||||
for (uint32 y = 0; y < _header->RecordCount; ++y)
|
||||
{
|
||||
uint32 ind = ((uint32*)idTable)[y];
|
||||
if (ind > maxi)
|
||||
@@ -311,7 +292,7 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32 y = 0; y < header->CopyTableSize; y += 8)
|
||||
for (uint32 y = 0; y < _header->CopyTableSize; y += 8)
|
||||
{
|
||||
uint32 ind = *((uint32*)(copyTable + y));
|
||||
if (ind > maxi)
|
||||
@@ -325,18 +306,18 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
indexTable = new index_entry_t[maxi];
|
||||
memset(indexTable, 0, maxi * sizeof(index_entry_t));
|
||||
|
||||
char* dataTable = new char[(header->RecordCount + (header->CopyTableSize / 8)) * recordsize];
|
||||
char* dataTable = new char[(_header->RecordCount + (_header->CopyTableSize / 8)) * recordsize];
|
||||
|
||||
// we store flat holders pool as single memory block
|
||||
std::size_t stringFields = meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = meta->GetStringFieldCount(true);
|
||||
std::size_t stringFields = _loadInfo.Meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = _loadInfo.Meta->GetStringFieldCount(true);
|
||||
|
||||
// each string field at load have array of string for each locale
|
||||
std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*);
|
||||
char* stringHoldersPool = nullptr;
|
||||
if (stringFields)
|
||||
{
|
||||
std::size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * header->RecordCount;
|
||||
std::size_t stringHoldersPoolSize = stringHoldersRecordPoolSize * _header->RecordCount;
|
||||
|
||||
stringHoldersPool = new char[stringHoldersPoolSize];
|
||||
stringPool.push_back(stringHoldersPool);
|
||||
@@ -348,33 +329,35 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
|
||||
uint32 offset = 0;
|
||||
|
||||
for (uint32 y = 0; y < header->RecordCount; y++)
|
||||
for (uint32 y = 0; y < _header->RecordCount; y++)
|
||||
{
|
||||
Record rec = getRecord(y);
|
||||
uint32 indexVal = meta->HasIndexFieldInData() ? rec.getUInt(indexField, 0) : ((uint32*)idTable)[y];
|
||||
uint32 indexVal = _loadInfo.Meta->HasIndexFieldInData() ? rec.getUInt(indexField, 0, _loadInfo.Fields[0].IsSigned) : ((uint32*)idTable)[y];
|
||||
|
||||
indexTable[indexVal] = &dataTable[offset];
|
||||
|
||||
if (!meta->HasIndexFieldInData())
|
||||
uint32 fieldIndex = 0;
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
{
|
||||
*((uint32*)(&dataTable[offset])) = indexVal;
|
||||
offset += 4;
|
||||
++fieldIndex;
|
||||
}
|
||||
|
||||
uint32 stringFieldOffset = 0;
|
||||
|
||||
for (uint32 x = 0; x < header->FieldCount; ++x)
|
||||
for (uint32 x = 0; x < _header->FieldCount; ++x)
|
||||
{
|
||||
for (uint32 z = 0; z < meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
*((float*)(&dataTable[offset])) = rec.getFloat(x, z);
|
||||
offset += 4;
|
||||
break;
|
||||
case FT_INT:
|
||||
*((uint32*)(&dataTable[offset])) = rec.getUInt(x, z);
|
||||
*((uint32*)(&dataTable[offset])) = rec.getUInt(x, z, _loadInfo.Fields[fieldIndex].IsSigned);
|
||||
offset += 4;
|
||||
break;
|
||||
case FT_BYTE:
|
||||
@@ -391,7 +374,7 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
// init db2 string field slots by pointers to string holders
|
||||
char const*** slot = (char const***)(&dataTable[offset]);
|
||||
*slot = (char const**)(&stringHoldersPool[stringHoldersRecordPoolSize * y + stringFieldOffset]);
|
||||
if (meta->Types[x] == FT_STRING)
|
||||
if (_loadInfo.Meta->Types[x] == FT_STRING)
|
||||
stringFieldOffset += sizeof(LocalizedString);
|
||||
else
|
||||
stringFieldOffset += sizeof(char*);
|
||||
@@ -400,9 +383,10 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName);
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], fileName);
|
||||
break;
|
||||
}
|
||||
++fieldIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -412,16 +396,16 @@ char* DB2FileLoaderRegularImpl::AutoProduceData(uint32& records, char**& indexTa
|
||||
|
||||
char* DB2FileLoaderRegularImpl::AutoProduceStrings(char* dataTable, uint32 locale)
|
||||
{
|
||||
if (meta->FieldCount != header->FieldCount)
|
||||
if (_loadInfo.Meta->FieldCount != _header->FieldCount)
|
||||
return nullptr;
|
||||
|
||||
if (!(header->Locale & (1 << locale)))
|
||||
if (!(_header->Locale & (1 << locale)))
|
||||
{
|
||||
char const* sep = "";
|
||||
std::ostringstream str;
|
||||
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
|
||||
{
|
||||
if (header->Locale & (1 << i))
|
||||
if (_header->Locale & (1 << i))
|
||||
{
|
||||
str << sep << localeNames[i];
|
||||
sep = ", ";
|
||||
@@ -432,21 +416,21 @@ char* DB2FileLoaderRegularImpl::AutoProduceStrings(char* dataTable, uint32 local
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
char* stringPool = new char[header->StringTableSize];
|
||||
memcpy(stringPool, stringTable, header->StringTableSize);
|
||||
char* stringPool = new char[_header->StringTableSize];
|
||||
memcpy(stringPool, stringTable, _header->StringTableSize);
|
||||
|
||||
uint32 offset = 0;
|
||||
|
||||
for (uint32 y = 0; y < header->RecordCount; y++)
|
||||
for (uint32 y = 0; y < _header->RecordCount; y++)
|
||||
{
|
||||
if (!meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
offset += 4;
|
||||
|
||||
for (uint32 x = 0; x < header->FieldCount; ++x)
|
||||
for (uint32 x = 0; x < _header->FieldCount; ++x)
|
||||
{
|
||||
for (uint32 z = 0; z < meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
case FT_INT:
|
||||
@@ -480,7 +464,7 @@ char* DB2FileLoaderRegularImpl::AutoProduceStrings(char* dataTable, uint32 local
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName);
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], fileName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -492,10 +476,10 @@ char* DB2FileLoaderRegularImpl::AutoProduceStrings(char* dataTable, uint32 local
|
||||
|
||||
void DB2FileLoaderRegularImpl::AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable)
|
||||
{
|
||||
uint32 recordsize = meta->GetRecordSize();
|
||||
uint32 offset = header->RecordCount * recordsize;
|
||||
uint32 recordsize = _loadInfo.Meta->GetRecordSize();
|
||||
uint32 offset = _header->RecordCount * recordsize;
|
||||
uint32* copyIds = (uint32*)copyTable;
|
||||
for (uint32 c = 0; c < header->CopyTableSize / 4; c += 2)
|
||||
for (uint32 c = 0; c < _header->CopyTableSize / 4; c += 2)
|
||||
{
|
||||
uint32 to = copyIds[c];
|
||||
uint32 from = copyIds[c + 1];
|
||||
@@ -505,8 +489,8 @@ void DB2FileLoaderRegularImpl::AutoProduceRecordCopies(uint32 records, char** in
|
||||
indexTable[to] = &dataTable[offset];
|
||||
memcpy(indexTable[to], indexTable[from], recordsize);
|
||||
|
||||
if (meta->HasIndexFieldInData())
|
||||
*((uint32*)(&dataTable[offset + fields[meta->GetIndexField()].Offset])) = to;
|
||||
if (_loadInfo.Meta->HasIndexFieldInData())
|
||||
*((uint32*)(&dataTable[offset + fields[_loadInfo.Meta->GetIndexField()].Offset])) = to;
|
||||
else
|
||||
*((uint32*)(&dataTable[offset])) = to;
|
||||
|
||||
@@ -518,18 +502,18 @@ void DB2FileLoaderRegularImpl::AutoProduceRecordCopies(uint32 records, char** in
|
||||
DB2FileLoaderSparseImpl::DB2FileLoaderSparseImpl()
|
||||
{
|
||||
fileName = nullptr;
|
||||
meta = nullptr;
|
||||
header = nullptr;
|
||||
memset(&_loadInfo, 0, sizeof(_loadInfo));
|
||||
_header = nullptr;
|
||||
fields = nullptr;
|
||||
dataStart = 0;
|
||||
data = nullptr;
|
||||
offsets = nullptr;
|
||||
}
|
||||
|
||||
bool DB2FileLoaderSparseImpl::Load(char const* filename, FILE* file, DB2Meta const* meta_, DB2Header const* header_)
|
||||
bool DB2FileLoaderSparseImpl::Load(char const* filename, FILE* file, DB2LoadInfo const& loadInfo, DB2Header const* header)
|
||||
{
|
||||
meta = meta_;
|
||||
header = header_;
|
||||
_loadInfo = loadInfo;
|
||||
_header = header;
|
||||
fileName = filename;
|
||||
|
||||
fields = new FieldEntry[header->FieldCount];
|
||||
@@ -559,13 +543,13 @@ DB2FileLoaderSparseImpl::~DB2FileLoaderSparseImpl()
|
||||
|
||||
char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable, std::vector<char*>& stringPool)
|
||||
{
|
||||
if (meta->FieldCount != header->FieldCount)
|
||||
if (_loadInfo.Meta->FieldCount != _header->FieldCount)
|
||||
return NULL;
|
||||
|
||||
//get struct size and index pos
|
||||
uint32 recordsize = meta->GetRecordSize();
|
||||
uint32 recordsize = _loadInfo.Meta->GetRecordSize();
|
||||
|
||||
uint32 offsetCount = header->MaxId - header->MinId + 1;
|
||||
uint32 offsetCount = _header->MaxId - _header->MinId + 1;
|
||||
uint32 records = 0;
|
||||
uint32 expandedDataSize = 0;
|
||||
for (uint32 i = 0; i < offsetCount; ++i)
|
||||
@@ -579,15 +563,15 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
|
||||
using index_entry_t = char*;
|
||||
|
||||
maxId = header->MaxId + 1;
|
||||
maxId = _header->MaxId + 1;
|
||||
indexTable = new index_entry_t[maxId];
|
||||
memset(indexTable, 0, maxId * sizeof(index_entry_t));
|
||||
|
||||
char* dataTable = new char[records * recordsize];
|
||||
|
||||
// we store flat holders pool as single memory block
|
||||
std::size_t stringFields = meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = meta->GetStringFieldCount(true);
|
||||
std::size_t stringFields = _loadInfo.Meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = _loadInfo.Meta->GetStringFieldCount(true);
|
||||
|
||||
// each string field at load have array of string for each locale
|
||||
std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*);
|
||||
@@ -600,8 +584,8 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
for (std::size_t i = 0; i < stringHoldersPoolSize / sizeof(char*); ++i)
|
||||
((char const**)stringHoldersPool)[i] = nullStr;
|
||||
|
||||
char* stringTable = new char[expandedDataSize - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))];
|
||||
memset(stringTable, 0, expandedDataSize - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*)));
|
||||
char* stringTable = new char[expandedDataSize - records * ((recordsize - (!_loadInfo.Meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))];
|
||||
memset(stringTable, 0, expandedDataSize - records * ((recordsize - (!_loadInfo.Meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*)));
|
||||
stringPool.push_back(stringTable);
|
||||
char* stringPtr = stringTable;
|
||||
|
||||
@@ -612,23 +596,23 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
if (!offsets[y].FileOffset || !offsets[y].RecordSize)
|
||||
continue;
|
||||
|
||||
indexTable[y + header->MinId] = &dataTable[offset];
|
||||
ASSERT(indexTable[y + header->MinId]);
|
||||
indexTable[y + _header->MinId] = &dataTable[offset];
|
||||
ASSERT(indexTable[y + _header->MinId]);
|
||||
std::size_t fieldOffset = 0;
|
||||
uint32 stringFieldOffset = 0;
|
||||
|
||||
if (!meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
{
|
||||
*((uint32*)(&dataTable[offset])) = y + header->MinId;
|
||||
*((uint32*)(&dataTable[offset])) = y + _header->MinId;
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
for (uint32 x = 0; x < header->FieldCount; ++x)
|
||||
for (uint32 x = 0; x < _header->FieldCount; ++x)
|
||||
{
|
||||
uint16 fieldBytes = 4 - fields[x].UnusedBits / 8;
|
||||
for (uint32 z = 0; z < meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
{
|
||||
@@ -700,7 +684,7 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
LocalizedString** slot = (LocalizedString**)(&dataTable[offset]);
|
||||
*slot = (LocalizedString*)(&stringHoldersPool[stringHoldersRecordPoolSize * recordNum + stringFieldOffset]);
|
||||
for (uint32 locale = 0; locale < TOTAL_LOCALES; ++locale)
|
||||
if (header->Locale & (1 << locale))
|
||||
if (_header->Locale & (1 << locale))
|
||||
(*slot)->Str[locale] = stringPtr;
|
||||
strcpy(stringPtr, (char*)&data[offsets[y].FileOffset - dataStart + fieldOffset]);
|
||||
fieldOffset += strlen(stringPtr) + 1;
|
||||
@@ -722,7 +706,7 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName);
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], fileName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -736,16 +720,16 @@ char* DB2FileLoaderSparseImpl::AutoProduceData(uint32& maxId, char**& indexTable
|
||||
|
||||
char* DB2FileLoaderSparseImpl::AutoProduceStrings(char* dataTable, uint32 locale)
|
||||
{
|
||||
if (meta->FieldCount != header->FieldCount)
|
||||
if (_loadInfo.Meta->FieldCount != _header->FieldCount)
|
||||
return nullptr;
|
||||
|
||||
if (!(header->Locale & (1 << locale)))
|
||||
if (!(_header->Locale & (1 << locale)))
|
||||
{
|
||||
char const* sep = "";
|
||||
std::ostringstream str;
|
||||
for (uint32 i = 0; i < TOTAL_LOCALES; ++i)
|
||||
{
|
||||
if (header->Locale & (1 << i))
|
||||
if (_header->Locale & (1 << i))
|
||||
{
|
||||
str << sep << localeNames[i];
|
||||
sep = ", ";
|
||||
@@ -756,16 +740,16 @@ char* DB2FileLoaderSparseImpl::AutoProduceStrings(char* dataTable, uint32 locale
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32 offsetCount = header->MaxId - header->MinId + 1;
|
||||
uint32 offsetCount = _header->MaxId - _header->MinId + 1;
|
||||
uint32 records = 0;
|
||||
for (uint32 i = 0; i < offsetCount; ++i)
|
||||
if (offsets[i].FileOffset && offsets[i].RecordSize)
|
||||
++records;
|
||||
|
||||
uint32 recordsize = meta->GetRecordSize();
|
||||
std::size_t stringFields = meta->GetStringFieldCount(true);
|
||||
char* stringTable = new char[header->StringTableSize - dataStart - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))];
|
||||
memset(stringTable, 0, header->StringTableSize - dataStart - records * ((recordsize - (!meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*)));
|
||||
uint32 recordsize = _loadInfo.Meta->GetRecordSize();
|
||||
std::size_t stringFields = _loadInfo.Meta->GetStringFieldCount(true);
|
||||
char* stringTable = new char[_header->StringTableSize - dataStart - records * ((recordsize - (!_loadInfo.Meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*))];
|
||||
memset(stringTable, 0, _header->StringTableSize - dataStart - records * ((recordsize - (!_loadInfo.Meta->HasIndexFieldInData() ? 4 : 0)) - stringFields * sizeof(char*)));
|
||||
char* stringPtr = stringTable;
|
||||
|
||||
uint32 offset = 0;
|
||||
@@ -775,15 +759,15 @@ char* DB2FileLoaderSparseImpl::AutoProduceStrings(char* dataTable, uint32 locale
|
||||
if (!offsets[y].FileOffset || !offsets[y].RecordSize)
|
||||
continue;
|
||||
|
||||
if (!meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
offset += 4;
|
||||
|
||||
std::size_t fieldOffset = 0;
|
||||
for (uint32 x = 0; x < header->FieldCount; ++x)
|
||||
for (uint32 x = 0; x < _header->FieldCount; ++x)
|
||||
{
|
||||
for (uint32 z = 0; z < meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
offset += 4;
|
||||
@@ -818,7 +802,7 @@ char* DB2FileLoaderSparseImpl::AutoProduceStrings(char* dataTable, uint32 locale
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", meta->Types[x], fileName);
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], fileName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -828,23 +812,23 @@ char* DB2FileLoaderSparseImpl::AutoProduceStrings(char* dataTable, uint32 locale
|
||||
return stringTable;
|
||||
}
|
||||
|
||||
char* DB2DatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector<char*>& stringPool)
|
||||
char* DB2DatabaseLoader::Load(uint32& records, char**& indexTable, char*& stringHolders, std::vector<char*>& stringPool)
|
||||
{
|
||||
// Even though this query is executed only once, prepared statement is used to send data from mysql server in binary format
|
||||
PreparedQueryResult result = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(preparedStatement));
|
||||
PreparedQueryResult result = HotfixDatabase.Query(HotfixDatabase.GetPreparedStatement(_loadInfo.Statement));
|
||||
if (!result)
|
||||
return nullptr;
|
||||
|
||||
if (_meta->GetDbFieldCount() != result->GetFieldCount())
|
||||
if (_loadInfo.Meta->GetDbFieldCount() != result->GetFieldCount())
|
||||
return nullptr;
|
||||
|
||||
// get struct size and index pos
|
||||
uint32 indexField = _meta->GetDbIndexField();
|
||||
uint32 recordSize = _meta->GetRecordSize();
|
||||
uint32 indexField = _loadInfo.Meta->GetDbIndexField();
|
||||
uint32 recordSize = _loadInfo.Meta->GetRecordSize();
|
||||
|
||||
// we store flat holders pool as single memory block
|
||||
std::size_t stringFields = _meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = _meta->GetStringFieldCount(true);
|
||||
std::size_t stringFields = _loadInfo.Meta->GetStringFieldCount(false);
|
||||
std::size_t localizedStringFields = _loadInfo.Meta->GetStringFieldCount(true);
|
||||
|
||||
// each string field at load have array of string for each locale
|
||||
std::size_t stringHoldersRecordPoolSize = localizedStringFields * sizeof(LocalizedString) + (stringFields - localizedStringFields) * sizeof(char*);
|
||||
@@ -898,18 +882,18 @@ char* DB2DatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, uint32
|
||||
}
|
||||
|
||||
uint32 f = 0;
|
||||
if (!_meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
{
|
||||
*((uint32*)(&dataValue[offset])) = indexValue;
|
||||
offset += 4;
|
||||
++f;
|
||||
}
|
||||
|
||||
for (uint32 x = 0; x < _meta->FieldCount; ++x)
|
||||
for (uint32 x = 0; x < _loadInfo.Meta->FieldCount; ++x)
|
||||
{
|
||||
for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (_meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
*((float*)(&dataValue[offset])) = fields[f].GetFloat();
|
||||
@@ -956,7 +940,7 @@ char* DB2DatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, uint32
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str());
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], _storageName.c_str());
|
||||
break;
|
||||
}
|
||||
++f;
|
||||
@@ -990,20 +974,20 @@ char* DB2DatabaseLoader::Load(HotfixDatabaseStatements preparedStatement, uint32
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
void DB2DatabaseLoader::LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool)
|
||||
void DB2DatabaseLoader::LoadStrings(uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool)
|
||||
{
|
||||
PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(preparedStatement);
|
||||
PreparedStatement* stmt = HotfixDatabase.GetPreparedStatement(HotfixDatabaseStatements(_loadInfo.Statement + 1));
|
||||
stmt->setString(0, localeNames[locale]);
|
||||
PreparedQueryResult result = HotfixDatabase.Query(stmt);
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
std::size_t stringFields = _meta->GetStringFieldCount(true);
|
||||
std::size_t stringFields = _loadInfo.Meta->GetStringFieldCount(true);
|
||||
if (result->GetFieldCount() != stringFields + 1 /*ID*/)
|
||||
return;
|
||||
|
||||
uint32 fieldCount = _meta->FieldCount;
|
||||
uint32 recordSize = _meta->GetRecordSize();
|
||||
uint32 fieldCount = _loadInfo.Meta->FieldCount;
|
||||
uint32 recordSize = _loadInfo.Meta->GetRecordSize();
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1018,14 +1002,14 @@ void DB2DatabaseLoader::LoadStrings(HotfixDatabaseStatements preparedStatement,
|
||||
// Attempt to overwrite existing data
|
||||
if (char* dataValue = indexTable[indexValue])
|
||||
{
|
||||
if (!_meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
offset += 4;
|
||||
|
||||
for (uint32 x = 0; x < fieldCount; ++x)
|
||||
{
|
||||
for (uint32 z = 0; z < _meta->ArraySizes[x]; ++z)
|
||||
for (uint32 z = 0; z < _loadInfo.Meta->ArraySizes[x]; ++z)
|
||||
{
|
||||
switch (_meta->Types[x])
|
||||
switch (_loadInfo.Meta->Types[x])
|
||||
{
|
||||
case FT_FLOAT:
|
||||
case FT_INT:
|
||||
@@ -1053,7 +1037,7 @@ void DB2DatabaseLoader::LoadStrings(HotfixDatabaseStatements preparedStatement,
|
||||
offset += sizeof(char*);
|
||||
break;
|
||||
default:
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _meta->Types[x], _storageName.c_str());
|
||||
ASSERT(false, "Unknown format character '%c' found in %s meta", _loadInfo.Meta->Types[x], _storageName.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1102,7 +1086,7 @@ DB2FileLoader::~DB2FileLoader()
|
||||
delete _impl;
|
||||
}
|
||||
|
||||
bool DB2FileLoader::Load(char const* filename, DB2Meta const* meta)
|
||||
bool DB2FileLoader::Load(char const* filename, DB2LoadInfo const& loadInfo)
|
||||
{
|
||||
FILE* f = fopen(filename, "rb");
|
||||
if (!f)
|
||||
@@ -1170,7 +1154,7 @@ bool DB2FileLoader::Load(char const* filename, DB2Meta const* meta)
|
||||
|
||||
EndianConvert(_header.LayoutHash);
|
||||
|
||||
if (_header.LayoutHash != meta->LayoutHash)
|
||||
if (_header.LayoutHash != loadInfo.Meta->LayoutHash)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
@@ -1221,7 +1205,7 @@ bool DB2FileLoader::Load(char const* filename, DB2Meta const* meta)
|
||||
else
|
||||
_impl = new DB2FileLoaderSparseImpl();
|
||||
|
||||
bool result = _impl->Load(filename, f, meta, &_header);
|
||||
bool result = _impl->Load(filename, f, loadInfo, &_header);
|
||||
fclose(f);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
class DB2FileLoaderImpl;
|
||||
struct DB2Meta;
|
||||
struct DB2FieldMeta;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct DB2Header
|
||||
@@ -43,13 +44,24 @@ struct DB2Header
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct TC_SHARED_API DB2LoadInfo
|
||||
{
|
||||
DB2LoadInfo();
|
||||
DB2LoadInfo(DB2FieldMeta const* fields, std::size_t fieldCount, DB2Meta const* meta, HotfixDatabaseStatements statement);
|
||||
|
||||
DB2FieldMeta const* Fields;
|
||||
std::size_t FieldCount;
|
||||
DB2Meta const* Meta;
|
||||
HotfixDatabaseStatements Statement;
|
||||
};
|
||||
|
||||
class TC_SHARED_API DB2FileLoader
|
||||
{
|
||||
public:
|
||||
DB2FileLoader();
|
||||
~DB2FileLoader();
|
||||
|
||||
bool Load(char const* filename, DB2Meta const* meta);
|
||||
bool Load(char const* filename, DB2LoadInfo const& loadInfo);
|
||||
char* AutoProduceData(uint32& count, char**& indexTable, std::vector<char*>& stringPool);
|
||||
char* AutoProduceStrings(char* dataTable, uint32 locale);
|
||||
void AutoProduceRecordCopies(uint32 records, char** indexTable, char* dataTable);
|
||||
@@ -66,15 +78,15 @@ private:
|
||||
class TC_SHARED_API DB2DatabaseLoader
|
||||
{
|
||||
public:
|
||||
DB2DatabaseLoader(std::string const& storageName, DB2Meta const* meta) : _storageName(storageName), _meta(meta) { }
|
||||
DB2DatabaseLoader(std::string const& storageName, DB2LoadInfo const& loadInfo) : _storageName(storageName), _loadInfo(loadInfo) { }
|
||||
|
||||
char* Load(HotfixDatabaseStatements preparedStatement, uint32& records, char**& indexTable, char*& stringHolders, std::vector<char*>& stringPool);
|
||||
void LoadStrings(HotfixDatabaseStatements preparedStatement, uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool);
|
||||
char* Load(uint32& records, char**& indexTable, char*& stringHolders, std::vector<char*>& stringPool);
|
||||
void LoadStrings(uint32 locale, uint32 records, char** indexTable, std::vector<char*>& stringPool);
|
||||
static char* AddString(char const** holder, std::string const& value);
|
||||
|
||||
private:
|
||||
std::string _storageName;
|
||||
DB2Meta const* _meta;
|
||||
DB2LoadInfo _loadInfo;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class DB2StorageBase
|
||||
{
|
||||
public:
|
||||
DB2StorageBase(char const* fileName, DB2Meta const* meta, HotfixDatabaseStatements preparedStmtIndex)
|
||||
: _tableHash(0), _layoutHash(0), _fileName(fileName), _fieldCount(0), _meta(meta), _dataTable(nullptr), _dataTableEx(nullptr), _hotfixStatement(preparedStmtIndex) { }
|
||||
DB2StorageBase(char const* fileName, DB2LoadInfo loadInfo)
|
||||
: _tableHash(0), _layoutHash(0), _fileName(fileName), _fieldCount(0), _loadInfo(loadInfo), _dataTable(nullptr), _dataTableEx(nullptr) { }
|
||||
|
||||
virtual ~DB2StorageBase()
|
||||
{
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
uint32 GetFieldCount() const { return _fieldCount; }
|
||||
|
||||
DB2Meta const* GetMeta() const { return _meta; }
|
||||
DB2LoadInfo const* GetLoadInfo() const { return &_loadInfo; }
|
||||
|
||||
virtual bool Load(std::string const& path, uint32 locale) = 0;
|
||||
virtual bool LoadStringsFrom(std::string const& path, uint32 locale) = 0;
|
||||
@@ -63,14 +63,14 @@ public:
|
||||
protected:
|
||||
void WriteRecordData(char const* entry, uint32 locale, ByteBuffer& buffer) const
|
||||
{
|
||||
if (!_meta->HasIndexFieldInData())
|
||||
if (!_loadInfo.Meta->HasIndexFieldInData())
|
||||
entry += 4;
|
||||
|
||||
for (uint32 i = 0; i < _meta->FieldCount; ++i)
|
||||
for (uint32 i = 0; i < _loadInfo.Meta->FieldCount; ++i)
|
||||
{
|
||||
for (uint32 a = 0; a < _meta->ArraySizes[i]; ++a)
|
||||
for (uint32 a = 0; a < _loadInfo.Meta->ArraySizes[i]; ++a)
|
||||
{
|
||||
switch (_meta->Types[i])
|
||||
switch (_loadInfo.Meta->Types[i])
|
||||
{
|
||||
case FT_INT:
|
||||
buffer << *(uint32*)entry;
|
||||
@@ -113,11 +113,10 @@ protected:
|
||||
uint32 _layoutHash;
|
||||
std::string _fileName;
|
||||
uint32 _fieldCount;
|
||||
DB2Meta const* _meta;
|
||||
DB2LoadInfo _loadInfo;
|
||||
char* _dataTable;
|
||||
char* _dataTableEx;
|
||||
std::vector<char*> _stringPool;
|
||||
HotfixDatabaseStatements _hotfixStatement;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -128,7 +127,7 @@ class DB2Storage : public DB2StorageBase
|
||||
public:
|
||||
typedef DBStorageIterator<T> iterator;
|
||||
|
||||
DB2Storage(char const* fileName, DB2Meta const* meta, HotfixDatabaseStatements preparedStmtIndex) : DB2StorageBase(fileName, meta, preparedStmtIndex),
|
||||
DB2Storage(char const* fileName, DB2LoadInfo loadInfo) : DB2StorageBase(fileName, loadInfo),
|
||||
_indexTableSize(0)
|
||||
{
|
||||
_indexTable.AsT = NULL;
|
||||
@@ -155,7 +154,7 @@ public:
|
||||
{
|
||||
DB2FileLoader db2;
|
||||
// Check if load was successful, only then continue
|
||||
if (!db2.Load((path + _fileName).c_str(), _meta))
|
||||
if (!db2.Load((path + _fileName).c_str(), _loadInfo))
|
||||
return false;
|
||||
|
||||
_fieldCount = db2.GetCols();
|
||||
@@ -184,11 +183,11 @@ public:
|
||||
|
||||
DB2FileLoader db2;
|
||||
// Check if load was successful, only then continue
|
||||
if (!db2.Load((path + _fileName).c_str(), _meta))
|
||||
if (!db2.Load((path + _fileName).c_str(), _loadInfo))
|
||||
return false;
|
||||
|
||||
// load strings from another locale db2 data
|
||||
if (_meta->GetStringFieldCount(true))
|
||||
if (_loadInfo.Meta->GetStringFieldCount(true))
|
||||
if (char* stringBlock = db2.AutoProduceStrings(_dataTable, locale))
|
||||
_stringPool.push_back(stringBlock);
|
||||
return true;
|
||||
@@ -197,17 +196,17 @@ public:
|
||||
void LoadFromDB() override
|
||||
{
|
||||
char* extraStringHolders = nullptr;
|
||||
_dataTableEx = DB2DatabaseLoader(_fileName, _meta).Load(_hotfixStatement, _indexTableSize, _indexTable.AsChar, extraStringHolders, _stringPool);
|
||||
_dataTableEx = DB2DatabaseLoader(_fileName, _loadInfo).Load(_indexTableSize, _indexTable.AsChar, extraStringHolders, _stringPool);
|
||||
if (extraStringHolders)
|
||||
_stringPool.push_back(extraStringHolders);
|
||||
}
|
||||
|
||||
void LoadStringsFromDB(uint32 locale) override
|
||||
{
|
||||
if (!_meta->GetStringFieldCount(true))
|
||||
if (!_loadInfo.Meta->GetStringFieldCount(true))
|
||||
return;
|
||||
|
||||
DB2DatabaseLoader(_fileName, _meta).LoadStrings(HotfixDatabaseStatements(_hotfixStatement + 1), locale, _indexTableSize, _indexTable.AsChar, _stringPool);
|
||||
DB2DatabaseLoader(_fileName, _loadInfo).LoadStrings(locale, _indexTableSize, _indexTable.AsChar, _stringPool);
|
||||
}
|
||||
|
||||
iterator begin() { return iterator(_indexTable.AsT, _indexTableSize); }
|
||||
|
||||
Reference in New Issue
Block a user