1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 08:27:46 +00:00

Merge pull request #914 from MapleHinata/Sapphire_Retail

Fix building on gcc and regenerate exd for 6.35
This commit is contained in:
Mordred 2023-03-07 14:46:29 +01:00 committed by GitHub
commit 9f458ae27c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 14 deletions

View file

@ -611,11 +611,11 @@ namespace Sapphire::Common {
Gridania = 2, Gridania = 2,
Uldah = 3, Uldah = 3,
Ishgard = 4, Ishgard = 4,
// = 5, /* = 5,
//1 = 6, 1 = 6, */
Kugane = 7, Kugane = 7,
//2 = 8, /* 2 = 8,
//3 = 9, 3 = 9, */
Crystarium = 10, Crystarium = 10,
//4 = 11, //4 = 11,
OldSharlayan = 12, OldSharlayan = 12,
@ -783,9 +783,9 @@ namespace Sapphire::Common {
Polarization3 = 154, Polarization3 = 154,
Polarization4 = 155, Polarization4 = 155,
Projection = 156, Projection = 156,
Pandæmonium = 157, Pandæmonium = 157,
Pandæmonium1 = 158, Pandæmonium1 = 158,
Pandæmonium2 = 159, Pandæmonium2 = 159,
Ultimatum = 160, Ultimatum = 160,
Inevitability = 161, Inevitability = 161,
Transcendence = 162, Transcendence = 162,
@ -817,7 +817,7 @@ namespace Sapphire::Common {
Tavern = 5, Tavern = 5,
Eatery = 6, Eatery = 6,
ImmersiveExperience = 7, ImmersiveExperience = 7,
Café = 8, Café = 8,
Aquarium = 9, Aquarium = 9,
Sanctum = 10, Sanctum = 10,
Venue = 11, Venue = 11,

View file

@ -6822,7 +6822,7 @@ Sapphire::Data::Leve::Leve( uint32_t row_id, Sapphire::Data::ExdDataGenerated* e
name = exdData->getField< std::string >( row, 0 ); name = exdData->getField< std::string >( row, 0 );
description = exdData->getField< std::string >( row, 1 ); description = exdData->getField< std::string >( row, 1 );
leveClient = exdData->getField< int32_t >( row, 2 ); leveClient = exdData->getField< int32_t >( row, 2 );
leveAssignmentType = exdData->getField< uint8_t >( row, 3 ); leveAssignmentType = exdData->getField< int32_t >( row, 4 );
town = exdData->getField< int32_t >( row, 5 ); town = exdData->getField< int32_t >( row, 5 );
classJobLevel = exdData->getField< uint16_t >( row, 6 ); classJobLevel = exdData->getField< uint16_t >( row, 6 );
timeLimit = exdData->getField< uint8_t >( row, 7 ); timeLimit = exdData->getField< uint8_t >( row, 7 );
@ -6830,6 +6830,7 @@ Sapphire::Data::Leve::Leve( uint32_t row_id, Sapphire::Data::ExdDataGenerated* e
evaluation = exdData->getField< int32_t >( row, 9 ); evaluation = exdData->getField< int32_t >( row, 9 );
placeNameStart = exdData->getField< int32_t >( row, 10 ); placeNameStart = exdData->getField< int32_t >( row, 10 );
placeNameIssued = exdData->getField< int32_t >( row, 11 ); placeNameIssued = exdData->getField< int32_t >( row, 11 );
fishingSpot = exdData->getField< uint16_t >( row, 12 );
classJobCategory = exdData->getField< uint8_t >( row, 15 ); classJobCategory = exdData->getField< uint8_t >( row, 15 );
journalGenre = exdData->getField< uint32_t >( row, 16 ); journalGenre = exdData->getField< uint32_t >( row, 16 );
placeNameStartZone = exdData->getField< int32_t >( row, 18 ); placeNameStartZone = exdData->getField< int32_t >( row, 18 );
@ -10259,6 +10260,7 @@ Sapphire::Data::QuestClassJobSupply::QuestClassJobSupply( uint32_t row_id, uint3
Sapphire::Data::QuestDefineClient::QuestDefineClient( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData ) Sapphire::Data::QuestDefineClient::QuestDefineClient( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData )
{ {
auto row = exdData->m_QuestDefineClientDat.get_row( row_id, subRow ); auto row = exdData->m_QuestDefineClientDat.get_row( row_id, subRow );
target = exdData->getField< uint32_t >( row, 1 );
} }
Sapphire::Data::QuestDerivedClass::QuestDerivedClass( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData ) Sapphire::Data::QuestDerivedClass::QuestDerivedClass( uint32_t row_id, Sapphire::Data::ExdDataGenerated* exdData )

View file

@ -5717,7 +5717,7 @@ struct Leve
std::string name; std::string name;
std::string description; std::string description;
int32_t leveClient; int32_t leveClient;
uint8_t leveAssignmentType; int32_t leveAssignmentType;
int32_t town; int32_t town;
uint16_t classJobLevel; uint16_t classJobLevel;
uint8_t timeLimit; uint8_t timeLimit;
@ -5725,6 +5725,7 @@ struct Leve
int32_t evaluation; int32_t evaluation;
int32_t placeNameStart; int32_t placeNameStart;
int32_t placeNameIssued; int32_t placeNameIssued;
uint16_t fishingSpot;
uint8_t classJobCategory; uint8_t classJobCategory;
uint32_t journalGenre; uint32_t journalGenre;
int32_t placeNameStartZone; int32_t placeNameStartZone;
@ -7407,6 +7408,7 @@ struct QuestClassJobSupply
struct QuestDefineClient struct QuestDefineClient
{ {
uint32_t target;
QuestDefineClient( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData ); QuestDefineClient( uint32_t row_id, uint32_t subRow, Sapphire::Data::ExdDataGenerated* exdData );
}; };

View file

@ -39,6 +39,8 @@ std::string generateEnum( const std::string& exd, int8_t nameIndex, const std::s
auto access = g_exdData.setupDatAccess( exd, lang ); auto access = g_exdData.setupDatAccess( exd, lang );
auto rows = access.get_rows(); auto rows = access.get_rows();
Logger::info( "Generating data for Sheet: {0}", exd);
for( auto row : rows ) for( auto row : rows )
{ {
auto& fields = row.second; auto& fields = row.second;
@ -106,6 +108,9 @@ int main( int argc, char** argv )
return 1; return 1;
} }
Logger::info( "Generating structs, this may take several minutes..." );
Logger::info( "Go grab a coffee..." );
std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n"; std::string result = "#ifndef _COMMON_GEN_H_\n#define _COMMON_GEN_H_\n";
result += "\n#include <stdint.h>\n\n"; result += "\n#include <stdint.h>\n\n";

View file

@ -735,7 +735,7 @@ Sapphire::ItemPtr Sapphire::Entity::Player::addItem( uint32_t catalogId, uint32_
} }
auto item = createTempItem( catalogId, quantity ); auto item = createTempItem( catalogId, quantity );
if( !item ) if( !item )
return false; return nullptr;
item->setHq( isHq ); item->setHq( isHq );
return addItem( item, silent, canMerge, sendLootMessage ); return addItem( item, silent, canMerge, sendLootMessage );
} }

View file

@ -69,7 +69,7 @@ namespace Sapphire
size_t size() const size_t size() const
{ {
size_t size = 0; size_t size = 0;
for( auto& it = m_objectCache.begin(); it != m_objectCache.end(); ++it ) for( auto it = m_objectCache.begin(); it != m_objectCache.end(); ++it )
size += it->second.size(); size += it->second.size();
return size; return size;