1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Merge pull request #564 from NotAdam/develop

update exd_struct_gen to new saintcoinach defs structure
This commit is contained in:
Mordred 2019-06-25 14:51:45 +02:00 committed by GitHub
commit 7338ef8976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 8568 additions and 8012 deletions

View file

@ -602,3 +602,8 @@ CREATE TABLE `charamonsternote` (
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY(`CharacterId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `__Migration` (
`MigrationName` VARCHAR(250) NOT NULL,
PRIMARY KEY (`MigrationName`)
) ENGINE=InnoDB;

View file

@ -62,8 +62,10 @@ Sapphire::Data::Action::Action( uint32_t row_id, Sapphire::Data::ExdDataGenerate
castType = exdData->getField< uint8_t >( row, 27 );
effectRange = exdData->getField< uint8_t >( row, 28 );
xAxisModifier = exdData->getField< uint8_t >( row, 29 );
costType = exdData->getField< uint8_t >( row, 31 );
cost = exdData->getField< uint16_t >( row, 32 );
primaryCostType = exdData->getField< uint8_t >( row, 31 );
primaryCostValue = exdData->getField< uint16_t >( row, 32 );
secondaryCostType = exdData->getField< uint8_t >( row, 33 );
secondaryCostValue = exdData->getField< uint16_t >( row, 34 );
actionCombo = exdData->getField< uint16_t >( row, 35 );
preservesCombo = exdData->getField< bool >( row, 36 );
cast100ms = exdData->getField< uint16_t >( row, 37 );
@ -143,7 +145,7 @@ Sapphire::Data::ActionTimelineReplace::ActionTimelineReplace( uint32_t row_id, S
{
auto row = exdData->m_ActionTimelineReplaceDat.get_row( row_id );
old = exdData->getField< uint16_t >( row, 0 );
New = exdData->getField< uint16_t >( row, 1 );
_new = exdData->getField< uint16_t >( row, 1 );
}
Sapphire::Data::ActionTransient::ActionTransient( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -200,7 +202,7 @@ Sapphire::Data::AddonHud::AddonHud( uint32_t row_id, Sapphire::Data::ExdDataGene
auto row = exdData->m_AddonHudDat.get_row( row_id );
_long = exdData->getField< std::string >( row, 0 );
_short = exdData->getField< std::string >( row, 1 );
_function = exdData->getField< std::string >( row, 2 );
function = exdData->getField< std::string >( row, 2 );
}
Sapphire::Data::Adventure::Adventure( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -1114,6 +1116,8 @@ Sapphire::Data::ClassJob::ClassJob( uint32_t row_id, Sapphire::Data::ExdDataGene
classJobParent = exdData->getField< uint8_t >( row, 26 );
nameEnglish = exdData->getField< std::string >( row, 27 );
itemStartingWeapon = exdData->getField< int32_t >( row, 28 );
role = exdData->getField< uint8_t >( row, 30 );
startingTown = exdData->getField< uint8_t >( row, 31 );
primaryStat = exdData->getField< uint8_t >( row, 33 );
limitBreak1 = exdData->getField< uint16_t >( row, 34 );
limitBreak2 = exdData->getField< uint16_t >( row, 35 );
@ -1123,6 +1127,8 @@ Sapphire::Data::ClassJob::ClassJob( uint32_t row_id, Sapphire::Data::ExdDataGene
relicQuest = exdData->getField< uint32_t >( row, 40 );
prerequisite = exdData->getField< uint32_t >( row, 41 );
startingLevel = exdData->getField< uint8_t >( row, 42 );
partyBonus = exdData->getField< uint8_t >( row, 43 );
isLimitedJob = exdData->getField< bool >( row, 44 );
}
Sapphire::Data::ClassJobCategory::ClassJobCategory( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -1180,6 +1186,7 @@ Sapphire::Data::Companion::Companion( uint32_t row_id, Sapphire::Data::ExdDataGe
model = exdData->getField< uint16_t >( row, 8 );
behavior = exdData->getField< uint8_t >( row, 14 );
icon = exdData->getField< uint16_t >( row, 26 );
order = exdData->getField< uint16_t >( row, 27 );
cost = exdData->getField< uint8_t >( row, 30 );
hP = exdData->getField< uint16_t >( row, 31 );
skillAngle = exdData->getField< uint16_t >( row, 33 );
@ -1287,6 +1294,20 @@ Sapphire::Data::CompanyCraftType::CompanyCraftType( uint32_t row_id, Sapphire::D
name = exdData->getField< std::string >( row, 0 );
}
Sapphire::Data::CompanyLeve::CompanyLeve( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CompanyLeveDat.get_row( row_id );
eventItem = exdData->getField< int32_t >( row, 32 );
eventItemAmount = exdData->getField< uint8_t >( row, 40 );
companyLeveRule = exdData->getField< int32_t >( row, 176 );
}
Sapphire::Data::CompanyLeveRule::CompanyLeveRule( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CompanyLeveRuleDat.get_row( row_id );
type = exdData->getField< std::string >( row, 0 );
}
Sapphire::Data::CompleteJournal::CompleteJournal( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CompleteJournalDat.get_row( row_id );
@ -1358,6 +1379,17 @@ Sapphire::Data::ContentFinderCondition::ContentFinderCondition( uint32_t row_id,
contentType = exdData->getField< uint8_t >( row, 35 );
transient = exdData->getField< uint32_t >( row, 37 );
image = exdData->getField< uint32_t >( row, 39 );
levelingRoulette = exdData->getField< bool >( row, 42 );
level5060Roulette = exdData->getField< bool >( row, 43 );
mSQRoulette = exdData->getField< bool >( row, 44 );
guildHestRoulette = exdData->getField< bool >( row, 45 );
expertRoulette = exdData->getField< bool >( row, 46 );
trialRoulette = exdData->getField< bool >( row, 47 );
dailyFrontlineChallenge = exdData->getField< bool >( row, 48 );
level70Roulette = exdData->getField< bool >( row, 49 );
mentorRoulette = exdData->getField< bool >( row, 50 );
allianceRoulette = exdData->getField< bool >( row, 56 );
normalRaidRoulette = exdData->getField< bool >( row, 58 );
}
Sapphire::Data::ContentFinderConditionTransient::ContentFinderConditionTransient( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -1541,6 +1573,21 @@ Sapphire::Data::CreditCast::CreditCast( uint32_t row_id, Sapphire::Data::ExdData
name = exdData->getField< std::string >( row, 0 );
}
Sapphire::Data::CreditList::CreditList( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CreditListDat.get_row( row_id, subRow );
scale = exdData->getField< uint16_t >( row, 0 );
icon = exdData->getField< uint32_t >( row, 1 );
font = exdData->getField< uint32_t >( row, 2 );
cast = exdData->getField< uint32_t >( row, 5 );
}
Sapphire::Data::CreditListText::CreditListText( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CreditListTextDat.get_row( row_id );
name = exdData->getField< std::string >( row, 0 );
}
Sapphire::Data::Currency::Currency( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_CurrencyDat.get_row( row_id );
@ -1952,6 +1999,8 @@ Sapphire::Data::ENpcBase::ENpcBase( uint32_t row_id, Sapphire::Data::ExdDataGene
eNpcData.push_back( exdData->getField< uint32_t >( row, 31 ) );
eNpcData.push_back( exdData->getField< uint32_t >( row, 32 ) );
eNpcData.push_back( exdData->getField< uint32_t >( row, 33 ) );
scale = exdData->getField< float >( row, 34 );
modelChara = exdData->getField< uint16_t >( row, 35 );
race = exdData->getField< uint8_t >( row, 36 );
gender = exdData->getField< uint8_t >( row, 37 );
bodyType = exdData->getField< uint8_t >( row, 38 );
@ -3057,7 +3106,6 @@ Sapphire::Data::HousingFurniture::HousingFurniture( uint32_t row_id, Sapphire::D
housingItemCategory = exdData->getField< uint8_t >( row, 1 );
usageType = exdData->getField< uint8_t >( row, 2 );
usageParameter = exdData->getField< uint32_t >( row, 3 );
housingLayoutLimit = exdData->getField< uint8_t >( row, 4 );
aquariumTier = exdData->getField< uint8_t >( row, 5 );
customTalk = exdData->getField< uint32_t >( row, 6 );
item = exdData->getField< uint32_t >( row, 7 );
@ -3065,23 +3113,6 @@ Sapphire::Data::HousingFurniture::HousingFurniture( uint32_t row_id, Sapphire::D
tooltip = exdData->getField< bool >( row, 9 );
}
Sapphire::Data::HousingMapMarkerInfo::HousingMapMarkerInfo( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingMapMarkerInfoDat.get_row( row_id, subRow );
x = exdData->getField< float >( row, 0 );
y = exdData->getField< float >( row, 1 );
z = exdData->getField< float >( row, 2 );
plotNumberDistance = exdData->getField< float >( row, 3 );
map = exdData->getField< uint16_t >( row, 4 );
}
Sapphire::Data::HousingMerchantPose::HousingMerchantPose( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingMerchantPoseDat.get_row( row_id );
actionTimeline = exdData->getField< uint16_t >( row, 0 );
pose = exdData->getField< std::string >( row, 1 );
}
Sapphire::Data::HousingLandSet::HousingLandSet( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingLandSetDat.get_row( row_id );
@ -3145,8 +3176,66 @@ Sapphire::Data::HousingLandSet::HousingLandSet( uint32_t row_id, Sapphire::Data:
plotSize.push_back( exdData->getField< uint8_t >( row, 57 ) );
plotSize.push_back( exdData->getField< uint8_t >( row, 58 ) );
plotSize.push_back( exdData->getField< uint8_t >( row, 59 ) );
for ( int i = 60; i < 60 + 60; i++ )
minPrice.push_back( exdData->getField< uint32_t >( row, i ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 60 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 61 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 62 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 63 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 64 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 65 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 66 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 67 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 68 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 69 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 70 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 71 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 72 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 73 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 74 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 75 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 76 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 77 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 78 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 79 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 80 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 81 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 82 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 83 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 84 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 85 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 86 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 87 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 88 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 89 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 90 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 91 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 92 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 93 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 94 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 95 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 96 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 97 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 98 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 99 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 100 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 101 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 102 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 103 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 104 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 105 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 106 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 107 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 108 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 109 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 110 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 111 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 112 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 113 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 114 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 115 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 116 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 117 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 118 ) );
minPrice.push_back( exdData->getField< uint32_t >( row, 119 ) );
initialPrice.push_back( exdData->getField< uint32_t >( row, 300 ) );
initialPrice.push_back( exdData->getField< uint32_t >( row, 301 ) );
initialPrice.push_back( exdData->getField< uint32_t >( row, 302 ) );
@ -3209,6 +3298,22 @@ Sapphire::Data::HousingLandSet::HousingLandSet( uint32_t row_id, Sapphire::Data:
initialPrice.push_back( exdData->getField< uint32_t >( row, 359 ) );
}
Sapphire::Data::HousingMapMarkerInfo::HousingMapMarkerInfo( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingMapMarkerInfoDat.get_row( row_id, subRow );
x = exdData->getField< float >( row, 0 );
y = exdData->getField< float >( row, 1 );
z = exdData->getField< float >( row, 2 );
map = exdData->getField< uint16_t >( row, 4 );
}
Sapphire::Data::HousingMerchantPose::HousingMerchantPose( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingMerchantPoseDat.get_row( row_id );
actionTimeline = exdData->getField< uint16_t >( row, 0 );
pose = exdData->getField< std::string >( row, 1 );
}
Sapphire::Data::HousingPlacement::HousingPlacement( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_HousingPlacementDat.get_row( row_id );
@ -3263,7 +3368,6 @@ Sapphire::Data::HousingYardObject::HousingYardObject( uint32_t row_id, Sapphire:
housingItemCategory = exdData->getField< uint8_t >( row, 1 );
usageType = exdData->getField< uint8_t >( row, 2 );
usageParameter = exdData->getField< uint32_t >( row, 3 );
housingLayoutLimit = exdData->getField< uint8_t >( row, 4 );
customTalk = exdData->getField< uint32_t >( row, 5 );
item = exdData->getField< uint32_t >( row, 6 );
destroyOnRemoval = exdData->getField< bool >( row, 7 );
@ -3448,6 +3552,7 @@ Sapphire::Data::ItemAction::ItemAction( uint32_t row_id, Sapphire::Data::ExdData
Sapphire::Data::ItemFood::ItemFood( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_ItemFoodDat.get_row( row_id );
eXPBonus = exdData->getField< uint8_t >( row, 0 );
}
Sapphire::Data::ItemLevel::ItemLevel( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -4048,6 +4153,19 @@ Sapphire::Data::MoveVfx::MoveVfx( uint32_t row_id, Sapphire::Data::ExdDataGenera
vFXWalking = exdData->getField< uint16_t >( row, 1 );
}
Sapphire::Data::NotebookDivision::NotebookDivision( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_NotebookDivisionDat.get_row( row_id );
name = exdData->getField< std::string >( row, 0 );
notebookDivisionCategory = exdData->getField< uint8_t >( row, 1 );
}
Sapphire::Data::NotebookDivisionCategory::NotebookDivisionCategory( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_NotebookDivisionCategoryDat.get_row( row_id );
name = exdData->getField< std::string >( row, 0 );
}
Sapphire::Data::NpcEquip::NpcEquip( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_NpcEquipDat.get_row( row_id );
@ -4136,12 +4254,14 @@ Sapphire::Data::ParamGrow::ParamGrow( uint32_t row_id, Sapphire::Data::ExdDataGe
auto row = exdData->m_ParamGrowDat.get_row( row_id );
expToNext = exdData->getField< int32_t >( row, 0 );
additionalActions = exdData->getField< uint8_t >( row, 1 );
scaledQuestXP = exdData->getField< uint16_t >( row, 3 );
mpModifier = exdData->getField< int32_t >( row, 4 );
baseSpeed = exdData->getField< int32_t >( row, 5 );
levelModifier = exdData->getField< int32_t >( row, 6 );
questExpModifier = exdData->getField< uint8_t >( row, 7 );
hpModifier = exdData->getField< uint16_t >( row, 8 );
huntingLogExpReward = exdData->getField< int32_t >( row, 9 );
itemLevelSync = exdData->getField< uint16_t >( row, 11 );
}
Sapphire::Data::PartyContent::PartyContent( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -4237,7 +4357,7 @@ Sapphire::Data::PlantPotFlowerSeed::PlantPotFlowerSeed( uint32_t row_id, Sapphir
Sapphire::Data::PreHandler::PreHandler( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_PreHandlerDat.get_row( row_id );
gilShop = exdData->getField< uint32_t >( row, 0 );
target = exdData->getField< uint32_t >( row, 0 );
actionTimeline = exdData->getField< uint16_t >( row, 2 );
}
@ -4842,8 +4962,8 @@ Sapphire::Data::Quest::Quest( uint32_t row_id, Sapphire::Data::ExdDataGenerated*
Sapphire::Data::QuestBattle::QuestBattle( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_QuestBattleDat.get_row( row_id );
timeLimit = exdData->getField< uint16_t >( row, 2 );
quest = exdData->getField< int32_t >( row, 0 );
timeLimit = exdData->getField< uint16_t >( row, 2 );
levelSync = exdData->getField< uint16_t >( row, 3 );
scriptInstruction.push_back( exdData->getField< std::string >( row, 4 ) );
scriptInstruction.push_back( exdData->getField< std::string >( row, 5 ) );
@ -5144,6 +5264,7 @@ Sapphire::Data::QuestBattle::QuestBattle( uint32_t row_id, Sapphire::Data::ExdDa
scriptValue.push_back( exdData->getField< uint32_t >( row, 300 ) );
scriptValue.push_back( exdData->getField< uint32_t >( row, 301 ) );
scriptValue.push_back( exdData->getField< uint32_t >( row, 302 ) );
scriptValue.push_back( exdData->getField< uint32_t >( row, 303 ) );
}
Sapphire::Data::QuestClassJobReward::QuestClassJobReward( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
@ -6156,9 +6277,12 @@ Sapphire::Data::TerritoryType::TerritoryType( uint32_t row_id, Sapphire::Data::E
map = exdData->getField< uint16_t >( row, 6 );
territoryIntendedUse = exdData->getField< uint8_t >( row, 9 );
weatherRate = exdData->getField< uint8_t >( row, 12 );
placeNameRegionIcon = exdData->getField< int32_t >( row, 20 );
placeNameIcon = exdData->getField< int32_t >( row, 21 );
arrayEventHandler = exdData->getField< uint32_t >( row, 22 );
questBattle = exdData->getField< uint16_t >( row, 23 );
aetheryte = exdData->getField< int32_t >( row, 24 );
isPvpZone = exdData->getField< bool >( row, 28 );
}
Sapphire::Data::TextCommand::TextCommand( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -6236,7 +6360,9 @@ Sapphire::Data::Transformation::Transformation( uint32_t row_id, Sapphire::Data:
{
auto row = exdData->m_TransformationDat.get_row( row_id );
model = exdData->getField< int16_t >( row, 1 );
bNpcCustomize = exdData->getField< int32_t >( row, 4 );
bNpcName = exdData->getField< uint16_t >( row, 2 );
bNpcCustomize = exdData->getField< int32_t >( row, 3 );
npcEquip = exdData->getField< int32_t >( row, 4 );
action.push_back( exdData->getField< uint16_t >( row, 5 ) );
action.push_back( exdData->getField< uint16_t >( row, 6 ) );
action.push_back( exdData->getField< uint16_t >( row, 7 ) );
@ -6248,6 +6374,9 @@ Sapphire::Data::Transformation::Transformation( uint32_t row_id, Sapphire::Data:
isPvP = exdData->getField< bool >( row, 15 );
isEvent = exdData->getField< bool >( row, 16 );
playerCamera = exdData->getField< bool >( row, 17 );
startVFX = exdData->getField< uint16_t >( row, 18 );
endVFX = exdData->getField< uint16_t >( row, 19 );
rPParameter = exdData->getField< uint8_t >( row, 23 );
}
Sapphire::Data::Treasure::Treasure( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
@ -6267,6 +6396,12 @@ Sapphire::Data::TreasureHuntRank::TreasureHuntRank( uint32_t row_id, Sapphire::D
minPartySize = exdData->getField< uint8_t >( row, 6 );
}
Sapphire::Data::TreasureSpot::TreasureSpot( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_TreasureSpotDat.get_row( row_id, subRow );
location = exdData->getField< int32_t >( row, 0 );
}
Sapphire::Data::Tribe::Tribe( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )
{
auto row = exdData->m_TribeDat.get_row( row_id );
@ -6442,16 +6577,6 @@ Sapphire::Data::WarpLogic::WarpLogic( uint32_t row_id, Sapphire::Data::ExdDataGe
function.push_back( exdData->getField< std::string >( row, 10 ) );
function.push_back( exdData->getField< std::string >( row, 11 ) );
function.push_back( exdData->getField< std::string >( row, 12 ) );
argument.push_back( exdData->getField< uint32_t >( row, 13 ) );
argument.push_back( exdData->getField< uint32_t >( row, 14 ) );
argument.push_back( exdData->getField< uint32_t >( row, 15 ) );
argument.push_back( exdData->getField< uint32_t >( row, 16 ) );
argument.push_back( exdData->getField< uint32_t >( row, 17 ) );
argument.push_back( exdData->getField< uint32_t >( row, 18 ) );
argument.push_back( exdData->getField< uint32_t >( row, 19 ) );
argument.push_back( exdData->getField< uint32_t >( row, 20 ) );
argument.push_back( exdData->getField< uint32_t >( row, 21 ) );
argument.push_back( exdData->getField< uint32_t >( row, 22 ) );
question = exdData->getField< std::string >( row, 23 );
responseYes = exdData->getField< std::string >( row, 24 );
responseNo = exdData->getField< std::string >( row, 25 );
@ -6725,6 +6850,8 @@ bool Sapphire::Data::ExdDataGenerated::init( const std::string& path )
m_CompanyCraftSequenceDat = setupDatAccess( "CompanyCraftSequence", xiv::exd::Language::none );
m_CompanyCraftSupplyItemDat = setupDatAccess( "CompanyCraftSupplyItem", xiv::exd::Language::none );
m_CompanyCraftTypeDat = setupDatAccess( "CompanyCraftType", xiv::exd::Language::en );
m_CompanyLeveDat = setupDatAccess( "CompanyLeve", xiv::exd::Language::none );
m_CompanyLeveRuleDat = setupDatAccess( "CompanyLeveRule", xiv::exd::Language::none );
m_CompleteJournalDat = setupDatAccess( "CompleteJournal", xiv::exd::Language::en );
m_CompleteJournalCategoryDat = setupDatAccess( "CompleteJournalCategory", xiv::exd::Language::none );
m_ContentCloseCycleDat = setupDatAccess( "ContentCloseCycle", xiv::exd::Language::none );
@ -6748,6 +6875,8 @@ bool Sapphire::Data::ExdDataGenerated::init( const std::string& path )
m_CreditDat = setupDatAccess( "Credit", xiv::exd::Language::none );
m_CreditBackImageDat = setupDatAccess( "CreditBackImage", xiv::exd::Language::none );
m_CreditCastDat = setupDatAccess( "CreditCast", xiv::exd::Language::en );
m_CreditListDat = setupDatAccess( "CreditList", xiv::exd::Language::none );
m_CreditListTextDat = setupDatAccess( "CreditListText", xiv::exd::Language::en );
m_CurrencyDat = setupDatAccess( "Currency", xiv::exd::Language::none );
m_CustomTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en );
m_CustomTalkDynamicIconDat = setupDatAccess( "CustomTalkDynamicIcon", xiv::exd::Language::none );
@ -6954,6 +7083,8 @@ bool Sapphire::Data::ExdDataGenerated::init( const std::string& path )
m_MountTransientDat = setupDatAccess( "MountTransient", xiv::exd::Language::en );
m_MoveTimelineDat = setupDatAccess( "MoveTimeline", xiv::exd::Language::none );
m_MoveVfxDat = setupDatAccess( "MoveVfx", xiv::exd::Language::none );
m_NotebookDivisionDat = setupDatAccess( "NotebookDivision", xiv::exd::Language::en );
m_NotebookDivisionCategoryDat = setupDatAccess( "NotebookDivisionCategory", xiv::exd::Language::en );
m_NpcEquipDat = setupDatAccess( "NpcEquip", xiv::exd::Language::none );
m_NpcYellDat = setupDatAccess( "NpcYell", xiv::exd::Language::en );
m_OmenDat = setupDatAccess( "Omen", xiv::exd::Language::none );
@ -7058,6 +7189,7 @@ bool Sapphire::Data::ExdDataGenerated::init( const std::string& path )
m_TransformationDat = setupDatAccess( "Transformation", xiv::exd::Language::none );
m_TreasureDat = setupDatAccess( "Treasure", xiv::exd::Language::en );
m_TreasureHuntRankDat = setupDatAccess( "TreasureHuntRank", xiv::exd::Language::none );
m_TreasureSpotDat = setupDatAccess( "TreasureSpot", xiv::exd::Language::none );
m_TribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en );
m_TripleTriadDat = setupDatAccess( "TripleTriad", xiv::exd::Language::none );
m_TripleTriadCardDat = setupDatAccess( "TripleTriadCard", xiv::exd::Language::en );

View file

@ -125,6 +125,8 @@ struct CompanyCraftProcess;
struct CompanyCraftSequence;
struct CompanyCraftSupplyItem;
struct CompanyCraftType;
struct CompanyLeve;
struct CompanyLeveRule;
struct CompleteJournal;
struct CompleteJournalCategory;
struct ContentCloseCycle;
@ -148,6 +150,8 @@ struct CraftType;
struct Credit;
struct CreditBackImage;
struct CreditCast;
struct CreditList;
struct CreditListText;
struct Currency;
struct CustomTalk;
struct CustomTalkDynamicIcon;
@ -354,6 +358,8 @@ struct MountSpeed;
struct MountTransient;
struct MoveTimeline;
struct MoveVfx;
struct NotebookDivision;
struct NotebookDivisionCategory;
struct NpcEquip;
struct NpcYell;
struct Omen;
@ -458,6 +464,7 @@ struct TraitTransient;
struct Transformation;
struct Treasure;
struct TreasureHuntRank;
struct TreasureSpot;
struct Tribe;
struct TripleTriad;
struct TripleTriadCard;
@ -547,8 +554,10 @@ struct Action
uint8_t castType;
uint8_t effectRange;
uint8_t xAxisModifier;
uint8_t costType;
uint16_t cost;
uint8_t primaryCostType;
uint16_t primaryCostValue;
uint8_t secondaryCostType;
uint16_t secondaryCostValue;
uint16_t actionCombo;
bool preservesCombo;
uint16_t cast100ms;
@ -635,7 +644,7 @@ struct ActionTimelineMove
struct ActionTimelineReplace
{
uint16_t old;
uint16_t New;
uint16_t _new;
ActionTimelineReplace( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -699,7 +708,7 @@ struct AddonHud
{
std::string _long;
std::string _short;
std::string _function;
std::string function;
AddonHud( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -1485,6 +1494,8 @@ struct ClassJob
uint8_t classJobParent;
std::string nameEnglish;
int32_t itemStartingWeapon;
uint8_t role;
uint8_t startingTown;
uint8_t primaryStat;
uint16_t limitBreak1;
uint16_t limitBreak2;
@ -1494,6 +1505,8 @@ struct ClassJob
uint32_t relicQuest;
uint32_t prerequisite;
uint8_t startingLevel;
uint8_t partyBonus;
bool isLimitedJob;
ClassJob( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -1553,6 +1566,7 @@ struct Companion
uint16_t model;
uint8_t behavior;
uint16_t icon;
uint16_t order;
uint8_t cost;
uint16_t hP;
uint16_t skillAngle;
@ -1664,6 +1678,22 @@ struct CompanyCraftType
CompanyCraftType( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct CompanyLeve
{
int32_t eventItem;
uint8_t eventItemAmount;
int32_t companyLeveRule;
CompanyLeve( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct CompanyLeveRule
{
std::string type;
CompanyLeveRule( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct CompleteJournal
{
uint16_t requiredLevel;
@ -1713,8 +1743,19 @@ struct ContentFinderCondition
bool dutyRecorderAllowed;
std::string name;
uint8_t contentType;
uint8_t transient;
uint32_t transient;
uint32_t image;
bool levelingRoulette;
bool level5060Roulette;
bool mSQRoulette;
bool guildHestRoulette;
bool expertRoulette;
bool trialRoulette;
bool dailyFrontlineChallenge;
bool level70Roulette;
bool mentorRoulette;
bool allianceRoulette;
bool normalRaidRoulette;
ContentFinderCondition( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -1911,6 +1952,23 @@ struct CreditCast
CreditCast( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct CreditList
{
uint16_t scale;
uint32_t icon;
uint32_t font;
uint32_t cast;
CreditList( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData );
};
struct CreditListText
{
std::string name;
CreditListText( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct Currency
{
uint32_t item;
@ -2223,6 +2281,8 @@ struct EmoteCategory
struct ENpcBase
{
std::vector< uint32_t > eNpcData;
float scale;
uint16_t modelChara;
uint8_t race;
uint8_t gender;
uint8_t bodyType;
@ -3232,7 +3292,6 @@ struct HousingFurniture
uint8_t housingItemCategory;
uint8_t usageType;
uint32_t usageParameter;
uint8_t housingLayoutLimit;
uint8_t aquariumTier;
uint32_t customTalk;
uint32_t item;
@ -3253,11 +3312,10 @@ struct HousingLandSet
struct HousingMapMarkerInfo
{
uint16_t map;
float x;
float y;
float z;
float plotNumberDistance;
uint16_t map;
HousingMapMarkerInfo( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -3319,7 +3377,6 @@ struct HousingYardObject
uint8_t housingItemCategory;
uint8_t usageType;
uint32_t usageParameter;
uint8_t housingLayoutLimit;
uint32_t customTalk;
uint32_t item;
bool destroyOnRemoval;
@ -3490,6 +3547,7 @@ struct ItemAction
struct ItemFood
{
uint8_t eXPBonus;
ItemFood( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -4078,6 +4136,21 @@ struct MoveVfx
MoveVfx( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct NotebookDivision
{
std::string name;
uint8_t notebookDivisionCategory;
NotebookDivision( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct NotebookDivisionCategory
{
std::string name;
NotebookDivisionCategory( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct NpcEquip
{
uint64_t modelMainHand;
@ -4174,12 +4247,14 @@ struct ParamGrow
{
int32_t expToNext;
uint8_t additionalActions;
uint16_t scaledQuestXP;
int32_t mpModifier;
int32_t baseSpeed;
int32_t levelModifier;
uint8_t questExpModifier;
uint16_t hpModifier;
int32_t huntingLogExpReward;
uint16_t itemLevelSync;
ParamGrow( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -4278,7 +4353,7 @@ struct PlantPotFlowerSeed
struct PreHandler
{
uint32_t gilShop;
uint32_t target;
uint16_t actionTimeline;
PreHandler( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
@ -5060,9 +5135,12 @@ struct TerritoryType
uint16_t map;
uint8_t territoryIntendedUse;
uint8_t weatherRate;
int32_t placeNameRegionIcon;
int32_t placeNameIcon;
uint32_t arrayEventHandler;
uint16_t questBattle;
int32_t aetheryte;
bool isPvpZone;
TerritoryType( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -5150,13 +5228,18 @@ struct TraitTransient
struct Transformation
{
int16_t model;
uint16_t bNpcName;
int32_t bNpcCustomize;
int32_t npcEquip;
std::vector< uint16_t > action;
float speed;
float scale;
bool isPvP;
bool isEvent;
bool playerCamera;
uint16_t startVFX;
uint16_t endVFX;
uint8_t rPParameter;
Transformation( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
@ -5180,6 +5263,13 @@ struct TreasureHuntRank
TreasureHuntRank( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData );
};
struct TreasureSpot
{
int32_t location;
TreasureSpot( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData );
};
struct Tribe
{
std::string masculine;
@ -5348,7 +5438,6 @@ struct WarpLogic
{
std::string warpName;
std::vector< std::string > function;
std::vector< uint32_t > argument;
std::string question;
std::string responseYes;
std::string responseNo;
@ -5487,6 +5576,36 @@ struct ZoneSharedGroup
std::shared_ptr< xiv::dat::GameData > m_data;
std::shared_ptr< xiv::exd::ExdData > m_exd_data;
template< class T >
std::shared_ptr< T > get( uint32_t id )
{
try
{
auto info = std::make_shared< T >( id, this );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
template< class T >
std::shared_ptr< T > get( uint32_t id, uint32_t slotId )
{
try
{
auto info = std::make_shared< T >( id, slotId, this );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
xiv::exd::Exd m_AchievementDat;
xiv::exd::Exd m_AchievementCategoryDat;
xiv::exd::Exd m_AchievementKindDat;
@ -5594,6 +5713,8 @@ struct ZoneSharedGroup
xiv::exd::Exd m_CompanyCraftSequenceDat;
xiv::exd::Exd m_CompanyCraftSupplyItemDat;
xiv::exd::Exd m_CompanyCraftTypeDat;
xiv::exd::Exd m_CompanyLeveDat;
xiv::exd::Exd m_CompanyLeveRuleDat;
xiv::exd::Exd m_CompleteJournalDat;
xiv::exd::Exd m_CompleteJournalCategoryDat;
xiv::exd::Exd m_ContentCloseCycleDat;
@ -5617,6 +5738,8 @@ struct ZoneSharedGroup
xiv::exd::Exd m_CreditDat;
xiv::exd::Exd m_CreditBackImageDat;
xiv::exd::Exd m_CreditCastDat;
xiv::exd::Exd m_CreditListDat;
xiv::exd::Exd m_CreditListTextDat;
xiv::exd::Exd m_CurrencyDat;
xiv::exd::Exd m_CustomTalkDat;
xiv::exd::Exd m_CustomTalkDynamicIconDat;
@ -5823,6 +5946,8 @@ struct ZoneSharedGroup
xiv::exd::Exd m_MountTransientDat;
xiv::exd::Exd m_MoveTimelineDat;
xiv::exd::Exd m_MoveVfxDat;
xiv::exd::Exd m_NotebookDivisionDat;
xiv::exd::Exd m_NotebookDivisionCategoryDat;
xiv::exd::Exd m_NpcEquipDat;
xiv::exd::Exd m_NpcYellDat;
xiv::exd::Exd m_OmenDat;
@ -5927,6 +6052,7 @@ struct ZoneSharedGroup
xiv::exd::Exd m_TransformationDat;
xiv::exd::Exd m_TreasureDat;
xiv::exd::Exd m_TreasureHuntRankDat;
xiv::exd::Exd m_TreasureSpotDat;
xiv::exd::Exd m_TribeDat;
xiv::exd::Exd m_TripleTriadDat;
xiv::exd::Exd m_TripleTriadCardDat;
@ -6067,6 +6193,8 @@ struct ZoneSharedGroup
using CompanyCraftSequencePtr = std::shared_ptr< CompanyCraftSequence >;
using CompanyCraftSupplyItemPtr = std::shared_ptr< CompanyCraftSupplyItem >;
using CompanyCraftTypePtr = std::shared_ptr< CompanyCraftType >;
using CompanyLevePtr = std::shared_ptr< CompanyLeve >;
using CompanyLeveRulePtr = std::shared_ptr< CompanyLeveRule >;
using CompleteJournalPtr = std::shared_ptr< CompleteJournal >;
using CompleteJournalCategoryPtr = std::shared_ptr< CompleteJournalCategory >;
using ContentCloseCyclePtr = std::shared_ptr< ContentCloseCycle >;
@ -6090,6 +6218,8 @@ struct ZoneSharedGroup
using CreditPtr = std::shared_ptr< Credit >;
using CreditBackImagePtr = std::shared_ptr< CreditBackImage >;
using CreditCastPtr = std::shared_ptr< CreditCast >;
using CreditListPtr = std::shared_ptr< CreditList >;
using CreditListTextPtr = std::shared_ptr< CreditListText >;
using CurrencyPtr = std::shared_ptr< Currency >;
using CustomTalkPtr = std::shared_ptr< CustomTalk >;
using CustomTalkDynamicIconPtr = std::shared_ptr< CustomTalkDynamicIcon >;
@ -6296,6 +6426,8 @@ struct ZoneSharedGroup
using MountTransientPtr = std::shared_ptr< MountTransient >;
using MoveTimelinePtr = std::shared_ptr< MoveTimeline >;
using MoveVfxPtr = std::shared_ptr< MoveVfx >;
using NotebookDivisionPtr = std::shared_ptr< NotebookDivision >;
using NotebookDivisionCategoryPtr = std::shared_ptr< NotebookDivisionCategory >;
using NpcEquipPtr = std::shared_ptr< NpcEquip >;
using NpcYellPtr = std::shared_ptr< NpcYell >;
using OmenPtr = std::shared_ptr< Omen >;
@ -6400,6 +6532,7 @@ struct ZoneSharedGroup
using TransformationPtr = std::shared_ptr< Transformation >;
using TreasurePtr = std::shared_ptr< Treasure >;
using TreasureHuntRankPtr = std::shared_ptr< TreasureHuntRank >;
using TreasureSpotPtr = std::shared_ptr< TreasureSpot >;
using TribePtr = std::shared_ptr< Tribe >;
using TripleTriadPtr = std::shared_ptr< TripleTriad >;
using TripleTriadCardPtr = std::shared_ptr< TripleTriadCard >;
@ -6432,37 +6565,6 @@ struct ZoneSharedGroup
using YKWPtr = std::shared_ptr< YKW >;
using ZoneSharedGroupPtr = std::shared_ptr< ZoneSharedGroup >;
template< class T >
std::shared_ptr< T > get( uint32_t id )
{
try
{
auto info = std::make_shared< T >( id, this );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
template< class T >
std::shared_ptr< T > get( uint32_t id, uint32_t slotId )
{
try
{
auto info = std::make_shared< T >( id, slotId, this );
return info;
}
catch( std::runtime_error error )
{
// std::cout << error.what();
return nullptr;
}
return nullptr;
}
std::set< uint32_t > m_AchievementIdList;
std::set< uint32_t > m_AchievementCategoryIdList;
@ -6571,6 +6673,8 @@ struct ZoneSharedGroup
std::set< uint32_t > m_CompanyCraftSequenceIdList;
std::set< uint32_t > m_CompanyCraftSupplyItemIdList;
std::set< uint32_t > m_CompanyCraftTypeIdList;
std::set< uint32_t > m_CompanyLeveIdList;
std::set< uint32_t > m_CompanyLeveRuleIdList;
std::set< uint32_t > m_CompleteJournalIdList;
std::set< uint32_t > m_CompleteJournalCategoryIdList;
std::set< uint32_t > m_ContentCloseCycleIdList;
@ -6594,6 +6698,8 @@ struct ZoneSharedGroup
std::set< uint32_t > m_CreditIdList;
std::set< uint32_t > m_CreditBackImageIdList;
std::set< uint32_t > m_CreditCastIdList;
std::set< uint32_t > m_CreditListIdList;
std::set< uint32_t > m_CreditListTextIdList;
std::set< uint32_t > m_CurrencyIdList;
std::set< uint32_t > m_CustomTalkIdList;
std::set< uint32_t > m_CustomTalkDynamicIconIdList;
@ -6800,6 +6906,8 @@ struct ZoneSharedGroup
std::set< uint32_t > m_MountTransientIdList;
std::set< uint32_t > m_MoveTimelineIdList;
std::set< uint32_t > m_MoveVfxIdList;
std::set< uint32_t > m_NotebookDivisionIdList;
std::set< uint32_t > m_NotebookDivisionCategoryIdList;
std::set< uint32_t > m_NpcEquipIdList;
std::set< uint32_t > m_NpcYellIdList;
std::set< uint32_t > m_OmenIdList;
@ -6904,6 +7012,7 @@ struct ZoneSharedGroup
std::set< uint32_t > m_TransformationIdList;
std::set< uint32_t > m_TreasureIdList;
std::set< uint32_t > m_TreasureHuntRankIdList;
std::set< uint32_t > m_TreasureSpotIdList;
std::set< uint32_t > m_TribeIdList;
std::set< uint32_t > m_TripleTriadIdList;
std::set< uint32_t > m_TripleTriadCardIdList;
@ -7579,6 +7688,18 @@ const std::set< uint32_t >& getCompanyCraftTypeIdList()
loadIdList( m_CompanyCraftTypeDat, m_CompanyCraftTypeIdList );
return m_CompanyCraftTypeIdList;
}
const std::set< uint32_t >& getCompanyLeveIdList()
{
if( m_CompanyLeveIdList.size() == 0 )
loadIdList( m_CompanyLeveDat, m_CompanyLeveIdList );
return m_CompanyLeveIdList;
}
const std::set< uint32_t >& getCompanyLeveRuleIdList()
{
if( m_CompanyLeveRuleIdList.size() == 0 )
loadIdList( m_CompanyLeveRuleDat, m_CompanyLeveRuleIdList );
return m_CompanyLeveRuleIdList;
}
const std::set< uint32_t >& getCompleteJournalIdList()
{
if( m_CompleteJournalIdList.size() == 0 )
@ -7717,6 +7838,18 @@ const std::set< uint32_t >& getCreditCastIdList()
loadIdList( m_CreditCastDat, m_CreditCastIdList );
return m_CreditCastIdList;
}
const std::set< uint32_t >& getCreditListIdList()
{
if( m_CreditListIdList.size() == 0 )
loadIdList( m_CreditListDat, m_CreditListIdList );
return m_CreditListIdList;
}
const std::set< uint32_t >& getCreditListTextIdList()
{
if( m_CreditListTextIdList.size() == 0 )
loadIdList( m_CreditListTextDat, m_CreditListTextIdList );
return m_CreditListTextIdList;
}
const std::set< uint32_t >& getCurrencyIdList()
{
if( m_CurrencyIdList.size() == 0 )
@ -8953,6 +9086,18 @@ const std::set< uint32_t >& getMoveVfxIdList()
loadIdList( m_MoveVfxDat, m_MoveVfxIdList );
return m_MoveVfxIdList;
}
const std::set< uint32_t >& getNotebookDivisionIdList()
{
if( m_NotebookDivisionIdList.size() == 0 )
loadIdList( m_NotebookDivisionDat, m_NotebookDivisionIdList );
return m_NotebookDivisionIdList;
}
const std::set< uint32_t >& getNotebookDivisionCategoryIdList()
{
if( m_NotebookDivisionCategoryIdList.size() == 0 )
loadIdList( m_NotebookDivisionCategoryDat, m_NotebookDivisionCategoryIdList );
return m_NotebookDivisionCategoryIdList;
}
const std::set< uint32_t >& getNpcEquipIdList()
{
if( m_NpcEquipIdList.size() == 0 )
@ -9577,6 +9722,12 @@ const std::set< uint32_t >& getTreasureHuntRankIdList()
loadIdList( m_TreasureHuntRankDat, m_TreasureHuntRankIdList );
return m_TreasureHuntRankIdList;
}
const std::set< uint32_t >& getTreasureSpotIdList()
{
if( m_TreasureSpotIdList.size() == 0 )
loadIdList( m_TreasureSpotDat, m_TreasureSpotIdList );
return m_TreasureSpotIdList;
}
const std::set< uint32_t >& getTribeIdList()
{
if( m_TribeIdList.size() == 0 )

View file

@ -51,7 +51,7 @@ namespace Sapphire::Network::Packets
ActorFreeSpawn = 0x0191,
InitZone = 0x019A,
AddStatusEffect = 0x0141,
EffectResult = 0x0141,
ActorControl142 = 0x0142,
ActorControl143 = 0x0143,
ActorControl144 = 0x0144,
@ -137,7 +137,7 @@ namespace Sapphire::Network::Packets
ObjectDespawn = 0x0182, // updated 4.5
UpdateClassInfo = 0x0183, // updated 4.5
SilentSetClassJob = 0x0184, // updated 4.5 - seems to be the case, not sure if it's actually used for anything
InitUI = 0x0185, // updated 4.5
PlayerSetup = 0x0185, // updated 4.5
PlayerStats = 0x0186, // updated 4.5
ActorOwner = 0x0187, // updated 4.5
PlayerStateFlags = 0x0188, // updated 4.5

View file

@ -305,7 +305,7 @@ namespace Sapphire::Network::Packets::Server
* Structural representation of the packet sent by the server
* add a status effect
*/
struct FFXIVIpcAddStatusEffect : FFXIVIpcBasePacket< AddStatusEffect >
struct FFXIVIpcEffectResult : FFXIVIpcBasePacket< EffectResult >
{
uint32_t unknown;
uint32_t actor_id;
@ -793,7 +793,7 @@ namespace Sapphire::Network::Packets::Server
* Structural representation of the packet sent by the server to initialize
* the client UI upon initial connection.
*/
struct FFXIVIpcInitUI : FFXIVIpcBasePacket< InitUI >
struct FFXIVIpcPlayerSetup : FFXIVIpcBasePacket< PlayerSetup >
{
// plain C types for a bit until the packet is actually fixed.
// makes conversion between different editors easier.

View file

@ -141,3 +141,15 @@ void Util::valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t&
outVal = 1 << bitIndex;
}
std::string Util::fmtUtcTime( const std::string& fmt )
{
auto t = std::time( nullptr );
auto tm = std::gmtime( &t );
std::stringstream ss;
ss << std::put_time( tm, fmt.c_str() );
return ss.str();
}

View file

@ -19,6 +19,8 @@ namespace Sapphire::Common::Util
std::string toLowerCopy( const std::string& inStr );
std::string fmtUtcTime( const std::string& fmt );
uint64_t getTimeMs();
/*!

View file

@ -4,6 +4,15 @@
#include <fstream>
#include <streambuf>
#include <sstream>
#include <Logging/Logger.h>
#include <experimental/filesystem>
#include <common/Util/Util.h>
using namespace Sapphire;
using namespace Sapphire::Common;
namespace fs = std::experimental::filesystem;
DbManager::DbManager( const std::string& host, const std::string& database, const std::string& user, const std::string& pw, uint16_t port ) :
m_host( host ),
@ -107,9 +116,14 @@ bool DbManager::performAction()
case Mode::LIQUIDATE:
result = modeLiquidate();
break;
case Mode::UPDATE:
case Mode::MIGRATE:
result = modeMigrate();
break;
case Mode::CHECK:
result = modeCheck();
break;
case Mode::ADD_MIGRATION:
result = modeAddMigration();
break;
case Mode::CLEAN_CHARS:
break;
@ -195,8 +209,8 @@ bool DbManager::modeInit()
content.erase( 0, pos + delimiter.length() );
}
std::cout << "======================================================" << std::endl;
std::cout << "Inserting default values..." << std::endl;
Logger::info( "======================================================" );
Logger::info( "Inserting default values..." );
std::ifstream t1( m_iFile );
@ -273,7 +287,7 @@ bool DbManager::modeLiquidate()
while( resultSet->next() )
{
std::cout << "DROP TABLE `" + resultSet->getString( 1 ) + "`;" << "\n";
Logger::info( "DROP TABLE `{}`;", resultSet->getString( 1 ) );
if( !execute( "DROP TABLE `" + resultSet->getString( 1 ) + "`;" ) )
return false;
}
@ -297,4 +311,175 @@ void DbManager::setSchemaFile( const std::string& sFile )
m_sFile = sFile;
}
void DbManager::setMigratioName( const std::string& name )
{
m_migrationName = name;
}
bool DbManager::modeCheck()
{
if( !selectSchema() )
return false;
std::string query = "SELECT MigrationName FROM __Migration;";
std::vector< std::string > appliedMigrations;
try
{
auto stmt = m_pConnection->createStatement();
auto resultSet = stmt->executeQuery( query );
while( resultSet->next() )
{
appliedMigrations.emplace_back( resultSet->getString( 1 ) );
}
}
catch( std::runtime_error& e )
{
m_lastError = e.what();
return false;
}
uint32_t missing = 0;
for( auto& entry : fs::directory_iterator( "sql/migrations" ) )
{
auto& path = entry.path();
// just in case...
if( path.extension() != ".sql" )
continue;
if( std::find( appliedMigrations.begin(), appliedMigrations.end(), path.filename().string() ) == appliedMigrations.end() )
{
Logger::info( "Missing migration: {}", path.filename().string() );
missing++;
}
}
if( missing > 0 )
{
Logger::warn( "Database is missing {} migration(s).", missing );
}
else
{
Logger::info( "All available migrations have been applied." );
}
return true;
}
bool DbManager::modeMigrate()
{
if( !selectSchema() )
return false;
std::string query = "SELECT MigrationName FROM __Migration;";
std::vector< std::string > appliedMigrations;
try
{
auto stmt = m_pConnection->createStatement();
auto resultSet = stmt->executeQuery( query );
while( resultSet->next() )
{
appliedMigrations.emplace_back( resultSet->getString( 1 ) );
}
}
catch( std::runtime_error& e )
{
m_lastError = e.what();
return false;
}
std::vector< std::string > migrations;
for( auto& entry : fs::directory_iterator( "sql/migrations" ) )
{
auto& path = entry.path();
// just in case...
if( path.extension() != ".sql" )
continue;
migrations.emplace_back( path.string() );
}
std::sort( migrations.begin(), migrations.end() );
for( auto& entry : migrations )
{
auto path = fs::path( entry );
if( std::find( appliedMigrations.begin(), appliedMigrations.end(), path.filename().string() ) == appliedMigrations.end() )
{
Logger::info( "Applying migration: {}", path.filename().string() );
std::ifstream mFile( path.string() );
if( !mFile.is_open() )
{
m_lastError = "File " + path.string() + " does not exist!";
return false;
}
std::string sql( ( std::istreambuf_iterator< char >( mFile ) ),
( std::istreambuf_iterator< char >( ) ) );
try
{
auto stmt = m_pConnection->createStatement();
stmt->executeQuery( sql );
}
catch( std::runtime_error& e )
{
m_lastError = e.what();
return false;
}
// insert into migrations table
if( !execute( fmt::format( "INSERT INTO __Migration (`MigrationName`) VALUES ('{}');", path.filename().string() ) ) )
return false;
}
}
return true;
}
bool DbManager::modeAddMigration()
{
if( !selectSchema() )
return false;
fs::create_directories( "sql/migrations" );
auto filename = fmt::format( "{}_{}.sql", Util::fmtUtcTime( "%Y%m%d%H%M%S" ), m_migrationName );
if( filename.size() > 250 )
{
Logger::error( "Migration name '{}' is longer than 250 characters, please shorten its name.", filename );
return false;
}
auto path = fmt::format( "sql/migrations/{}", filename );
if( fs::exists( path ) )
{
Logger::error( "Migration '{}' already exists.", filename );
return false;
}
std::ofstream mFile( path );
mFile << fmt::format( "-- Migration generated at {}", Util::fmtUtcTime( "%Y/%m/%d %H:%M:%S" ) ) << std::endl;
mFile << fmt::format( "-- {}", filename ) << std::endl << std::endl;
mFile.close();
Logger::info( "New migration created: {}", path );
return true;
}

View file

@ -13,9 +13,10 @@ enum class Mode
{
INIT,
LIQUIDATE,
UPDATE,
MIGRATE,
CHECK,
CLEAN_CHARS
CLEAN_CHARS,
ADD_MIGRATION,
};
class DbManager
@ -37,6 +38,12 @@ class DbManager
bool modeLiquidate();
bool modeCheck();
bool modeMigrate();
bool modeAddMigration();
virtual ~DbManager();
const std::string& getLastError();
@ -49,6 +56,8 @@ class DbManager
void setForceMode( bool mode );
void setMigratioName( const std::string& name );
private:
std::string m_host;
std::string m_database;
@ -61,6 +70,8 @@ class DbManager
std::string m_iFile;
std::string m_sFile;
bool m_force;
std::string m_migrationName;
};

View file

@ -5,7 +5,10 @@
#include <common/Logging/Logger.h>
#include <experimental/filesystem>
#include <MySqlConnector.h>
#include <common/Util/CrashHandler.h>
#include <common/Config/ConfigMgr.h>
Sapphire::Common::Util::CrashHandler crashHandler;
namespace filesys = std::experimental::filesystem;
@ -77,13 +80,14 @@ std::string delChar( std::string &str, char del )
void printUsage()
{
Logger::info( " Usage: sapphire_dbm " );
Logger::info( " Usage: dbm " );
Logger::info( "\t --mode" );
Logger::info( "\t\t initialize -> Creates DB if not present and inserts default tables/data" );
Logger::info( "\t\t check -> Checks if Sapphire DB-Version matches your DB-Version" );
Logger::info( "\t\t update -> Updates your DB-Version to Sapphire DB-Version" );
Logger::info( "\t\t migrate -> Updates your DB-Version to Sapphire DB-Version" );
Logger::info( "\t\t clearchars -> Removes all character data from DB. Accounts will stay untouched" );
Logger::info( "\t\t liquidate -> Removes all tables and deletes the DB" );
Logger::info( "\t\t add-migration -> Creates a new migration with the assoicated up/down sql files" );
Logger::info( "\t --user <mysqlUserName>" );
Logger::info( "\t --pass <mysqlPassword> ( default empty )" );
Logger::info( "\t --host <mysqlHost> ( default 127.0.0.1 )" );
@ -91,6 +95,7 @@ void printUsage()
Logger::info( "\t --database <mysqlDatabase>" );
Logger::info( "\t --sfile <path/to/schemafile> ( default sql/schema/schema.sql )" );
Logger::info( "\t --force ( skips user input / auto Yes )" );
Logger::info( "\t --name <migration name>" );
}
int main( int32_t argc, char* argv[] )
@ -109,8 +114,21 @@ int main( int32_t argc, char* argv[] )
std::string sFile;
std::string iFile;
std::string migrationName;
bool force = false;
// load config first so it can still be overridden if required
Common::ConfigMgr configMgr;
Common::Config::GlobalConfig globalConfig;
if( configMgr.loadGlobalConfig( globalConfig ) )
{
host = globalConfig.database.host;
database = globalConfig.database.database;
user = globalConfig.database.user;
pass = globalConfig.database.password;
}
std::vector< std::string > args( argv + 1, argv + argc );
for( uint32_t i = 0; i + 1 < args.size(); i += 2 )
{
@ -137,6 +155,8 @@ int main( int32_t argc, char* argv[] )
iFile = val;
else if( arg == "force" )
force = true;
else if( arg == "name" )
migrationName = val;
}
if( host.empty() )
@ -155,6 +175,12 @@ int main( int32_t argc, char* argv[] )
dbm.setInsertFile( iFile );
dbm.setSchemaFile( sFile );
}
if( !migrationName.empty() )
{
dbm.setMigratioName( migrationName );
}
if( force )
dbm.setForceMode( true );
//initialize|check|update|clearchars|liquidate
@ -166,9 +192,9 @@ int main( int32_t argc, char* argv[] )
{
dbm.setMode( Mode::CHECK );
}
else if( mode.find( "update" ) != std::string::npos )
else if( mode.find( "migrate" ) != std::string::npos )
{
dbm.setMode( Mode::UPDATE );
dbm.setMode( Mode::MIGRATE );
}
else if( mode.find( "clearchars" ) != std::string::npos )
{
@ -178,6 +204,10 @@ int main( int32_t argc, char* argv[] )
{
dbm.setMode( Mode::LIQUIDATE );
}
else if( mode.find( "add-migration" ) != std::string::npos )
{
dbm.setMode( Mode::ADD_MIGRATION );
}
else
{
Logger::fatal( "Not a valid mode: {0} !", mode );

View file

@ -1,9 +1,5 @@
#include "ExdDataGenerated.h"
#include <boost/make_shared.hpp>
#include <boost/variant.hpp>
#include <memory>
CONSTRUCTORS
Sapphire::Data::ExdDataGenerated::ExdDataGenerated()

View file

@ -43,6 +43,36 @@ STRUCTS
std::shared_ptr< xiv::dat::GameData > m_data;
std::shared_ptr< xiv::exd::ExdData > m_exd_data;
template< class T >
std::shared_ptr< T > get( uint32_t id )
{
try
{
auto info = std::make_shared< T >( id, this );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
template< class T >
std::shared_ptr< T > get( uint32_t id, uint32_t slotId )
{
try
{
auto info = std::make_shared< T >( id, slotId, this );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
DATACCESS
DIRECTGETTERS

View file

@ -11,6 +11,7 @@
#include <set>
#include <Exd/ExdDataGenerated.h>
#include <Logging/Logger.h>
#include <experimental/filesystem>
#include <nlohmann/json.hpp>
@ -21,6 +22,8 @@
using namespace Sapphire;
namespace fs = std::experimental::filesystem;
Sapphire::Data::ExdDataGenerated g_exdData;
bool skipUnmapped = true;
@ -38,10 +41,12 @@ std::map< char, std::string > numberToStringMap
{ '9', "nine" },
};
std::vector< std::string > cppKeyWords
std::vector< std::string > reservedWords
{
"new",
"class"
"class",
"long",
"short"
};
//std::string datLocation( "/home/mordred/sqpack" );
@ -111,15 +116,16 @@ std::string generateStruct( const std::string& exd )
int count = 0;
auto json = nlohmann::json();
std::ifstream exJson( "ex.json" );
exJson >> json;
for( auto& sheet : json[ "sheets" ] )
auto path = fmt::format( "Definitions/{}.json", exd );
if( !fs::exists( path ) )
{
if( sheet[ "sheet" ] != exd )
continue;
Logger::warn( "No definition for exd: {}", exd );
return "";
}
auto sheet = nlohmann::json();
std::ifstream defJson( path );
defJson >> sheet;
for( auto& definition : sheet[ "definitions" ] )
{
@ -169,9 +175,6 @@ std::string generateStruct( const std::string& exd )
}
}
}
std::string result = "struct " + exd + "\n{\n";
@ -202,7 +205,7 @@ std::string generateStruct( const std::string& exd )
}
fieldName[ 0 ] = std::tolower( fieldName[ 0 ] );
std::string badChars = ",-':![](){}<>% \x02\x1f\x01\x03";
std::string badChars = ",-':![](){}/<>% \x02\x1f\x01\x03";
std::for_each( badChars.begin(), badChars.end(), [ &fieldName ]( const char c )
{
fieldName.erase( std::remove( fieldName.begin(), fieldName.end(), c ), fieldName.end() );
@ -217,10 +220,10 @@ std::string generateStruct( const std::string& exd )
}
}
for( std::string keyword : cppKeyWords )
for( std::string keyword : reservedWords )
{
if( fieldName == keyword )
fieldName[ 0 ] = toupper( fieldName[ 0 ] );
fieldName = fmt::format( "_{}", fieldName );
}
indexToNameMap[ count ] = fieldName;
@ -351,11 +354,6 @@ int main( int argc, char** argv )
std::istreambuf_iterator< char >() );
std::ifstream exJson( "ex.json" );
auto json = nlohmann::json();
exJson >> json;
Logger::info( "Setting up EXD data" );
if( !g_exdData.init( datLocation ) )
{
@ -380,9 +378,25 @@ int main( int argc, char** argv )
//nameTaken[name] = "1";
//}
//
for( auto& sheet : json[ "sheets" ] )
if( !fs::exists( "Definitions" ) )
{
std::string name = sheet[ "sheet" ];
Logger::error( "Missing definitions directory. Copy it from SaintCoinach to the working directory." );
return 1;
}
uint32_t entryCount = 0;
for( auto& entry : fs::directory_iterator( "./Definitions/" ) )
{
auto& path = entry.path();
if( path.extension() != ".json" )
continue;
entryCount++;
auto name = path.stem().string();
forwards += "struct " + name + ";\n";
structDefs += generateStruct( name );
dataDecl += generateDatAccessDecl( name );
@ -393,21 +407,7 @@ int main( int argc, char** argv )
idListGetters += generateIdListGetter( name );
}
getterDecl +=
"\n template< class T >\n"
" std::shared_ptr< T > get( uint32_t id )\n"
" {\n"
" try\n"
" {\n"
" auto info = std::make_shared< T >( id, this );\n"
" return info;\n"
" }\n"
" catch( ... )\n"
" {\n"
" return nullptr;\n"
" }\n"
" return nullptr;\n"
" }\n";
Logger::info( "Processed {} definition files, writing files...", entryCount );
getterDef += generateDirectGetterDef();
@ -438,5 +438,7 @@ int main( int argc, char** argv )
// g_log.info( result );
Logger::info( "done." );
return 0;
}

View file

@ -99,8 +99,8 @@ bool Action::Action::init()
}
}
m_primaryCostType = static_cast< Common::ActionPrimaryCostType >( m_actionData->costType );
m_primaryCost = m_actionData->cost;
m_primaryCostType = static_cast< Common::ActionPrimaryCostType >( m_actionData->primaryCostType );
m_primaryCost = m_actionData->primaryCostValue;
/*if( !m_actionData->targetArea )
{

View file

@ -457,7 +457,7 @@ void Sapphire::Entity::Chara::addStatusEffect( StatusEffect::StatusEffectPtr pEf
pEffect->applyStatus();
m_statusEffectMap[ nextSlot ] = pEffect;
auto statusEffectAdd = makeZonePacket< FFXIVIpcAddStatusEffect >( getId() );
auto statusEffectAdd = makeZonePacket< FFXIVIpcEffectResult >( getId() );
statusEffectAdd->data().actor_id = pEffect->getTargetActorId();
statusEffectAdd->data().actor_id1 = pEffect->getSrcActorId();

View file

@ -25,7 +25,7 @@
#include "Network/PacketWrappers/ActorControlPacket142.h"
#include "Network/PacketWrappers/ActorControlPacket143.h"
#include "Network/PacketWrappers/ActorControlPacket144.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/ServerNoticePacket.h"
#include "Network/PacketWrappers/ChatPacket.h"
#include "Network/PacketWrappers/ModelEquipPacket.h"
@ -1717,7 +1717,7 @@ void Sapphire::Entity::Player::sendZonePackets()
}
queuePacket( contentFinderList );
queuePacket( std::make_shared< InitUIPacket >( *this ) );
queuePacket( std::make_shared< PlayerSetupPacket >( *this ) );
auto classInfoPacket = makeZonePacket< FFXIVIpcPlayerClassInfo >( getId() );
classInfoPacket->data().classId = static_cast< uint8_t >( getClass() );

View file

@ -4,7 +4,7 @@
#include "Network/GameConnection.h"
#include "Network/PacketWrappers/ActorControlPacket142.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/ServerNoticePacket.h"
#include "Network/PacketWrappers/EventStartPacket.h"
#include "Network/PacketWrappers/EventPlayPacket.h"

View file

@ -10,7 +10,7 @@
#include <Database/DatabaseDef.h>
#include "Network/GameConnection.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Manager/TerritoryMgr.h"
#include "Territory/Zone.h"

View file

@ -18,7 +18,7 @@
#include "Network/PacketWrappers/ServerNoticePacket.h"
#include "Network/PacketWrappers/ActorControlPacket142.h"
#include "Network/PacketWrappers/ActorControlPacket143.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/PlayerSpawnPacket.h"
#include "Network/GameConnection.h"
#include "Script/ScriptMgr.h"
@ -237,7 +237,7 @@ void Sapphire::World::Manager::DebugCommandMgr::set( char* data, Entity::Player&
else if( subCommand == "discovery_reset" )
{
player.resetDiscovery();
player.queuePacket( std::make_shared< InitUIPacket >( player ) );
player.queuePacket( std::make_shared< PlayerSetupPacket >( player ) );
}
else if( subCommand == "classjob" )
{

View file

@ -10,7 +10,7 @@
#include "Territory/Zone.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Manager/DebugCommandMgr.h"

View file

@ -15,7 +15,7 @@
#include "Network/GameConnection.h"
#include "Network/PacketWrappers/ExaminePacket.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/PingPacket.h"
#include "Network/PacketWrappers/MoveActorPacket.h"
#include "Network/PacketWrappers/ChatPacket.h"

View file

@ -17,7 +17,7 @@
#include "Territory/Zone.h"
#include "Territory/InstanceContent.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/PingPacket.h"
#include "Network/PacketWrappers/MoveActorPacket.h"
#include "Network/PacketWrappers/ChatPacket.h"

View file

@ -21,7 +21,7 @@
#include "Territory/ZonePosition.h"
#include "Territory/House.h"
#include "Network/PacketWrappers/InitUIPacket.h"
#include "Network/PacketWrappers/PlayerSetupPacket.h"
#include "Network/PacketWrappers/PingPacket.h"
#include "Network/PacketWrappers/MoveActorPacket.h"
#include "Network/PacketWrappers/ChatPacket.h"

View file

@ -10,14 +10,14 @@ namespace Sapphire::Network::Packets::Server
{
/**
* @brief The Client UI Initialization packet. This must be sent to the client
* @brief The Client Player Initialization packet. This must be sent to the client
* once upon connection to configure the UI.
*/
class InitUIPacket : public ZoneChannelPacket< FFXIVIpcInitUI >
class PlayerSetupPacket : public ZoneChannelPacket< FFXIVIpcPlayerSetup >
{
public:
InitUIPacket( Entity::Player& player ) :
ZoneChannelPacket< FFXIVIpcInitUI >( player.getId(), player.getId() )
PlayerSetupPacket( Entity::Player& player ) :
ZoneChannelPacket< FFXIVIpcPlayerSetup >( player.getId(), player.getId() )
{
initialize( player );
};