2017-08-08 13:53:47 +02:00
|
|
|
#ifndef _EXDDATA_H
|
|
|
|
#define _EXDDATA_H
|
|
|
|
|
|
|
|
#include <GameData.h>
|
|
|
|
#include <File.h>
|
|
|
|
#include <ExdData.h>
|
|
|
|
#include <ExdCat.h>
|
|
|
|
#include <Exd.h>
|
|
|
|
|
|
|
|
/* TYPES !!
|
|
|
|
case DataType::boolean: 1
|
|
|
|
case DataType::int8: 2
|
|
|
|
case DataType::uint8: 3
|
|
|
|
case DataType::int16: 4
|
|
|
|
case DataType::uint16: 5
|
|
|
|
case DataType::int32: 6
|
|
|
|
case DataType::uint32: 7
|
|
|
|
case DataType::float32: 8
|
|
|
|
case DataType::uint64: 9
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
|
|
|
|
struct ZoneInfo
|
|
|
|
{
|
|
|
|
uint16_t id;
|
|
|
|
std::string zone_str;
|
|
|
|
std::string zone_name;
|
|
|
|
uint32_t layout_id;
|
|
|
|
uint16_t map_id;
|
|
|
|
int16_t discovery_index;
|
|
|
|
bool is_two_byte;
|
|
|
|
uint8_t weather_rate;
|
|
|
|
std::map< uint8_t, int32_t> weather_rate_map;
|
|
|
|
|
|
|
|
int32_t aetheryte_index;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ClassJobInfo
|
|
|
|
{
|
|
|
|
uint8_t id;
|
|
|
|
std::string name;
|
|
|
|
std::string name_short;
|
|
|
|
uint8_t exp_idx;
|
|
|
|
uint32_t start_weapon_id;
|
|
|
|
uint16_t mod_hp;
|
|
|
|
uint16_t mod_mpcpgp;
|
|
|
|
uint16_t mod_str;
|
|
|
|
uint16_t mod_vit;
|
|
|
|
uint16_t mod_dex;
|
|
|
|
uint16_t mod_int;
|
|
|
|
uint16_t mod_mnd;
|
|
|
|
uint16_t mod_pie;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct QuestInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name;
|
|
|
|
std::string name_intern;
|
|
|
|
uint16_t quest_level;
|
|
|
|
uint32_t enpc_resident_start;
|
|
|
|
uint32_t enpc_resident_end;
|
|
|
|
uint16_t reward_exp_factor;
|
|
|
|
uint32_t reward_gil;
|
|
|
|
uint16_t reward_gc_seals;
|
|
|
|
uint8_t reward_item_type;
|
|
|
|
|
|
|
|
std::vector< uint32_t > reward_item;
|
|
|
|
std::vector< uint8_t > reward_item_count;
|
|
|
|
std::vector< uint8_t > reward_item_stain;
|
|
|
|
|
|
|
|
std::vector< uint32_t > reward_item_optional;
|
|
|
|
std::vector< uint8_t > reward_item_optional_count;
|
|
|
|
std::vector< uint8_t > reward_item_optional_stain;
|
|
|
|
|
|
|
|
uint8_t reward_emote;
|
|
|
|
uint16_t reward_action;
|
|
|
|
uint8_t reward_action_general1;
|
|
|
|
uint8_t reward_action_general2;
|
|
|
|
|
|
|
|
uint8_t reward_other;
|
|
|
|
|
|
|
|
uint32_t instanced_content_unlock;
|
|
|
|
|
|
|
|
uint8_t reward_tome_type;
|
|
|
|
uint8_t reward_tome_count;
|
|
|
|
|
|
|
|
uint8_t reward_reputation;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::vector< std::string > script_entity;
|
|
|
|
std::vector< uint32_t > script_value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct EventActionInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name;
|
|
|
|
uint32_t castTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct OpeningInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ParamGrowthInfo
|
|
|
|
{
|
|
|
|
uint32_t level;
|
|
|
|
uint32_t needed_exp;
|
|
|
|
int16_t hp_mod;
|
|
|
|
int32_t mp_const;
|
|
|
|
int16_t piety_scalar;
|
|
|
|
int32_t base_secondary;
|
|
|
|
uint16_t quest_exp_mod;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CustomTalkInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name_intern;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PlaceNameInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string placename;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct AetheryteInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string placename;
|
|
|
|
std::string placename_aethernet;
|
|
|
|
int32_t target_zone;
|
|
|
|
int32_t levelId;
|
|
|
|
bool isAetheryte;
|
|
|
|
|
|
|
|
int16_t map_coord_x;
|
|
|
|
int16_t map_coord_y;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct RaceInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name;
|
|
|
|
uint32_t male_body;
|
|
|
|
uint32_t male_hands;
|
|
|
|
uint32_t male_legs;
|
|
|
|
uint32_t male_feet;
|
|
|
|
uint32_t female_body;
|
|
|
|
uint32_t female_hands;
|
|
|
|
uint32_t female_legs;
|
|
|
|
uint32_t female_feet;
|
|
|
|
|
|
|
|
int8_t mod_str;
|
|
|
|
int8_t mod_dex;
|
|
|
|
int8_t mod_vit;
|
|
|
|
int8_t mod_int;
|
|
|
|
int8_t mod_mnd;
|
|
|
|
int8_t mod_pie;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TribeInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name;
|
|
|
|
|
|
|
|
int8_t mod_str;
|
|
|
|
int8_t mod_dex;
|
|
|
|
int8_t mod_vit;
|
|
|
|
int8_t mod_int;
|
|
|
|
int8_t mod_mnd;
|
|
|
|
int8_t mod_pie;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct LevelInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
float r;
|
|
|
|
uint32_t actor_id;
|
|
|
|
uint32_t zone_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ClassJobCategoryInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
// should they add new jobs, this needs to be changed
|
|
|
|
bool can_equip[0x33];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ItemInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
2017-08-11 00:58:35 -03:00
|
|
|
std::string name; //0
|
|
|
|
uint16_t item_level; //11
|
|
|
|
uint8_t required_level; //12
|
|
|
|
uint16_t unknown_category; //15
|
|
|
|
uint16_t ui_category; //17
|
|
|
|
uint32_t stack_size; //19
|
|
|
|
bool is_hqable; //20
|
|
|
|
uint64_t model_primary; //28
|
|
|
|
uint64_t model_secondary; //29
|
|
|
|
uint16_t physical_damage; //49
|
|
|
|
uint32_t class_job_requirement; //58
|
|
|
|
uint16_t delayMs; //59
|
|
|
|
bool is_unique; //72
|
|
|
|
bool is_untradeable; //73
|
|
|
|
uint32_t class_job_index; //86
|
2017-08-08 13:53:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ActionInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name; //0
|
|
|
|
uint16_t category;//3
|
|
|
|
|
|
|
|
int8_t class_job;//9
|
|
|
|
uint8_t unlock_level;//10
|
|
|
|
int8_t range;//11
|
|
|
|
bool can_target_self;//12
|
|
|
|
bool can_target_party;//13
|
|
|
|
bool can_target_friendly;//14
|
|
|
|
bool can_target_enemy;//15
|
|
|
|
|
|
|
|
bool is_aoe;//18
|
|
|
|
|
|
|
|
bool can_target_ko;//22
|
|
|
|
|
|
|
|
uint8_t aoe_type;//24
|
|
|
|
uint8_t radius;//25
|
|
|
|
|
|
|
|
uint8_t points_type;//28
|
|
|
|
uint16_t points_cost;//29
|
|
|
|
|
|
|
|
bool is_instant;//33
|
|
|
|
uint32_t cast_time;//34
|
|
|
|
uint32_t recast_time;//35
|
|
|
|
};
|
|
|
|
|
|
|
|
struct EventItemInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name; //0
|
|
|
|
uint32_t eventId;
|
|
|
|
uint32_t castTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StatusEffectInfo
|
|
|
|
{
|
|
|
|
uint32_t id;
|
|
|
|
std::string name; //0
|
|
|
|
};
|
|
|
|
|
|
|
|
class ExdData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ExdData();
|
|
|
|
~ExdData(void);
|
|
|
|
|
|
|
|
bool init( const std::string& path );
|
|
|
|
|
|
|
|
xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang );
|
|
|
|
|
|
|
|
template< class T >
|
|
|
|
T getField( std::vector< xiv::exd::Field >& fields, uint32_t index )
|
|
|
|
{
|
|
|
|
return *boost::get< T >( &fields.at( index ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
boost::shared_ptr<xiv::dat::GameData> m_data;
|
|
|
|
boost::shared_ptr<xiv::exd::ExdData> m_exd_data;
|
|
|
|
|
|
|
|
xiv::exd::Exd m_questDat;
|
|
|
|
xiv::exd::Exd m_openingDat;
|
|
|
|
xiv::exd::Exd m_customTalkDat;
|
|
|
|
xiv::exd::Exd m_aetheryteDat;
|
|
|
|
xiv::exd::Exd m_levelDat;
|
|
|
|
xiv::exd::Exd m_placeNameDat;
|
|
|
|
xiv::exd::Exd m_itemsDat;
|
|
|
|
xiv::exd::Exd m_classJobCatDat;
|
|
|
|
xiv::exd::Exd m_raceDat;
|
|
|
|
xiv::exd::Exd m_eventItemDat;
|
|
|
|
|
|
|
|
std::map<uint32_t, ZoneInfo> m_zoneInfoMap;
|
|
|
|
std::map<uint8_t, ClassJobInfo> m_classJobInfoMap;
|
|
|
|
std::map<uint32_t, ParamGrowthInfo> m_paramGrowthInfoMap;
|
|
|
|
std::map<uint16_t, EventActionInfo> m_EventActionInfoMap;
|
|
|
|
std::map<uint16_t, ActionInfo> m_actionInfoMap;
|
|
|
|
std::map<uint16_t, StatusEffectInfo> m_statusEffectInfoMap;
|
|
|
|
std::map<uint32_t, boost::shared_ptr< AetheryteInfo > > m_aetheryteInfoMap;
|
|
|
|
std::map<uint32_t, TribeInfo > m_tribeInfoMap;
|
|
|
|
|
|
|
|
bool loadZoneInfo();
|
|
|
|
bool loadClassJobInfo();
|
|
|
|
bool loadParamGrowInfo();
|
|
|
|
bool loadEventActionInfo();
|
|
|
|
bool loadActionInfo();
|
|
|
|
bool loadStatusEffectInfo();
|
|
|
|
bool loadAetheryteInfo();
|
|
|
|
bool loadTribeInfo();
|
|
|
|
|
|
|
|
boost::shared_ptr< QuestInfo > getQuestInfo( uint32_t questId );
|
|
|
|
boost::shared_ptr< OpeningInfo > getOpeningInfo( uint32_t openingId );
|
|
|
|
boost::shared_ptr< CustomTalkInfo > getCustomTalkInfo( uint32_t customTalkId );
|
|
|
|
boost::shared_ptr< AetheryteInfo > getAetheryteInfo( uint32_t aetheryteId );
|
|
|
|
boost::shared_ptr< PlaceNameInfo > getPlaceNameInfo( uint32_t placeNameId );
|
|
|
|
boost::shared_ptr< ItemInfo > getItemInfo( uint32_t catalogId );
|
|
|
|
boost::shared_ptr< RaceInfo > getRaceInfo( uint32_t raceId );
|
|
|
|
boost::shared_ptr< EventItemInfo > getEventItemInfo( uint32_t eventItemId );
|
|
|
|
boost::shared_ptr< LevelInfo > getLevelInfo( uint32_t levelId );
|
|
|
|
|
|
|
|
const std::vector< boost::shared_ptr< AetheryteInfo > > getAetheryteInfoForZone( uint16_t zoneId );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|