From b26236c99b35a79a7204100c0027807d7857070b Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 9 Jan 2018 23:44:02 +0100 Subject: [PATCH 01/45] another event rewrite approach --- src/common/Common.h | 16 ++- .../Network/PacketDef/Zone/ServerZoneDef.h | 2 +- src/servers/sapphire_api/Forwards.h | 4 +- .../sapphire_zone/Action/EventAction.cpp | 2 +- src/servers/sapphire_zone/Actor/Player.cpp | 2 +- src/servers/sapphire_zone/Actor/Player.h | 19 ++-- .../sapphire_zone/Actor/PlayerEvent.cpp | 32 +++--- src/servers/sapphire_zone/Event/Director.cpp | 1 + src/servers/sapphire_zone/Event/Director.h | 45 ++++++++ src/servers/sapphire_zone/Event/Event.cpp | 73 ------------ src/servers/sapphire_zone/Event/Event.h | 78 ------------- .../sapphire_zone/Event/EventHandler.cpp | 65 +++++++++++ .../sapphire_zone/Event/EventHandler.h | 106 ++++++++++++++++++ .../sapphire_zone/Event/EventHelper.cpp | 4 +- src/servers/sapphire_zone/Forwards.h | 3 +- .../sapphire_zone/Script/ScriptManager.cpp | 14 +-- 16 files changed, 271 insertions(+), 195 deletions(-) create mode 100644 src/servers/sapphire_zone/Event/Director.cpp create mode 100644 src/servers/sapphire_zone/Event/Director.h delete mode 100644 src/servers/sapphire_zone/Event/Event.cpp delete mode 100644 src/servers/sapphire_zone/Event/Event.h create mode 100644 src/servers/sapphire_zone/Event/EventHandler.cpp create mode 100644 src/servers/sapphire_zone/Event/EventHandler.h diff --git a/src/common/Common.h b/src/common/Common.h index 634c1828..5f27478d 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -322,19 +322,27 @@ namespace Common { enum EventType : uint16_t { Quest = 0x0001, - ChocoRent = 0x0002, + Warp = 0x0002, Shop = 0x0004, Aetheryte = 0x0005, - GuildLeveAssign = 0x0006, + GuildLeveAssignment = 0x0006, DefaultTalk = 0x0009, CustomTalk = 0x000B, + CompanyLeveOfficer = 0x000C, CraftLeve = 0x000E, - ChocoPort = 0x0012, + GimmickAccessor = 0x000F, + GimmickBill = 0x0010, + GimmickRect = 0x0011, + ChocoboTaxiStand = 0x0012, Opening = 0x0013, + ExitRange = 0x0014, GCShop = 0x0016, GuildOrderGuide = 0x0017, GuildOrderOfficer = 0x0018, - Stories = 0x001A, + ContentNpc = 0x0019, + Story = 0x001A, + SpecialShop = 0x001B, + BahamutGuide = 0x001C, FcTalk = 0x001F, }; diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 53a5c50d..a4d6e1c2 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -365,7 +365,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket uint32_t bNPCName; uint32_t u18; uint32_t u19; - uint32_t u20; + uint32_t directorId; uint32_t ownerId; uint32_t u22; uint32_t hPMax; diff --git a/src/servers/sapphire_api/Forwards.h b/src/servers/sapphire_api/Forwards.h index 56d3b92d..bdffff9f 100644 --- a/src/servers/sapphire_api/Forwards.h +++ b/src/servers/sapphire_api/Forwards.h @@ -45,9 +45,9 @@ namespace Core namespace Event { - class Event; + class EventHandler; - typedef boost::shared_ptr EventPtr; + typedef boost::shared_ptr EventPtr; } namespace Action diff --git a/src/servers/sapphire_zone/Action/EventAction.cpp b/src/servers/sapphire_zone/Action/EventAction.cpp index b174bdad..0aa85bfc 100644 --- a/src/servers/sapphire_zone/Action/EventAction.cpp +++ b/src/servers/sapphire_zone/Action/EventAction.cpp @@ -6,7 +6,7 @@ #include "Network/PacketWrappers/ActorControlPacket142.h" #include "Network/PacketWrappers/ActorControlPacket143.h" #include "Actor/Player.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" extern Core::Logger g_log; extern Core::Data::ExdData g_exdData; diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index 6365098b..eecd4f2c 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -32,7 +32,7 @@ #include "Inventory/Item.h" #include "Inventory/Inventory.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" #include "Action/Action.h" #include "Action/EventAction.h" #include "Action/EventItemAction.h" diff --git a/src/servers/sapphire_zone/Actor/Player.h b/src/servers/sapphire_zone/Actor/Player.h index ea7b7027..03e00b15 100644 --- a/src/servers/sapphire_zone/Actor/Player.h +++ b/src/servers/sapphire_zone/Actor/Player.h @@ -7,6 +7,7 @@ #include "Actor.h" #include "Inventory/Inventory.h" +#include "Event/EventHandler.h" #include #include @@ -50,31 +51,33 @@ public: /*! start an event item action */ void eventItemActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, ActionCallback interruptCallback, uint64_t additional ); /*! start/register a normal event */ - void eventStart( uint64_t actorId, uint32_t eventId, uint8_t eventParam, uint8_t eventParam1, uint32_t eventParam2 ); + void eventStart( uint64_t actorId, uint32_t eventId, Event::EventHandler::EventType eventParam, uint8_t eventParam1, uint32_t eventParam2 ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, Scripting::EventReturnCallback eventReturnCallback ); + uint32_t eventParam2, uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, Scripting::EventReturnCallback eventReturnCallback ); + uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ - void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, Scripting::EventReturnCallback eventReturnCallback ); + void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags ); /*! finish / unregister an event */ void eventFinish( uint32_t eventId, uint32_t freePlayer ); /*! add an event to the event array */ - void addEvent( Event::EventPtr pEvent ); + void addEvent( Event::EventHandlerPtr pEvent ); /*! retrieve an event from the event array */ - Event::EventPtr getEvent( uint32_t eventId ); + Event::EventHandlerPtr getEvent( uint32_t eventId ); /*! get number of active events */ size_t getEventCount(); /*! remove an event from the event array */ void removeEvent( uint32_t eventId ); /*! return the eventlist */ - std::map< uint32_t, Event::EventPtr >& eventList(); + std::map< uint32_t, Event::EventHandlerPtr >& eventList(); void checkEvent( uint32_t eventId ); @@ -600,7 +603,7 @@ private: uint16_t m_itemLevel; InventoryPtr m_pInventory; - std::map< uint32_t, Event::EventPtr > m_eventMap; + std::map< uint32_t, Event::EventHandlerPtr > m_eventMap; std::map< uint32_t, uint8_t > m_playerIdToSpawnIdMap; // maps player to spawn id std::queue< uint8_t > m_freeSpawnIdQueue; // queue with spawn ids free to be assigned std::queue< uint8_t > m_freeHateSlotQueue; // queue with "hate slots" free to be assigned diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index a48aea17..b1ec4f57 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -21,8 +21,8 @@ #include "Action/EventAction.h" #include "Action/EventItemAction.h" -#include "Event/Event.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" +#include "Event/EventHandler.h" #include "ServerZone.h" extern Core::Logger g_log; @@ -32,23 +32,23 @@ using namespace Core::Common; using namespace Core::Network::Packets; using namespace Core::Network::Packets::Server; -void Core::Entity::Player::addEvent( Event::EventPtr pEvent ) +void Core::Entity::Player::addEvent( Event::EventHandlerPtr pEvent ) { m_eventMap[pEvent->getId()] = pEvent; } -std::map< uint32_t, Core::Event::EventPtr >& Core::Entity::Player::eventList() +std::map< uint32_t, Core::Event::EventHandlerPtr >& Core::Entity::Player::eventList() { return m_eventMap; } -Core::Event::EventPtr Core::Entity::Player::getEvent( uint32_t eventId ) +Core::Event::EventHandlerPtr Core::Entity::Player::getEvent( uint32_t eventId ) { auto it = m_eventMap.find( eventId ); if( it != m_eventMap.end() ) return it->second; - return Event::EventPtr( nullptr ); + return Event::EventHandlerPtr( nullptr ); } size_t Core::Entity::Player::getEventCount() @@ -76,10 +76,10 @@ void Core::Entity::Player::checkEvent( uint32_t eventId ) void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, - uint8_t eventType, uint8_t eventParam1, + Event::EventHandler::EventType eventType, uint8_t eventParam1, uint32_t eventParam2 ) { - Event::EventPtr newEvent( new Event::Event( actorId, eventId, eventType, eventParam1, eventParam2 ) ); + Event::EventHandlerPtr newEvent( new Event::EventHandler( actorId, eventId, eventType, eventParam2 ) ); addEvent( newEvent ); setStateFlag( PlayerStateFlag::Occupied2 ); @@ -99,7 +99,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, } void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, - uint32_t flags, Scripting::EventReturnCallback eventCallback ) + uint32_t flags, Event::EventHandler::SceneReturnCallback eventCallback ) { eventPlay( eventId, scene, flags, 0, 0, eventCallback ); } @@ -111,7 +111,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, - uint32_t eventParam3, Scripting::EventReturnCallback eventCallback ) + uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) { @@ -124,7 +124,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) @@ -143,7 +143,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, - uint32_t eventParam3, uint32_t eventParam4, Scripting::EventReturnCallback eventCallback ) + uint32_t eventParam3, uint32_t eventParam4, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) { @@ -156,7 +156,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) @@ -183,7 +183,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) return; } - if( getEventCount() > 1 && pEvent->getEventType() != Event::Event::Nest ) + if( getEventCount() > 1 && pEvent->getEventType() != Event::EventHandler::Nest ) { // this is the parent of a nested event, we can't finish it until the parent finishes return; @@ -191,7 +191,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) switch( pEvent->getEventType() ) { - case Event::Event::Nest: + case Event::EventHandler::Nest: { queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam3() ) ); removeEvent( pEvent->getId() ); @@ -249,7 +249,7 @@ void Core::Entity::Player::eventActionStart( uint32_t eventId, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) diff --git a/src/servers/sapphire_zone/Event/Director.cpp b/src/servers/sapphire_zone/Event/Director.cpp new file mode 100644 index 00000000..79e7142b --- /dev/null +++ b/src/servers/sapphire_zone/Event/Director.cpp @@ -0,0 +1 @@ +#include "Director.h" diff --git a/src/servers/sapphire_zone/Event/Director.h b/src/servers/sapphire_zone/Event/Director.h new file mode 100644 index 00000000..11af59fe --- /dev/null +++ b/src/servers/sapphire_zone/Event/Director.h @@ -0,0 +1,45 @@ +#ifndef SAPPHIRE_DIRECTOR_H +#define SAPPHIRE_DIRECTOR_H + +#include + +#include "Forwards.h" + +namespace Core { +namespace Event { + +/*! +\class Director +\brief Base class for all Directors implements sequence and variables + +\author Mordred +*/ + +class Director +{ +private: + /*! Id of the director */ + uint32_t m_id; + + /*! currect sequence */ + uint8_t m_sequence; + + /*! current branch */ + uint8_t m_branch; + + /*! raw storage for flags/vars */ + uint8_t m_unionData[10]; + +public: + uint8_t getId() const; + uint8_t getSequence() const; + +}; + + +} +} + + + +#endif //SAPPHIRE_DIRECTOR_H diff --git a/src/servers/sapphire_zone/Event/Event.cpp b/src/servers/sapphire_zone/Event/Event.cpp deleted file mode 100644 index ee1a3f6e..00000000 --- a/src/servers/sapphire_zone/Event/Event.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "Event.h" - -Core::Event::Event::Event( uint64_t actorId, uint32_t eventId, uint8_t eventType, uint8_t eventParam2, uint32_t eventParam3 ) - : m_actorId( actorId ), - m_eventId( eventId ), - m_playedScene( false ) -{ - - m_param1 = static_cast< uint16_t >( eventId ); - m_param2 = static_cast< uint16_t >( eventId >> 16 ); - - m_eventType = eventType; - m_eventParam2 = eventParam2; - m_eventParam3 = eventParam3; - - m_callback = nullptr; -} - -uint64_t Core::Event::Event::getActorId() const -{ - return m_actorId; -} - -uint32_t Core::Event::Event::getId() const -{ - return m_eventId; -} - -uint32_t Core::Event::Event::getParam1() const -{ - return m_param1; -} - -uint16_t Core::Event::Event::getParam2() const -{ - return m_param2; -} - -uint8_t Core::Event::Event::getEventType() const -{ - return m_eventType; -} - -uint32_t Core::Event::Event::getEventParam2() const -{ - return m_eventParam2; -} - -uint32_t Core::Event::Event::getEventParam3() const -{ - return m_eventParam3; -} - -Core::Scripting::EventReturnCallback Core::Event::Event::getEventReturnCallback() const -{ - return m_callback; -} - -void Core::Event::Event::setEventReturnCallback( Scripting::EventReturnCallback callback ) -{ - m_callback = callback; -} - - -bool Core::Event::Event::hasPlayedScene() const -{ - return m_playedScene; -} - -void Core::Event::Event::setPlayedScene( bool playedScene ) -{ - m_playedScene = playedScene; -} diff --git a/src/servers/sapphire_zone/Event/Event.h b/src/servers/sapphire_zone/Event/Event.h deleted file mode 100644 index 8935cd22..00000000 --- a/src/servers/sapphire_zone/Event/Event.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _EVENT_H -#define _EVENT_H - -#include "../Forwards.h" - -namespace Core { - namespace Event { - - class Event - { - public: - Event( uint64_t actorId, uint32_t eventId, uint8_t eventType, uint8_t eventParam2, uint32_t eventParam3 ); - - ~Event() {} - - uint64_t getActorId() const; - - uint32_t getId() const; - - uint32_t getParam1() const; - - uint16_t getParam2() const; - - uint8_t getEventType() const; - - uint32_t getEventParam2() const; - - uint32_t getEventParam3() const; - - bool hasPlayedScene() const; - - void setPlayedScene( bool playedScene ); - - Scripting::EventReturnCallback getEventReturnCallback() const; - - void setEventReturnCallback( Scripting::EventReturnCallback callback ); - - enum EventType : uint8_t - { - Talk = 1, - Emote = 2, - DistanceBelow = 3, - DistanceOver = 4, - BattleReward = 5, - Craft = 6, - Nest = 7, - Item = 8, - Drop = 9, - WithinRange = 10, - OutsideRange = 11, - GameStart = 12, - GameProgress = 13, - EnterTerritory = 15, - GameComeBack = 17, - ActionResult = 18, - MateriaCraft = 19, - Fishing = 20, - UI = 21, - Housing = 22, - Say = 23, - TableGame = 24, - }; - - protected: - uint64_t m_actorId; - uint32_t m_eventId; - uint32_t m_param1; - uint16_t m_param2; - uint8_t m_eventType; - uint8_t m_eventParam2; - uint32_t m_eventParam3; - bool m_playedScene; - Scripting::EventReturnCallback m_callback; - }; - - } -} -#endif diff --git a/src/servers/sapphire_zone/Event/EventHandler.cpp b/src/servers/sapphire_zone/Event/EventHandler.cpp new file mode 100644 index 00000000..f863c6e3 --- /dev/null +++ b/src/servers/sapphire_zone/Event/EventHandler.cpp @@ -0,0 +1,65 @@ +#include "EventHandler.h" + +Core::Event::EventHandler::EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ) : + m_actorId( actorId ), + m_eventId( eventId ), + m_eventType( eventType ), + m_playedScene( false ) +{ + m_entryId = static_cast< uint16_t >( eventId ); + m_type = static_cast< uint16_t >( eventId >> 16 ); + + m_eventParam3 = eventParam3; + + m_callback = nullptr; +} + +uint64_t Core::Event::EventHandler::getActorId() const +{ + return m_actorId; +} + +uint32_t Core::Event::EventHandler::getId() const +{ + return m_eventId; +} + +uint8_t Core::Event::EventHandler::getEventType() const +{ + return m_eventType; +} + +uint16_t Core::Event::EventHandler::getType() const +{ + return m_type; +} + +uint16_t Core::Event::EventHandler::getEntryId() const +{ + return m_entryId; +} + +uint32_t Core::Event::EventHandler::getEventParam3() const +{ + return m_eventParam3; +} + +Core::Event::EventHandler::SceneReturnCallback Core::Event::EventHandler::getEventReturnCallback() const +{ + return m_callback; +} + +void Core::Event::EventHandler::setEventReturnCallback( SceneReturnCallback callback ) +{ + m_callback = callback; +} + +bool Core::Event::EventHandler::hasPlayedScene() const +{ + return m_playedScene; +} + +void Core::Event::EventHandler::setPlayedScene( bool playedScene ) +{ + m_playedScene = playedScene; +} diff --git a/src/servers/sapphire_zone/Event/EventHandler.h b/src/servers/sapphire_zone/Event/EventHandler.h new file mode 100644 index 00000000..5720d6f9 --- /dev/null +++ b/src/servers/sapphire_zone/Event/EventHandler.h @@ -0,0 +1,106 @@ +#ifndef _EVENT_H +#define _EVENT_H + +#include "../Forwards.h" + +namespace Core { + namespace Event { + + class EventHandler + { + public: + enum EventType : uint8_t + { + Talk = 1, + Emote = 2, + DistanceBelow = 3, + DistanceOver = 4, + BattleReward = 5, + Craft = 6, + Nest = 7, + Item = 8, + Drop = 9, + WithinRange = 10, + OutsideRange = 11, + GameStart = 12, + GameProgress = 13, + EnterTerritory = 15, + GameComeBack = 17, + ActionResult = 18, + MateriaCraft = 19, + Fishing = 20, + UI = 21, + Housing = 22, + Say = 23, + TableGame = 24, + }; + + enum EventHandlerType : uint16_t + { + Quest = 0x0001, + Warp = 0x0002, + Shop = 0x0004, + Aetheryte = 0x0005, + GuildLeveAssignment = 0x0006, + DefaultTalk = 0x0009, + CustomTalk = 0x000B, + CompanyLeveOfficer = 0x000C, + CraftLeve = 0x000E, + GimmickAccessor = 0x000F, + GimmickBill = 0x0010, + GimmickRect = 0x0011, + ChocoboTaxiStand = 0x0012, + Opening = 0x0013, + ExitRange = 0x0014, + GCShop = 0x0016, + GuildOrderGuide = 0x0017, + GuildOrderOfficer = 0x0018, + ContentNpc = 0x0019, + Story = 0x001A, + SpecialShop = 0x001B, + BahamutGuide = 0x001C, + FcTalk = 0x001F, + }; + + using SceneReturnCallback = std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t ) > ; + + EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ); + + ~EventHandler() {} + + uint64_t getActorId() const; + + uint32_t getId() const; + + uint16_t getType() const; + + uint16_t getEntryId() const; + + uint8_t getEventType() const; + + uint32_t getEventParam3() const; + + bool hasPlayedScene() const; + + void setPlayedScene( bool playedScene ); + + SceneReturnCallback getEventReturnCallback() const; + + void setEventReturnCallback( SceneReturnCallback callback ); + + + + protected: + uint64_t m_actorId; + uint32_t m_eventId; + uint16_t m_entryId; + uint16_t m_type; + uint8_t m_eventType; + uint32_t m_eventParam3; + bool m_playedScene; + SceneReturnCallback m_callback; + }; + + } +} +#endif diff --git a/src/servers/sapphire_zone/Event/EventHelper.cpp b/src/servers/sapphire_zone/Event/EventHelper.cpp index 9d90cc3e..6438ab6f 100644 --- a/src/servers/sapphire_zone/Event/EventHelper.cpp +++ b/src/servers/sapphire_zone/Event/EventHelper.cpp @@ -1,5 +1,5 @@ #include "EventHelper.h" -#include "Event.h" +#include "EventHandler.h" #include #include @@ -51,7 +51,7 @@ std::string Core::Event::getEventName( uint32_t eventId ) return "Aetheryte"; return "Aethernet"; } - case EventType::ChocoPort: + case EventType::Warp: { return "ChocoboTaxi"; } diff --git a/src/servers/sapphire_zone/Forwards.h b/src/servers/sapphire_zone/Forwards.h index 8dc06545..40fcc5c0 100644 --- a/src/servers/sapphire_zone/Forwards.h +++ b/src/servers/sapphire_zone/Forwards.h @@ -36,7 +36,7 @@ namespace Core namespace Event { - TYPE_FORWARD( Event ); + TYPE_FORWARD( EventHandler ); } namespace Action @@ -71,7 +71,6 @@ namespace Core namespace Scripting { class NativeScriptManager; - typedef std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t ) > EventReturnCallback; } typedef std::function< void( Entity::Player&, uint32_t, uint64_t ) > ActionCallback; diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 5188ae23..3073c2e5 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -8,7 +8,7 @@ #include "Actor/Player.h" #include "Actor/BattleNpc.h" #include "ServerZone.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" #include "Event/EventHelper.h" #include "StatusEffect/StatusEffect.h" #include "Network/PacketWrappers/ServerNoticePacket.h" @@ -171,7 +171,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac { player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::Event::Talk, 0, 0 ); + player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); script->onTalk( eventId, player, actorId ); @@ -206,7 +206,7 @@ bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, u auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::EnterTerritory, 0, player.getZoneId() ); + player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); script->onEnterZone( player, eventId, param1, param2 ); @@ -229,7 +229,7 @@ bool Core::Scripting::ScriptManager::onWithinRange( Entity::Player& player, uint auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); script->onWithinRange( player, eventId, param1, x, y, z ); @@ -251,7 +251,7 @@ bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uin auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); script->onOutsideRange( player, eventId, param1, x, y, z ); @@ -274,7 +274,7 @@ bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t a { player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::Event::Emote, 0, emoteId ); + player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); script->onEmote( actorId, eventId, emoteId, player ); @@ -367,7 +367,7 @@ bool Core::Scripting::ScriptManager::onEventItem( Entity::Player& player, uint32 auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( targetId, eventId, Event::Event::Item, 0, 0 ); + player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); script->onEventItem( player, eventItemId, eventId, castTime, targetId ); From 0f16ad48123688fcec50c03ef7869081404f5933 Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 9 Jan 2018 23:50:54 +0100 Subject: [PATCH 02/45] Another approach at event improvements --- src/common/Common.h | 16 ++- .../Network/PacketDef/Zone/ServerZoneDef.h | 2 +- src/servers/sapphire_api/Forwards.h | 4 +- .../sapphire_zone/Action/EventAction.cpp | 2 +- src/servers/sapphire_zone/Actor/Player.cpp | 2 +- src/servers/sapphire_zone/Actor/Player.h | 19 ++-- .../sapphire_zone/Actor/PlayerEvent.cpp | 32 +++--- src/servers/sapphire_zone/Event/Director.cpp | 1 + src/servers/sapphire_zone/Event/Director.h | 45 ++++++++ src/servers/sapphire_zone/Event/Event.cpp | 73 ------------ src/servers/sapphire_zone/Event/Event.h | 78 ------------- .../sapphire_zone/Event/EventHandler.cpp | 65 +++++++++++ .../sapphire_zone/Event/EventHandler.h | 106 ++++++++++++++++++ .../sapphire_zone/Event/EventHelper.cpp | 4 +- src/servers/sapphire_zone/Forwards.h | 3 +- .../sapphire_zone/Script/ScriptManager.cpp | 14 +-- 16 files changed, 271 insertions(+), 195 deletions(-) create mode 100644 src/servers/sapphire_zone/Event/Director.cpp create mode 100644 src/servers/sapphire_zone/Event/Director.h delete mode 100644 src/servers/sapphire_zone/Event/Event.cpp delete mode 100644 src/servers/sapphire_zone/Event/Event.h create mode 100644 src/servers/sapphire_zone/Event/EventHandler.cpp create mode 100644 src/servers/sapphire_zone/Event/EventHandler.h diff --git a/src/common/Common.h b/src/common/Common.h index 634c1828..5f27478d 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -322,19 +322,27 @@ namespace Common { enum EventType : uint16_t { Quest = 0x0001, - ChocoRent = 0x0002, + Warp = 0x0002, Shop = 0x0004, Aetheryte = 0x0005, - GuildLeveAssign = 0x0006, + GuildLeveAssignment = 0x0006, DefaultTalk = 0x0009, CustomTalk = 0x000B, + CompanyLeveOfficer = 0x000C, CraftLeve = 0x000E, - ChocoPort = 0x0012, + GimmickAccessor = 0x000F, + GimmickBill = 0x0010, + GimmickRect = 0x0011, + ChocoboTaxiStand = 0x0012, Opening = 0x0013, + ExitRange = 0x0014, GCShop = 0x0016, GuildOrderGuide = 0x0017, GuildOrderOfficer = 0x0018, - Stories = 0x001A, + ContentNpc = 0x0019, + Story = 0x001A, + SpecialShop = 0x001B, + BahamutGuide = 0x001C, FcTalk = 0x001F, }; diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index 53a5c50d..a4d6e1c2 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -365,7 +365,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket uint32_t bNPCName; uint32_t u18; uint32_t u19; - uint32_t u20; + uint32_t directorId; uint32_t ownerId; uint32_t u22; uint32_t hPMax; diff --git a/src/servers/sapphire_api/Forwards.h b/src/servers/sapphire_api/Forwards.h index 56d3b92d..bdffff9f 100644 --- a/src/servers/sapphire_api/Forwards.h +++ b/src/servers/sapphire_api/Forwards.h @@ -45,9 +45,9 @@ namespace Core namespace Event { - class Event; + class EventHandler; - typedef boost::shared_ptr EventPtr; + typedef boost::shared_ptr EventPtr; } namespace Action diff --git a/src/servers/sapphire_zone/Action/EventAction.cpp b/src/servers/sapphire_zone/Action/EventAction.cpp index b174bdad..0aa85bfc 100644 --- a/src/servers/sapphire_zone/Action/EventAction.cpp +++ b/src/servers/sapphire_zone/Action/EventAction.cpp @@ -6,7 +6,7 @@ #include "Network/PacketWrappers/ActorControlPacket142.h" #include "Network/PacketWrappers/ActorControlPacket143.h" #include "Actor/Player.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" extern Core::Logger g_log; extern Core::Data::ExdData g_exdData; diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index 6365098b..eecd4f2c 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -32,7 +32,7 @@ #include "Inventory/Item.h" #include "Inventory/Inventory.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" #include "Action/Action.h" #include "Action/EventAction.h" #include "Action/EventItemAction.h" diff --git a/src/servers/sapphire_zone/Actor/Player.h b/src/servers/sapphire_zone/Actor/Player.h index ea7b7027..03e00b15 100644 --- a/src/servers/sapphire_zone/Actor/Player.h +++ b/src/servers/sapphire_zone/Actor/Player.h @@ -7,6 +7,7 @@ #include "Actor.h" #include "Inventory/Inventory.h" +#include "Event/EventHandler.h" #include #include @@ -50,31 +51,33 @@ public: /*! start an event item action */ void eventItemActionStart( uint32_t eventId, uint32_t action, ActionCallback finishCallback, ActionCallback interruptCallback, uint64_t additional ); /*! start/register a normal event */ - void eventStart( uint64_t actorId, uint32_t eventId, uint8_t eventParam, uint8_t eventParam1, uint32_t eventParam2 ); + void eventStart( uint64_t actorId, uint32_t eventId, Event::EventHandler::EventType eventParam, uint8_t eventParam1, uint32_t eventParam2 ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, Scripting::EventReturnCallback eventReturnCallback ); + uint32_t eventParam2, uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, - uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, Scripting::EventReturnCallback eventReturnCallback ); + uint32_t eventParam2, uint32_t eventParam3, uint32_t eventParam4, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ - void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, Scripting::EventReturnCallback eventReturnCallback ); + void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, + Event::EventHandler::SceneReturnCallback eventReturnCallback ); /*! play a subevent */ void eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags ); /*! finish / unregister an event */ void eventFinish( uint32_t eventId, uint32_t freePlayer ); /*! add an event to the event array */ - void addEvent( Event::EventPtr pEvent ); + void addEvent( Event::EventHandlerPtr pEvent ); /*! retrieve an event from the event array */ - Event::EventPtr getEvent( uint32_t eventId ); + Event::EventHandlerPtr getEvent( uint32_t eventId ); /*! get number of active events */ size_t getEventCount(); /*! remove an event from the event array */ void removeEvent( uint32_t eventId ); /*! return the eventlist */ - std::map< uint32_t, Event::EventPtr >& eventList(); + std::map< uint32_t, Event::EventHandlerPtr >& eventList(); void checkEvent( uint32_t eventId ); @@ -600,7 +603,7 @@ private: uint16_t m_itemLevel; InventoryPtr m_pInventory; - std::map< uint32_t, Event::EventPtr > m_eventMap; + std::map< uint32_t, Event::EventHandlerPtr > m_eventMap; std::map< uint32_t, uint8_t > m_playerIdToSpawnIdMap; // maps player to spawn id std::queue< uint8_t > m_freeSpawnIdQueue; // queue with spawn ids free to be assigned std::queue< uint8_t > m_freeHateSlotQueue; // queue with "hate slots" free to be assigned diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index a48aea17..b1ec4f57 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -21,8 +21,8 @@ #include "Action/EventAction.h" #include "Action/EventItemAction.h" -#include "Event/Event.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" +#include "Event/EventHandler.h" #include "ServerZone.h" extern Core::Logger g_log; @@ -32,23 +32,23 @@ using namespace Core::Common; using namespace Core::Network::Packets; using namespace Core::Network::Packets::Server; -void Core::Entity::Player::addEvent( Event::EventPtr pEvent ) +void Core::Entity::Player::addEvent( Event::EventHandlerPtr pEvent ) { m_eventMap[pEvent->getId()] = pEvent; } -std::map< uint32_t, Core::Event::EventPtr >& Core::Entity::Player::eventList() +std::map< uint32_t, Core::Event::EventHandlerPtr >& Core::Entity::Player::eventList() { return m_eventMap; } -Core::Event::EventPtr Core::Entity::Player::getEvent( uint32_t eventId ) +Core::Event::EventHandlerPtr Core::Entity::Player::getEvent( uint32_t eventId ) { auto it = m_eventMap.find( eventId ); if( it != m_eventMap.end() ) return it->second; - return Event::EventPtr( nullptr ); + return Event::EventHandlerPtr( nullptr ); } size_t Core::Entity::Player::getEventCount() @@ -76,10 +76,10 @@ void Core::Entity::Player::checkEvent( uint32_t eventId ) void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, - uint8_t eventType, uint8_t eventParam1, + Event::EventHandler::EventType eventType, uint8_t eventParam1, uint32_t eventParam2 ) { - Event::EventPtr newEvent( new Event::Event( actorId, eventId, eventType, eventParam1, eventParam2 ) ); + Event::EventHandlerPtr newEvent( new Event::EventHandler( actorId, eventId, eventType, eventParam2 ) ); addEvent( newEvent ); setStateFlag( PlayerStateFlag::Occupied2 ); @@ -99,7 +99,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, } void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, - uint32_t flags, Scripting::EventReturnCallback eventCallback ) + uint32_t flags, Event::EventHandler::SceneReturnCallback eventCallback ) { eventPlay( eventId, scene, flags, 0, 0, eventCallback ); } @@ -111,7 +111,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, - uint32_t eventParam3, Scripting::EventReturnCallback eventCallback ) + uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) { @@ -124,7 +124,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) @@ -143,7 +143,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, - uint32_t eventParam3, uint32_t eventParam4, Scripting::EventReturnCallback eventCallback ) + uint32_t eventParam3, uint32_t eventParam4, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) { @@ -156,7 +156,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) @@ -183,7 +183,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) return; } - if( getEventCount() > 1 && pEvent->getEventType() != Event::Event::Nest ) + if( getEventCount() > 1 && pEvent->getEventType() != Event::EventHandler::Nest ) { // this is the parent of a nested event, we can't finish it until the parent finishes return; @@ -191,7 +191,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) switch( pEvent->getEventType() ) { - case Event::Event::Nest: + case Event::EventHandler::Nest: { queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam3() ) ); removeEvent( pEvent->getId() ); @@ -249,7 +249,7 @@ void Core::Entity::Player::eventActionStart( uint32_t eventId, if( !pEvent && getEventCount() ) { // We're trying to play a nested event, need to start it first. - eventStart( getId(), eventId, Event::Event::Nest, 0, 0 ); + eventStart( getId(), eventId, Event::EventHandler::Nest, 0, 0 ); pEvent = getEvent( eventId ); } else if( !pEvent ) diff --git a/src/servers/sapphire_zone/Event/Director.cpp b/src/servers/sapphire_zone/Event/Director.cpp new file mode 100644 index 00000000..79e7142b --- /dev/null +++ b/src/servers/sapphire_zone/Event/Director.cpp @@ -0,0 +1 @@ +#include "Director.h" diff --git a/src/servers/sapphire_zone/Event/Director.h b/src/servers/sapphire_zone/Event/Director.h new file mode 100644 index 00000000..11af59fe --- /dev/null +++ b/src/servers/sapphire_zone/Event/Director.h @@ -0,0 +1,45 @@ +#ifndef SAPPHIRE_DIRECTOR_H +#define SAPPHIRE_DIRECTOR_H + +#include + +#include "Forwards.h" + +namespace Core { +namespace Event { + +/*! +\class Director +\brief Base class for all Directors implements sequence and variables + +\author Mordred +*/ + +class Director +{ +private: + /*! Id of the director */ + uint32_t m_id; + + /*! currect sequence */ + uint8_t m_sequence; + + /*! current branch */ + uint8_t m_branch; + + /*! raw storage for flags/vars */ + uint8_t m_unionData[10]; + +public: + uint8_t getId() const; + uint8_t getSequence() const; + +}; + + +} +} + + + +#endif //SAPPHIRE_DIRECTOR_H diff --git a/src/servers/sapphire_zone/Event/Event.cpp b/src/servers/sapphire_zone/Event/Event.cpp deleted file mode 100644 index ee1a3f6e..00000000 --- a/src/servers/sapphire_zone/Event/Event.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "Event.h" - -Core::Event::Event::Event( uint64_t actorId, uint32_t eventId, uint8_t eventType, uint8_t eventParam2, uint32_t eventParam3 ) - : m_actorId( actorId ), - m_eventId( eventId ), - m_playedScene( false ) -{ - - m_param1 = static_cast< uint16_t >( eventId ); - m_param2 = static_cast< uint16_t >( eventId >> 16 ); - - m_eventType = eventType; - m_eventParam2 = eventParam2; - m_eventParam3 = eventParam3; - - m_callback = nullptr; -} - -uint64_t Core::Event::Event::getActorId() const -{ - return m_actorId; -} - -uint32_t Core::Event::Event::getId() const -{ - return m_eventId; -} - -uint32_t Core::Event::Event::getParam1() const -{ - return m_param1; -} - -uint16_t Core::Event::Event::getParam2() const -{ - return m_param2; -} - -uint8_t Core::Event::Event::getEventType() const -{ - return m_eventType; -} - -uint32_t Core::Event::Event::getEventParam2() const -{ - return m_eventParam2; -} - -uint32_t Core::Event::Event::getEventParam3() const -{ - return m_eventParam3; -} - -Core::Scripting::EventReturnCallback Core::Event::Event::getEventReturnCallback() const -{ - return m_callback; -} - -void Core::Event::Event::setEventReturnCallback( Scripting::EventReturnCallback callback ) -{ - m_callback = callback; -} - - -bool Core::Event::Event::hasPlayedScene() const -{ - return m_playedScene; -} - -void Core::Event::Event::setPlayedScene( bool playedScene ) -{ - m_playedScene = playedScene; -} diff --git a/src/servers/sapphire_zone/Event/Event.h b/src/servers/sapphire_zone/Event/Event.h deleted file mode 100644 index 8935cd22..00000000 --- a/src/servers/sapphire_zone/Event/Event.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _EVENT_H -#define _EVENT_H - -#include "../Forwards.h" - -namespace Core { - namespace Event { - - class Event - { - public: - Event( uint64_t actorId, uint32_t eventId, uint8_t eventType, uint8_t eventParam2, uint32_t eventParam3 ); - - ~Event() {} - - uint64_t getActorId() const; - - uint32_t getId() const; - - uint32_t getParam1() const; - - uint16_t getParam2() const; - - uint8_t getEventType() const; - - uint32_t getEventParam2() const; - - uint32_t getEventParam3() const; - - bool hasPlayedScene() const; - - void setPlayedScene( bool playedScene ); - - Scripting::EventReturnCallback getEventReturnCallback() const; - - void setEventReturnCallback( Scripting::EventReturnCallback callback ); - - enum EventType : uint8_t - { - Talk = 1, - Emote = 2, - DistanceBelow = 3, - DistanceOver = 4, - BattleReward = 5, - Craft = 6, - Nest = 7, - Item = 8, - Drop = 9, - WithinRange = 10, - OutsideRange = 11, - GameStart = 12, - GameProgress = 13, - EnterTerritory = 15, - GameComeBack = 17, - ActionResult = 18, - MateriaCraft = 19, - Fishing = 20, - UI = 21, - Housing = 22, - Say = 23, - TableGame = 24, - }; - - protected: - uint64_t m_actorId; - uint32_t m_eventId; - uint32_t m_param1; - uint16_t m_param2; - uint8_t m_eventType; - uint8_t m_eventParam2; - uint32_t m_eventParam3; - bool m_playedScene; - Scripting::EventReturnCallback m_callback; - }; - - } -} -#endif diff --git a/src/servers/sapphire_zone/Event/EventHandler.cpp b/src/servers/sapphire_zone/Event/EventHandler.cpp new file mode 100644 index 00000000..f863c6e3 --- /dev/null +++ b/src/servers/sapphire_zone/Event/EventHandler.cpp @@ -0,0 +1,65 @@ +#include "EventHandler.h" + +Core::Event::EventHandler::EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ) : + m_actorId( actorId ), + m_eventId( eventId ), + m_eventType( eventType ), + m_playedScene( false ) +{ + m_entryId = static_cast< uint16_t >( eventId ); + m_type = static_cast< uint16_t >( eventId >> 16 ); + + m_eventParam3 = eventParam3; + + m_callback = nullptr; +} + +uint64_t Core::Event::EventHandler::getActorId() const +{ + return m_actorId; +} + +uint32_t Core::Event::EventHandler::getId() const +{ + return m_eventId; +} + +uint8_t Core::Event::EventHandler::getEventType() const +{ + return m_eventType; +} + +uint16_t Core::Event::EventHandler::getType() const +{ + return m_type; +} + +uint16_t Core::Event::EventHandler::getEntryId() const +{ + return m_entryId; +} + +uint32_t Core::Event::EventHandler::getEventParam3() const +{ + return m_eventParam3; +} + +Core::Event::EventHandler::SceneReturnCallback Core::Event::EventHandler::getEventReturnCallback() const +{ + return m_callback; +} + +void Core::Event::EventHandler::setEventReturnCallback( SceneReturnCallback callback ) +{ + m_callback = callback; +} + +bool Core::Event::EventHandler::hasPlayedScene() const +{ + return m_playedScene; +} + +void Core::Event::EventHandler::setPlayedScene( bool playedScene ) +{ + m_playedScene = playedScene; +} diff --git a/src/servers/sapphire_zone/Event/EventHandler.h b/src/servers/sapphire_zone/Event/EventHandler.h new file mode 100644 index 00000000..5720d6f9 --- /dev/null +++ b/src/servers/sapphire_zone/Event/EventHandler.h @@ -0,0 +1,106 @@ +#ifndef _EVENT_H +#define _EVENT_H + +#include "../Forwards.h" + +namespace Core { + namespace Event { + + class EventHandler + { + public: + enum EventType : uint8_t + { + Talk = 1, + Emote = 2, + DistanceBelow = 3, + DistanceOver = 4, + BattleReward = 5, + Craft = 6, + Nest = 7, + Item = 8, + Drop = 9, + WithinRange = 10, + OutsideRange = 11, + GameStart = 12, + GameProgress = 13, + EnterTerritory = 15, + GameComeBack = 17, + ActionResult = 18, + MateriaCraft = 19, + Fishing = 20, + UI = 21, + Housing = 22, + Say = 23, + TableGame = 24, + }; + + enum EventHandlerType : uint16_t + { + Quest = 0x0001, + Warp = 0x0002, + Shop = 0x0004, + Aetheryte = 0x0005, + GuildLeveAssignment = 0x0006, + DefaultTalk = 0x0009, + CustomTalk = 0x000B, + CompanyLeveOfficer = 0x000C, + CraftLeve = 0x000E, + GimmickAccessor = 0x000F, + GimmickBill = 0x0010, + GimmickRect = 0x0011, + ChocoboTaxiStand = 0x0012, + Opening = 0x0013, + ExitRange = 0x0014, + GCShop = 0x0016, + GuildOrderGuide = 0x0017, + GuildOrderOfficer = 0x0018, + ContentNpc = 0x0019, + Story = 0x001A, + SpecialShop = 0x001B, + BahamutGuide = 0x001C, + FcTalk = 0x001F, + }; + + using SceneReturnCallback = std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t ) > ; + + EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ); + + ~EventHandler() {} + + uint64_t getActorId() const; + + uint32_t getId() const; + + uint16_t getType() const; + + uint16_t getEntryId() const; + + uint8_t getEventType() const; + + uint32_t getEventParam3() const; + + bool hasPlayedScene() const; + + void setPlayedScene( bool playedScene ); + + SceneReturnCallback getEventReturnCallback() const; + + void setEventReturnCallback( SceneReturnCallback callback ); + + + + protected: + uint64_t m_actorId; + uint32_t m_eventId; + uint16_t m_entryId; + uint16_t m_type; + uint8_t m_eventType; + uint32_t m_eventParam3; + bool m_playedScene; + SceneReturnCallback m_callback; + }; + + } +} +#endif diff --git a/src/servers/sapphire_zone/Event/EventHelper.cpp b/src/servers/sapphire_zone/Event/EventHelper.cpp index 9d90cc3e..6438ab6f 100644 --- a/src/servers/sapphire_zone/Event/EventHelper.cpp +++ b/src/servers/sapphire_zone/Event/EventHelper.cpp @@ -1,5 +1,5 @@ #include "EventHelper.h" -#include "Event.h" +#include "EventHandler.h" #include #include @@ -51,7 +51,7 @@ std::string Core::Event::getEventName( uint32_t eventId ) return "Aetheryte"; return "Aethernet"; } - case EventType::ChocoPort: + case EventType::Warp: { return "ChocoboTaxi"; } diff --git a/src/servers/sapphire_zone/Forwards.h b/src/servers/sapphire_zone/Forwards.h index 8dc06545..40fcc5c0 100644 --- a/src/servers/sapphire_zone/Forwards.h +++ b/src/servers/sapphire_zone/Forwards.h @@ -36,7 +36,7 @@ namespace Core namespace Event { - TYPE_FORWARD( Event ); + TYPE_FORWARD( EventHandler ); } namespace Action @@ -71,7 +71,6 @@ namespace Core namespace Scripting { class NativeScriptManager; - typedef std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t ) > EventReturnCallback; } typedef std::function< void( Entity::Player&, uint32_t, uint64_t ) > ActionCallback; diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 5188ae23..3073c2e5 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -8,7 +8,7 @@ #include "Actor/Player.h" #include "Actor/BattleNpc.h" #include "ServerZone.h" -#include "Event/Event.h" +#include "Event/EventHandler.h" #include "Event/EventHelper.h" #include "StatusEffect/StatusEffect.h" #include "Network/PacketWrappers/ServerNoticePacket.h" @@ -171,7 +171,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac { player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::Event::Talk, 0, 0 ); + player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); script->onTalk( eventId, player, actorId ); @@ -206,7 +206,7 @@ bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, u auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::EnterTerritory, 0, player.getZoneId() ); + player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); script->onEnterZone( player, eventId, param1, param2 ); @@ -229,7 +229,7 @@ bool Core::Scripting::ScriptManager::onWithinRange( Entity::Player& player, uint auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); script->onWithinRange( player, eventId, param1, x, y, z ); @@ -251,7 +251,7 @@ bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uin auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( player.getId(), eventId, Event::Event::WithinRange, 1, param1 ); + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); script->onOutsideRange( player, eventId, param1, x, y, z ); @@ -274,7 +274,7 @@ bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t a { player.sendDebug( "Calling: " + objName + "." + eventName ); - player.eventStart( actorId, eventId, Event::Event::Emote, 0, emoteId ); + player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); script->onEmote( actorId, eventId, emoteId, player ); @@ -367,7 +367,7 @@ bool Core::Scripting::ScriptManager::onEventItem( Entity::Player& player, uint32 auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); if( script ) { - player.eventStart( targetId, eventId, Event::Event::Item, 0, 0 ); + player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); script->onEventItem( player, eventItemId, eventId, castTime, targetId ); From 6d6c71d6af5df6c17dec00bfd1f88ebdf3d386f9 Mon Sep 17 00:00:00 2001 From: Mordred Admin Date: Wed, 10 Jan 2018 10:47:47 +0100 Subject: [PATCH 03/45] Removed redundancy in EventHandler type declarations --- src/common/Common.h | 27 ------------------- .../sapphire_zone/Event/EventHelper.cpp | 10 +++---- .../sapphire_zone/Script/ScriptManager.cpp | 6 ++--- 3 files changed, 8 insertions(+), 35 deletions(-) diff --git a/src/common/Common.h b/src/common/Common.h index 5f27478d..993d8efe 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -319,33 +319,6 @@ namespace Common { }; - enum EventType : uint16_t - { - Quest = 0x0001, - Warp = 0x0002, - Shop = 0x0004, - Aetheryte = 0x0005, - GuildLeveAssignment = 0x0006, - DefaultTalk = 0x0009, - CustomTalk = 0x000B, - CompanyLeveOfficer = 0x000C, - CraftLeve = 0x000E, - GimmickAccessor = 0x000F, - GimmickBill = 0x0010, - GimmickRect = 0x0011, - ChocoboTaxiStand = 0x0012, - Opening = 0x0013, - ExitRange = 0x0014, - GCShop = 0x0016, - GuildOrderGuide = 0x0017, - GuildOrderOfficer = 0x0018, - ContentNpc = 0x0019, - Story = 0x001A, - SpecialShop = 0x001B, - BahamutGuide = 0x001C, - FcTalk = 0x001F, - }; - enum struct ActionAspect : uint8_t { None = 0, // Doesn't imply unaspected diff --git a/src/servers/sapphire_zone/Event/EventHelper.cpp b/src/servers/sapphire_zone/Event/EventHelper.cpp index 6438ab6f..01ad969d 100644 --- a/src/servers/sapphire_zone/Event/EventHelper.cpp +++ b/src/servers/sapphire_zone/Event/EventHelper.cpp @@ -15,7 +15,7 @@ std::string Core::Event::getEventName( uint32_t eventId ) switch( eventType ) { - case EventType::Quest: + case Event::EventHandler::EventHandlerType::Quest: { auto questInfo = g_exdData.getQuestInfo( eventId ); if( !questInfo ) @@ -26,7 +26,7 @@ std::string Core::Event::getEventName( uint32_t eventId ) return questInfo->name_intern.substr( 0, pos ); } - case EventType::CustomTalk: + case Event::EventHandler::EventHandlerType::CustomTalk: { auto customTalkInfo = g_exdData.getCustomTalkInfo( eventId ); if( !customTalkInfo ) @@ -37,21 +37,21 @@ std::string Core::Event::getEventName( uint32_t eventId ) return customTalkInfo->name_intern.substr( 0, pos ); } - case EventType::Opening: + case Event::EventHandler::EventHandlerType::Opening: { auto openingInfo = g_exdData.getOpeningInfo( eventId ); if( openingInfo ) return openingInfo->name; return unknown + "Opening"; } - case EventType::Aetheryte: + case Event::EventHandler::EventHandlerType::Aetheryte: { auto aetherInfo = g_exdData.getAetheryteInfo( eventId & 0xFFFF ); if( aetherInfo->isAetheryte ) return "Aetheryte"; return "Aethernet"; } - case EventType::Warp: + case Event::EventHandler::EventHandlerType::Warp: { return "ChocoboTaxi"; } diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 3073c2e5..ae5361c1 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -158,7 +158,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac uint32_t scriptId = eventId; // aethernet/aetherytes need to be handled separately - if( eventType == Common::EventType::Aetheryte ) + if( eventType == Event::EventHandler::EventHandlerType::Aetheryte ) { auto aetherInfo = g_exdData.getAetheryteInfo( eventId & 0xFFFF ); scriptId = EVENTSCRIPT_AETHERYTE_ID; @@ -179,7 +179,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac } else { - if ( eventType == Common::EventType::Quest ) + if ( eventType == Event::EventHandler::EventHandlerType::Quest ) { auto questInfo = g_exdData.getQuestInfo( eventId ); if ( questInfo ) @@ -284,7 +284,7 @@ bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t a { uint16_t eventType = eventId >> 16; - if( eventType == Common::EventType::Quest ) + if( eventType == Event::EventHandler::EventHandlerType::Quest ) { auto questInfo = g_exdData.getQuestInfo( eventId ); if( questInfo ) From add84d65167f287d7b28be510ab027fa5ae479e3 Mon Sep 17 00:00:00 2001 From: Mordred Admin Date: Thu, 11 Jan 2018 14:59:39 +0100 Subject: [PATCH 04/45] Simplified handling of state flags --- .../sapphire_zone/Action/ActionCast.cpp | 3 --- .../sapphire_zone/Action/ActionMount.cpp | 3 --- .../sapphire_zone/Action/ActionTeleport.cpp | 3 --- .../sapphire_zone/Action/EventAction.cpp | 3 --- .../sapphire_zone/Action/EventItemAction.cpp | 3 --- src/servers/sapphire_zone/Actor/Player.cpp | 27 ++++++++++++------- .../sapphire_zone/Actor/PlayerEvent.cpp | 16 ----------- .../Network/Handlers/ActionHandler.cpp | 1 - 8 files changed, 17 insertions(+), 42 deletions(-) diff --git a/src/servers/sapphire_zone/Action/ActionCast.cpp b/src/servers/sapphire_zone/Action/ActionCast.cpp index 002504fd..b9289b30 100644 --- a/src/servers/sapphire_zone/Action/ActionCast.cpp +++ b/src/servers/sapphire_zone/Action/ActionCast.cpp @@ -58,7 +58,6 @@ void Core::Action::ActionCast::onStart() m_pSource->sendToInRangeSet( castPacket, true ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); } @@ -71,7 +70,6 @@ void Core::Action::ActionCast::onFinish() pPlayer->sendDebug( "onFinish()" ); pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - pPlayer->sendStateFlags(); /*auto control = ActorControlPacket143( m_pTarget->getId(), ActorControlType::Unk7, 0x219, m_id, m_id, m_id, m_id ); @@ -87,7 +85,6 @@ void Core::Action::ActionCast::onInterrupt() m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); diff --git a/src/servers/sapphire_zone/Action/ActionMount.cpp b/src/servers/sapphire_zone/Action/ActionMount.cpp index 6ff6c8b9..5e5a4846 100644 --- a/src/servers/sapphire_zone/Action/ActionMount.cpp +++ b/src/servers/sapphire_zone/Action/ActionMount.cpp @@ -60,7 +60,6 @@ void Core::Action::ActionMount::onStart() m_pSource->sendToInRangeSet( castPacket, true ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); } @@ -73,7 +72,6 @@ void Core::Action::ActionMount::onFinish() pPlayer->sendDebug( "ActionMount::onFinish()" ); pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - pPlayer->sendStateFlags(); ZoneChannelPacket< FFXIVIpcEffect > effectPacket( pPlayer->getId() ); effectPacket.data().targetId = pPlayer->getId(); @@ -100,7 +98,6 @@ void Core::Action::ActionMount::onInterrupt() m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 1, m_id, 0 ); diff --git a/src/servers/sapphire_zone/Action/ActionTeleport.cpp b/src/servers/sapphire_zone/Action/ActionTeleport.cpp index 7e8cec18..bb53e522 100644 --- a/src/servers/sapphire_zone/Action/ActionTeleport.cpp +++ b/src/servers/sapphire_zone/Action/ActionTeleport.cpp @@ -54,7 +54,6 @@ void Core::Action::ActionTeleport::onStart() m_pSource->sendToInRangeSet( castPacket, true ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); } @@ -75,7 +74,6 @@ void Core::Action::ActionTeleport::onFinish() pPlayer->removeCurrency( Inventory::CurrencyType::Gil, m_cost ); pPlayer->unsetStateFlag( PlayerStateFlag::Casting ); - pPlayer->sendStateFlags(); // TODO: not sure if this ever gets sent //auto control = Network::Packets::Server::ActorControlPacket142( m_pSource->getId(), Common::ActorControlType::TeleportDone ); @@ -105,7 +103,6 @@ void Core::Action::ActionTeleport::onInterrupt() return; m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); auto control = ActorControlPacket142( m_pSource->getId(), ActorControlType::CastInterrupt, 0x219, 0x04, m_id, 0 ); diff --git a/src/servers/sapphire_zone/Action/EventAction.cpp b/src/servers/sapphire_zone/Action/EventAction.cpp index 0aa85bfc..869fa089 100644 --- a/src/servers/sapphire_zone/Action/EventAction.cpp +++ b/src/servers/sapphire_zone/Action/EventAction.cpp @@ -54,7 +54,6 @@ void Core::Action::EventAction::onStart() { m_pSource->sendToInRangeSet( control, true ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::SomeFlag ); - m_pSource->getAsPlayer()->sendStateFlags(); } else m_pSource->sendToInRangeSet( control ); @@ -84,7 +83,6 @@ void Core::Action::EventAction::onFinish() if( m_pSource->isPlayer() ) { m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::SomeFlag ); - m_pSource->getAsPlayer()->sendStateFlags(); m_pSource->sendToInRangeSet( control, true ); } else @@ -114,7 +112,6 @@ void Core::Action::EventAction::onInterrupt() m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::NoCombat ); m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Occupied1 ); - m_pSource->getAsPlayer()->sendStateFlags(); m_pSource->sendToInRangeSet( control ); m_pSource->sendToInRangeSet( control1 ); diff --git a/src/servers/sapphire_zone/Action/EventItemAction.cpp b/src/servers/sapphire_zone/Action/EventItemAction.cpp index 3a8c3f78..28ddd8fb 100644 --- a/src/servers/sapphire_zone/Action/EventItemAction.cpp +++ b/src/servers/sapphire_zone/Action/EventItemAction.cpp @@ -56,7 +56,6 @@ void Core::Action::EventItemAction::onStart() m_pSource->sendToInRangeSet( castPacket, true ); m_pSource->getAsPlayer()->setStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); } @@ -78,7 +77,6 @@ void Core::Action::EventItemAction::onFinish() effectPacket.data().effectTarget = static_cast< uint32_t >( m_additional ); m_pSource->getAsPlayer()->unsetStateFlag( Common::PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); m_pSource->sendToInRangeSet( effectPacket, true ); if( m_onActionFinishClb ) @@ -104,7 +102,6 @@ void Core::Action::EventItemAction::onInterrupt() if( m_pSource->isPlayer() ) { m_pSource->getAsPlayer()->unsetStateFlag( PlayerStateFlag::Casting ); - m_pSource->getAsPlayer()->sendStateFlags(); m_pSource->sendToInRangeSet( control, true ); } else diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index eecd4f2c..b2438051 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -308,7 +308,6 @@ void Core::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type ) } setStateFlag( PlayerStateFlag::BetweenAreas ); - sendStateFlags(); auto z_pos = g_zoneMgr.getZonePosition( data->levelId ); @@ -402,7 +401,6 @@ void Core::Entity::Player::setZone( uint32_t zoneId ) // set flags, will be reset automatically by zoning ( only on client side though ) pPlayer->setStateFlag( PlayerStateFlag::BetweenAreas ); pPlayer->setStateFlag( PlayerStateFlag::BetweenAreas1 ); - pPlayer->sendStateFlags(); pPlayer->sendStats(); @@ -580,7 +578,6 @@ void Core::Entity::Player::setNewAdventurer( bool state ) //{ // setStateFlag( PlayerStateFlag::NewAdventurer ); //} - sendStateFlags(); m_bNewAdventurer = state; } @@ -972,6 +969,7 @@ bool Core::Entity::Player::hasStateFlag( Common::PlayerStateFlag flag ) const void Core::Entity::Player::setStateFlag( Common::PlayerStateFlag flag ) { + auto prevOnlineStatus = getOnlineStatus(); int32_t iFlag = static_cast< uint32_t >( flag ); uint16_t index; @@ -979,6 +977,13 @@ void Core::Entity::Player::setStateFlag( Common::PlayerStateFlag flag ) Util::valueToFlagByteIndexValue( iFlag, value, index ); m_stateFlags[index] |= value; + sendStateFlags(); + + auto newOnlineStatus = getOnlineStatus(); + + if( prevOnlineStatus != newOnlineStatus ) + sendToInRangeSet( ActorControlPacket142( getId(), SetStatusIcon, + static_cast< uint8_t >( getOnlineStatus() ) ), true ); } @@ -986,13 +991,7 @@ void Core::Entity::Player::setStateFlags( std::vector< Common::PlayerStateFlag > { for( const auto& flag : flags ) { - int iFlag = static_cast< uint32_t >( flag ); - - uint16_t index; - uint8_t value; - Util::valueToFlagByteIndexValue( iFlag, value, index ); - - m_stateFlags[index] |= value; + setStateFlag( flag ); } } @@ -1006,6 +1005,8 @@ void Core::Entity::Player::unsetStateFlag( Common::PlayerStateFlag flag ) if( !hasStateFlag( flag ) ) return; + auto prevOnlineStatus = getOnlineStatus(); + int32_t iFlag = static_cast< uint32_t >( flag ); uint16_t index; @@ -1013,7 +1014,13 @@ void Core::Entity::Player::unsetStateFlag( Common::PlayerStateFlag flag ) Util::valueToFlagByteIndexValue( iFlag, value, index ); m_stateFlags[index] ^= value; + sendStateFlags(); + auto newOnlineStatus = getOnlineStatus(); + + if( prevOnlineStatus != newOnlineStatus ) + sendToInRangeSet( ActorControlPacket142( getId(), SetStatusIcon, + static_cast< uint8_t >( getOnlineStatus() ) ), true ); } void Core::Entity::Player::update( int64_t currTime ) diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index b1ec4f57..c5bae3e2 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -83,7 +83,6 @@ void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, addEvent( newEvent ); setStateFlag( PlayerStateFlag::Occupied2 ); - sendStateFlags(); EventStartPacket eventStart( getId(), actorId, eventId, eventType, eventParam1, eventParam2 ); @@ -114,11 +113,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t eventParam3, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) - { setStateFlag( PlayerStateFlag::WatchingCutscene ); - sendToInRangeSet( ActorControlPacket142( getId(), SetStatusIcon, - static_cast< uint8_t >( getOnlineStatus() ) ), true ); - } auto pEvent = getEvent( eventId ); if( !pEvent && getEventCount() ) @@ -146,11 +141,7 @@ void Core::Entity::Player::eventPlay( uint32_t eventId, uint32_t scene, uint32_t eventParam3, uint32_t eventParam4, Event::EventHandler::SceneReturnCallback eventCallback ) { if( flags & 0x02 ) - { setStateFlag( PlayerStateFlag::WatchingCutscene ); - sendToInRangeSet( ActorControlPacket142( getId(), SetStatusIcon, - static_cast< uint8_t >( getOnlineStatus() ) ), true ); - } auto pEvent = getEvent( eventId ); if( !pEvent && getEventCount() ) @@ -219,19 +210,12 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) } if( hasStateFlag( PlayerStateFlag::WatchingCutscene ) ) - { unsetStateFlag( PlayerStateFlag::WatchingCutscene ); - sendToInRangeSet( ActorControlPacket142( getId(), SetStatusIcon, - static_cast< uint8_t >( getOnlineStatus() ) ), true ); - } removeEvent( pEvent->getId() ); if( freePlayer == 1 ) - { unsetStateFlag( PlayerStateFlag::Occupied2 ); - sendStateFlags(); - } } void Core::Entity::Player::eventActionStart( uint32_t eventId, diff --git a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp index b1494413..79e5e8ea 100644 --- a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp @@ -196,7 +196,6 @@ void Core::Network::GameConnection::actionHandler( const Packets::GamePacket& in player.unsetStateFlag( PlayerStateFlag::BetweenAreas ); player.unsetStateFlag( PlayerStateFlag::BetweenAreas1 ); - player.sendStateFlags(); break; } From 147ff80f86d49bd4682903cb5bf1373118240887 Mon Sep 17 00:00:00 2001 From: Mordred Date: Sun, 14 Jan 2018 23:54:26 +0100 Subject: [PATCH 05/45] Beginning of splitting eventhandlers, pulling logic out of scriptmanager --- src/servers/sapphire_zone/Actor/Player.h | 2 +- .../sapphire_zone/Actor/PlayerEvent.cpp | 25 ++++++----- .../sapphire_zone/Event/EventHandler.cpp | 20 +++++++-- .../sapphire_zone/Event/EventHandler.h | 13 ++++-- .../sapphire_zone/Network/GameConnection.cpp | 2 +- .../sapphire_zone/Network/GameConnection.h | 2 + .../Network/Handlers/EventHandlers.cpp | 45 ++++++++++++++++--- .../sapphire_zone/Script/ScriptManager.cpp | 30 ------------- 8 files changed, 83 insertions(+), 56 deletions(-) diff --git a/src/servers/sapphire_zone/Actor/Player.h b/src/servers/sapphire_zone/Actor/Player.h index 03e00b15..b782515b 100644 --- a/src/servers/sapphire_zone/Actor/Player.h +++ b/src/servers/sapphire_zone/Actor/Player.h @@ -603,7 +603,7 @@ private: uint16_t m_itemLevel; InventoryPtr m_pInventory; - std::map< uint32_t, Event::EventHandlerPtr > m_eventMap; + std::map< uint32_t, Event::EventHandlerPtr > m_eventHandlerMap; std::map< uint32_t, uint8_t > m_playerIdToSpawnIdMap; // maps player to spawn id std::queue< uint8_t > m_freeSpawnIdQueue; // queue with spawn ids free to be assigned std::queue< uint8_t > m_freeHateSlotQueue; // queue with "hate slots" free to be assigned diff --git a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp index c5bae3e2..571a3d4d 100644 --- a/src/servers/sapphire_zone/Actor/PlayerEvent.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerEvent.cpp @@ -34,18 +34,18 @@ using namespace Core::Network::Packets::Server; void Core::Entity::Player::addEvent( Event::EventHandlerPtr pEvent ) { - m_eventMap[pEvent->getId()] = pEvent; + m_eventHandlerMap[pEvent->getId()] = pEvent; } std::map< uint32_t, Core::Event::EventHandlerPtr >& Core::Entity::Player::eventList() { - return m_eventMap; + return m_eventHandlerMap; } Core::Event::EventHandlerPtr Core::Entity::Player::getEvent( uint32_t eventId ) { - auto it = m_eventMap.find( eventId ); - if( it != m_eventMap.end() ) + auto it = m_eventHandlerMap.find( eventId ); + if( it != m_eventHandlerMap.end() ) return it->second; return Event::EventHandlerPtr( nullptr ); @@ -53,16 +53,16 @@ Core::Event::EventHandlerPtr Core::Entity::Player::getEvent( uint32_t eventId ) size_t Core::Entity::Player::getEventCount() { - return m_eventMap.size(); + return m_eventHandlerMap.size(); } void Core::Entity::Player::removeEvent( uint32_t eventId ) { - auto it = m_eventMap.find( eventId ); - if( it != m_eventMap.end() ) + auto it = m_eventHandlerMap.find( eventId ); + if( it != m_eventHandlerMap.end() ) { auto tmpEvent = it->second; - m_eventMap.erase( it ); + m_eventHandlerMap.erase( it ); } } @@ -79,7 +79,7 @@ void Core::Entity::Player::eventStart( uint64_t actorId, uint32_t eventId, Event::EventHandler::EventType eventType, uint8_t eventParam1, uint32_t eventParam2 ) { - Event::EventHandlerPtr newEvent( new Event::EventHandler( actorId, eventId, eventType, eventParam2 ) ); + Event::EventHandlerPtr newEvent( new Event::EventHandler( this, actorId, eventId, eventType, eventParam2 ) ); addEvent( newEvent ); setStateFlag( PlayerStateFlag::Occupied2 ); @@ -184,7 +184,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) { case Event::EventHandler::Nest: { - queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam3() ) ); + queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); removeEvent( pEvent->getId() ); auto events = eventList(); @@ -195,7 +195,8 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) if( it.second->hasPlayedScene() == false ) { // TODO: not happy with this, this is also prone to break wit more than one remaining event in there - queuePacket( EventFinishPacket( getId(), it.second->getId(), it.second->getEventType(), it.second->getEventParam3() ) ); + queuePacket( EventFinishPacket( getId(), it.second->getId(), it.second->getEventType(), + it.second->getEventParam() ) ); removeEvent( it.second->getId() ); } } @@ -204,7 +205,7 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer ) } default: { - queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam3() ) ); + queuePacket( EventFinishPacket( getId(), pEvent->getId(), pEvent->getEventType(), pEvent->getEventParam() ) ); break; } } diff --git a/src/servers/sapphire_zone/Event/EventHandler.cpp b/src/servers/sapphire_zone/Event/EventHandler.cpp index f863c6e3..e4ab39cf 100644 --- a/src/servers/sapphire_zone/Event/EventHandler.cpp +++ b/src/servers/sapphire_zone/Event/EventHandler.cpp @@ -1,6 +1,7 @@ #include "EventHandler.h" -Core::Event::EventHandler::EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ) : +Core::Event::EventHandler::EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam ) : + m_pOwner( pOwner ), m_actorId( actorId ), m_eventId( eventId ), m_eventType( eventType ), @@ -9,7 +10,7 @@ Core::Event::EventHandler::EventHandler( uint64_t actorId, uint32_t eventId, Eve m_entryId = static_cast< uint16_t >( eventId ); m_type = static_cast< uint16_t >( eventId >> 16 ); - m_eventParam3 = eventParam3; + m_eventParam = eventParam; m_callback = nullptr; } @@ -39,9 +40,9 @@ uint16_t Core::Event::EventHandler::getEntryId() const return m_entryId; } -uint32_t Core::Event::EventHandler::getEventParam3() const +uint32_t Core::Event::EventHandler::getEventParam() const { - return m_eventParam3; + return m_eventParam; } Core::Event::EventHandler::SceneReturnCallback Core::Event::EventHandler::getEventReturnCallback() const @@ -63,3 +64,14 @@ void Core::Event::EventHandler::setPlayedScene( bool playedScene ) { m_playedScene = playedScene; } + +bool Core::Event::EventHandler::hasNestedEvent() const +{ + return m_pNestedEvent != nullptr; +} + +void Core::Event::EventHandler::removeNestedEvent() +{ + + m_pNestedEvent.reset(); +} diff --git a/src/servers/sapphire_zone/Event/EventHandler.h b/src/servers/sapphire_zone/Event/EventHandler.h index 5720d6f9..aa90b3ac 100644 --- a/src/servers/sapphire_zone/Event/EventHandler.h +++ b/src/servers/sapphire_zone/Event/EventHandler.h @@ -39,6 +39,7 @@ namespace Core { { Quest = 0x0001, Warp = 0x0002, + Unknown = 0x0003, // Came up in the client with "Begin" unsure that means Shop = 0x0004, Aetheryte = 0x0005, GuildLeveAssignment = 0x0006, @@ -64,7 +65,7 @@ namespace Core { using SceneReturnCallback = std::function< void( Entity::Player&, uint32_t, uint16_t, uint16_t, uint16_t ) > ; - EventHandler( uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam3 ); + EventHandler( Entity::Player* pOwner, uint64_t actorId, uint32_t eventId, EventType eventType, uint32_t eventParam ); ~EventHandler() {} @@ -78,7 +79,7 @@ namespace Core { uint8_t getEventType() const; - uint32_t getEventParam3() const; + uint32_t getEventParam() const; bool hasPlayedScene() const; @@ -88,15 +89,21 @@ namespace Core { void setEventReturnCallback( SceneReturnCallback callback ); + bool hasNestedEvent() const; + + void removeNestedEvent(); + protected: + Entity::Player* m_pOwner; uint64_t m_actorId; uint32_t m_eventId; uint16_t m_entryId; uint16_t m_type; uint8_t m_eventType; - uint32_t m_eventParam3; + uint32_t m_eventParam; + EventHandlerPtr m_pNestedEvent; bool m_playedScene; SceneReturnCallback m_callback; }; diff --git a/src/servers/sapphire_zone/Network/GameConnection.cpp b/src/servers/sapphire_zone/Network/GameConnection.cpp index 50acbf3f..a077d3a3 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.cpp +++ b/src/servers/sapphire_zone/Network/GameConnection.cpp @@ -75,7 +75,7 @@ Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive, setZoneHandler( ClientZoneIpcType::InventoryModifyHandler,"InventoryModifyHandler", &GameConnection::inventoryModifyHandler ); - setZoneHandler( ClientZoneIpcType::TalkEventHandler, "EventHandler", &GameConnection::eventHandler ); + setZoneHandler( ClientZoneIpcType::TalkEventHandler, "EventHandlerTalk", &GameConnection::eventHandlerTalk ); setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandler", &GameConnection::eventHandler ); setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandler", &GameConnection::eventHandler ); setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandler", &GameConnection::eventHandler ); diff --git a/src/servers/sapphire_zone/Network/GameConnection.h b/src/servers/sapphire_zone/Network/GameConnection.h index 2d283067..8d38896f 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.h +++ b/src/servers/sapphire_zone/Network/GameConnection.h @@ -100,6 +100,8 @@ public: DECLARE_HANDLER( inventoryModifyHandler ); DECLARE_HANDLER( discoveryHandler ); DECLARE_HANDLER( eventHandler ); + DECLARE_HANDLER( eventHandlerTalk ); + DECLARE_HANDLER( logoutHandler ); DECLARE_HANDLER( cfDutyInfoRequest ); diff --git a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp index 54875ca5..44ad1319 100644 --- a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -20,6 +21,7 @@ #include "Forwards.h" #include "Event/EventHelper.h" +extern Core::Data::ExdData g_exdData; extern Core::Scripting::ScriptManager g_scriptMgr; using namespace Core::Common; @@ -49,12 +51,7 @@ void Core::Network::GameConnection::eventHandler( const Packets::GamePacket& inP case ClientZoneIpcType::TalkEventHandler: // Talk event { - uint64_t actorId = inPacket.getValAt< uint64_t >( 0x20 ); - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x28 ); - if( !g_scriptMgr.onTalk( player, actorId, eventId ) ) - abortEventFunc( player, actorId, eventId ); - break; } case ClientZoneIpcType::EmoteEventHandler: // Emote event @@ -152,6 +149,44 @@ void Core::Network::GameConnection::eventHandler( const Packets::GamePacket& inP } +void Core::Network::GameConnection::eventHandlerTalk( const Packets::GamePacket& inPacket, Entity::Player& player ) +{ + + auto actorId = inPacket.getValAt< uint64_t >( 0x20 ); + auto eventId = inPacket.getValAt< uint32_t >( 0x28 ); + auto eventType = static_cast< uint16_t >( eventId >> 16 ); + + std::string eventName = "onTalk"; + std::string objName = Event::getEventName( eventId ); + + player.sendDebug( "Actor: " + + std::to_string( actorId ) + " -> " + + std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + + " \neventId: " + + std::to_string( eventId ) + + " (0x" + boost::str( boost::format( "%|08X|" ) + % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); + + + player.sendDebug( "Calling: " + objName + "." + eventName ); + player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); + + if( !g_scriptMgr.onTalk( player, actorId, eventId ) ) + { + if ( eventType == Event::EventHandler::EventHandlerType::Quest ) + { + auto questInfo = g_exdData.getQuestInfo( eventId ); + if ( questInfo ) + { + player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->name_intern + ")" ); + } + } + } + + player.checkEvent( eventId ); + +} + diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index ae5361c1..4e8bea37 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -143,16 +143,6 @@ bool Core::Scripting::ScriptManager::registerBnpcTemplate( std::string templateN bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t actorId, uint32_t eventId ) { - std::string eventName = "onTalk"; - std::string objName = Event::getEventName( eventId ); - - player.sendDebug( "Actor: " + - std::to_string( actorId ) + " -> " + - std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + - " \neventId: " + - std::to_string( eventId ) + - " (0x" + boost::str( boost::format( "%|08X|" ) - % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); uint16_t eventType = eventId >> 16; uint32_t scriptId = eventId; @@ -168,29 +158,9 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, scriptId ); if( script ) - { - player.sendDebug( "Calling: " + objName + "." + eventName ); - - player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); - script->onTalk( eventId, player, actorId ); - - player.checkEvent( eventId ); - } else - { - if ( eventType == Event::EventHandler::EventHandlerType::Quest ) - { - auto questInfo = g_exdData.getQuestInfo( eventId ); - if ( questInfo ) - { - player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->name_intern + ")" ); - - } - } - return false; - } return true; } From 52f341c906a7943840a6498614504dcb0c657a29 Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 16 Jan 2018 02:16:48 +0100 Subject: [PATCH 06/45] More cleanup of event / script handlers --- .../sapphire_zone/Network/GameConnection.cpp | 6 +- .../sapphire_zone/Network/GameConnection.h | 4 + .../Network/Handlers/EventHandlers.cpp | 167 +++++++++++------- .../sapphire_zone/Script/ScriptManager.cpp | 98 ++-------- 4 files changed, 125 insertions(+), 150 deletions(-) diff --git a/src/servers/sapphire_zone/Network/GameConnection.cpp b/src/servers/sapphire_zone/Network/GameConnection.cpp index a077d3a3..534acc20 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.cpp +++ b/src/servers/sapphire_zone/Network/GameConnection.cpp @@ -76,9 +76,9 @@ Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive, setZoneHandler( ClientZoneIpcType::InventoryModifyHandler,"InventoryModifyHandler", &GameConnection::inventoryModifyHandler ); setZoneHandler( ClientZoneIpcType::TalkEventHandler, "EventHandlerTalk", &GameConnection::eventHandlerTalk ); - setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandler", &GameConnection::eventHandler ); - setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandler", &GameConnection::eventHandler ); - setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandler", &GameConnection::eventHandler ); + setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandlerEmote", &GameConnection::eventHandlerEmote ); + setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandlerWithinRange", &GameConnection::eventHandlerWithinRange ); + setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandlerOutsideRange", &GameConnection::eventHandlerOutsideRange ); setZoneHandler( ClientZoneIpcType::EnterTeriEventHandler, "EventHandler", &GameConnection::eventHandler ); setZoneHandler( ClientZoneIpcType::ReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandler ); diff --git a/src/servers/sapphire_zone/Network/GameConnection.h b/src/servers/sapphire_zone/Network/GameConnection.h index 8d38896f..5b75c77c 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.h +++ b/src/servers/sapphire_zone/Network/GameConnection.h @@ -101,6 +101,10 @@ public: DECLARE_HANDLER( discoveryHandler ); DECLARE_HANDLER( eventHandler ); DECLARE_HANDLER( eventHandlerTalk ); + DECLARE_HANDLER( eventHandlerEmote ); + DECLARE_HANDLER( eventHandlerWithinRange ); + DECLARE_HANDLER( eventHandlerOutsideRange ); + DECLARE_HANDLER( eventHandlerEnterTerritory ); DECLARE_HANDLER( logoutHandler ); diff --git a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp index 44ad1319..3d9d12a0 100644 --- a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp @@ -50,66 +50,11 @@ void Core::Network::GameConnection::eventHandler( const Packets::GamePacket& inP { case ClientZoneIpcType::TalkEventHandler: // Talk event - { - - } - case ClientZoneIpcType::EmoteEventHandler: // Emote event - { - uint64_t actorId = inPacket.getValAt< uint64_t >( 0x20 ); - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x28 ); - uint16_t emoteId = inPacket.getValAt< uint16_t >( 0x2C ); - - std::string eventName = Event::getEventName( eventId ); - - if( !g_scriptMgr.onEmote( player, actorId, eventId, static_cast< uint8_t >( emoteId ) ) ) - abortEventFunc( player, actorId, eventId ); - break; - } - - case ClientZoneIpcType::WithinRangeEventHandler: - { - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x24 ); - uint32_t eventParam1 = inPacket.getValAt< uint32_t >( 0x20 ); - float x = inPacket.getValAt< float >( 0x28 ); - float y = inPacket.getValAt< float >( 0x2C ); - float z = inPacket.getValAt< float >( 0x30 ); - - std::string eventName = Event::getEventName( eventId ); - - if( !g_scriptMgr.onWithinRange( player, eventId, eventParam1, x, y, z ) ) - abortEventFunc( player, 0, eventId ); - break; - } - case ClientZoneIpcType::OutOfRangeEventHandler: - { - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x24 ); - uint32_t eventParam1 = inPacket.getValAt< uint32_t >( 0x20 ); - float x = inPacket.getValAt< float >( 0x28 ); - float y = inPacket.getValAt< float >( 0x2C ); - float z = inPacket.getValAt< float >( 0x30 ); - - std::string eventName = Event::getEventName( eventId ); - - if( !g_scriptMgr.onOutsideRange( player, eventId, eventParam1, x, y, z ) ) - abortEventFunc( player, 0, eventId ); - break; - } - case ClientZoneIpcType::EnterTeriEventHandler: - { - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x20 ); - uint16_t eventParam1 = inPacket.getValAt< uint16_t >( 0x24 ); - uint16_t eventParam2 = inPacket.getValAt< uint16_t >( 0x26 ); - - std::string eventName = Event::getEventName( eventId ); - - if( !g_scriptMgr.onEnterTerritory( player, eventId, eventParam1, eventParam2 ) ) - abortEventFunc( player, 0, eventId ); break; - } case ClientZoneIpcType::ReturnEventHandler: case ClientZoneIpcType::TradeReturnEventHandler: @@ -171,22 +116,114 @@ void Core::Network::GameConnection::eventHandlerTalk( const Packets::GamePacket& player.sendDebug( "Calling: " + objName + "." + eventName ); player.eventStart( actorId, eventId, Event::EventHandler::Talk, 0, 0 ); - if( !g_scriptMgr.onTalk( player, actorId, eventId ) ) + if( !g_scriptMgr.onTalk( player, actorId, eventId ) && + eventType == Event::EventHandler::EventHandlerType::Quest ) { - if ( eventType == Event::EventHandler::EventHandlerType::Quest ) - { - auto questInfo = g_exdData.getQuestInfo( eventId ); - if ( questInfo ) - { - player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->name_intern + ")" ); - } - } + auto questInfo = g_exdData.getQuestInfo( eventId ); + if ( questInfo ) + player.sendUrgent( "Quest not implemented: " + questInfo->name + " (" + questInfo->name_intern + ")" ); } player.checkEvent( eventId ); } - +void Core::Network::GameConnection::eventHandlerEmote( const Packets::GamePacket& inPacket, Entity::Player& player ) +{ + + auto actorId = inPacket.getValAt< uint64_t >( 0x20 ); + auto eventId = inPacket.getValAt< uint32_t >( 0x28 ); + auto emoteId = inPacket.getValAt< uint16_t >( 0x2C ); + auto eventType = static_cast< uint16_t >( eventId >> 16 ); + + std::string eventName = "onEmote"; + std::string objName = Event::getEventName( eventId ); + + player.sendDebug( "Actor: " + + std::to_string( actorId ) + " -> " + + std::to_string( Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ) ) + + " \neventId: " + + std::to_string( eventId ) + + " (0x" + boost::str( boost::format( "%|08X|" ) + % static_cast< uint64_t >( eventId & 0xFFFFFFF ) ) + ")" ); + + player.sendDebug( "Calling: " + objName + "." + eventName ); + + player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); + + if( !g_scriptMgr.onEmote( player, actorId, eventId, static_cast< uint8_t >( emoteId ) ) && + eventType == Event::EventHandler::EventHandlerType::Quest ) + { + auto questInfo = g_exdData.getQuestInfo( eventId ); + if( questInfo ) + player.sendUrgent( "Quest not implemented: " + questInfo->name ); + } + + player.checkEvent( eventId ); +} + +void Core::Network::GameConnection::eventHandlerWithinRange( const Packets::GamePacket& inPacket, + Entity::Player& player ) +{ + + auto eventId = inPacket.getValAt< uint32_t >( 0x24 ); + auto param1 = inPacket.getValAt< uint32_t >( 0x20 ); + auto x = inPacket.getValAt< float >( 0x28 ); + auto y = inPacket.getValAt< float >( 0x2C ); + auto z = inPacket.getValAt< float >( 0x30 ); + + std::string eventName = "onWithinRange"; + std::string objName = Event::getEventName( eventId ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + + " p1: " + std::to_string( param1 ) ); + + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); + + g_scriptMgr.onWithinRange( player, eventId, param1, x, y, z ); + + player.checkEvent( eventId ); +} + +void Core::Network::GameConnection::eventHandlerOutsideRange( const Packets::GamePacket& inPacket, + Entity::Player& player ) +{ + + auto eventId = inPacket.getValAt< uint32_t >( 0x24 ); + auto param1 = inPacket.getValAt< uint32_t >( 0x20 ); + auto x = inPacket.getValAt< float >( 0x28 ); + auto y = inPacket.getValAt< float >( 0x2C ); + auto z = inPacket.getValAt< float >( 0x30 ); + + std::string eventName = "onOutsideRange"; + std::string objName = Event::getEventName( eventId ); + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + + " p1: " + std::to_string( param1 ) ); + + player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); + + g_scriptMgr.onOutsideRange( player, eventId, param1, x, y, z ); + + player.checkEvent( eventId ); +} + +void Core::Network::GameConnection::eventHandlerEnterTerritory( const Packets::GamePacket &inPacket, + Entity::Player &player ) +{ + auto eventId = inPacket.getValAt< uint32_t >( 0x20 ); + auto param1 = inPacket.getValAt< uint16_t >( 0x24 ); + auto param2 = inPacket.getValAt< uint16_t >( 0x26 ); + + std::string eventName = Event::getEventName( eventId ); + + std::string objName = Event::getEventName( eventId ); + + player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); + + player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); + + g_scriptMgr.onEnterTerritory( player, eventId, param1, param2 ); + + player.checkEvent( eventId ); +} diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 4e8bea37..c073e9b8 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -157,115 +157,49 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac } auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, scriptId ); - if( script ) - script->onTalk( eventId, player, actorId ); - else + if( !script ) return false; - + script->onTalk( eventId, player, actorId ); return true; } bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) { - std::string eventName = "onEnterTerritory"; - std::string objName = Event::getEventName( eventId ); - - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); - if( script ) - { - player.eventStart( player.getId(), eventId, Event::EventHandler::EnterTerritory, 0, player.getZoneId() ); - - script->onEnterZone( player, eventId, param1, param2 ); - - player.checkEvent( eventId ); - - return true; - } - - return false; + if( !script ) + return false; + script->onEnterZone( player, eventId, param1, param2 ); + return true; } bool Core::Scripting::ScriptManager::onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { - - std::string eventName = "onWithinRange"; - std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) + " p1: " + std::to_string( param1 ) ); - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); - if( script ) - { - player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); - - script->onWithinRange( player, eventId, param1, x, y, z ); - - player.checkEvent( eventId ); - - return true; - } - - return false; + if( !script ) + return false; + script->onWithinRange( player, eventId, param1, x, y, z ); + return true; } bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { - std::string eventName = "onOutsideRange"; - std::string objName = Event::getEventName( eventId ); - player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); - if( script ) - { - player.eventStart( player.getId(), eventId, Event::EventHandler::WithinRange, 1, param1 ); - - script->onOutsideRange( player, eventId, param1, x, y, z ); - - player.checkEvent( eventId ); - - return true; - } - - return false; + if( !script ) + return false; + script->onOutsideRange( player, eventId, param1, x, y, z ); + return true; } bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t actorId, uint32_t eventId, uint8_t emoteId ) { - std::string eventName = "onEmote"; - std::string objName = Event::getEventName( eventId ); - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); - if( script ) - { - player.sendDebug( "Calling: " + objName + "." + eventName ); - - player.eventStart( actorId, eventId, Event::EventHandler::Emote, 0, emoteId ); - - script->onEmote( actorId, eventId, emoteId, player ); - - player.checkEvent( eventId ); - } - else - { - uint16_t eventType = eventId >> 16; - - if( eventType == Event::EventHandler::EventHandlerType::Quest ) - { - auto questInfo = g_exdData.getQuestInfo( eventId ); - if( questInfo ) - { - player.sendUrgent( "Quest not implemented: " + questInfo->name ); - return false; - } - } + if( !script ) return false; - } - + script->onEmote( actorId, eventId, emoteId, player ); return true; } From 9d07048f0d3109a1e66b192a68c3090005d30b57 Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 16 Jan 2018 14:01:58 +0100 Subject: [PATCH 07/45] Simplified EventReturnHandler --- .../sapphire_zone/Script/ScriptManager.cpp | 36 ++++++------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index c073e9b8..125e9250 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -216,32 +216,17 @@ bool Core::Scripting::ScriptManager::onEventHandlerReturn( Entity::Player& playe " p2: " + std::to_string( param2 ) + " p3: " + std::to_string( param3 ) ); - try + auto pEvent = player.getEvent( eventId ); + if( pEvent ) { - auto pEvent = player.getEvent( eventId ); - if( pEvent ) - { - pEvent->setPlayedScene( false ); - // try to retrieve a stored callback - auto eventCallback = pEvent->getEventReturnCallback(); - // if there is one, proceed to call it - if( eventCallback ) - { - eventCallback( player, eventId, param1, param2, param3 ); - if( !pEvent->hasPlayedScene() ) - player.eventFinish( eventId, 1 ); - else - pEvent->setPlayedScene( false ); - } - // else, finish the event. - else - player.eventFinish( eventId, 1 ); - } - } - catch( std::exception& e ) - { - player.sendNotice( e.what() ); - return false; + pEvent->setPlayedScene( false ); + // try to retrieve a stored callback + auto eventCallback = pEvent->getEventReturnCallback(); + // if there is one, proceed to call it + if( eventCallback ) + eventCallback( player, eventId, param1, param2, param3 ); + // check the event, finishing it if needed + player.checkEvent( eventId ); } return true; @@ -254,7 +239,6 @@ bool Core::Scripting::ScriptManager::onEventHandlerTradeReturn( Entity::Player& if( script ) { script->onEventHandlerTradeReturn( player, eventId, subEvent, param, catalogId ); - return true; } From bc9d33724a5a0d9b401c277f9587be014659682b Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 16 Jan 2018 16:35:50 +0100 Subject: [PATCH 08/45] Small reformmating of scriptmanager --- src/servers/sapphire_zone/Script/ScriptManager.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 125e9250..f949c249 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -258,7 +258,6 @@ bool Core::Scripting::ScriptManager::onEventItem( Entity::Player& player, uint32 player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); script->onEventItem( player, eventItemId, eventId, castTime, targetId ); - return true; } @@ -299,7 +298,6 @@ bool Core::Scripting::ScriptManager::onCastFinish( Entity::Player& player, Entit if( script ) script->onCastFinish( player, *pTarget ); - return true; } @@ -313,7 +311,6 @@ bool Core::Scripting::ScriptManager::onStatusReceive( Entity::ActorPtr pActor, u pActor->getAsPlayer()->sendDebug( "Calling status receive for statusid: " + std::to_string( effectId ) ); script->onApply( *pActor ); - return true; } @@ -329,7 +326,6 @@ bool Core::Scripting::ScriptManager::onStatusTick( Entity::ActorPtr pActor, Core pActor->getAsPlayer()->sendDebug( "Calling status tick for statusid: " + std::to_string( effect.getId() ) ); script->onTick( *pActor ); - return true; } @@ -345,7 +341,6 @@ bool Core::Scripting::ScriptManager::onStatusTimeOut( Entity::ActorPtr pActor, u pActor->getAsPlayer()->sendDebug( "Calling status timeout for statusid: " + std::to_string( effectId ) ); script->onExpire( *pActor ); - return true; } @@ -358,7 +353,6 @@ bool Core::Scripting::ScriptManager::onZoneInit( ZonePtr pZone ) if( script ) { script->onZoneInit(); - return true; } From 8574e925596db0b751417aeeea71113402ff27af Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 16 Jan 2018 16:36:24 +0100 Subject: [PATCH 09/45] Fixed mysql autoreconnect for prepared statements --- src/common/Database/DbConnection.cpp | 17 ++++++++++++++--- src/common/Database/DbConnection.h | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/common/Database/DbConnection.cpp b/src/common/Database/DbConnection.cpp index b0633492..b33fbbd2 100644 --- a/src/common/Database/DbConnection.cpp +++ b/src/common/Database/DbConnection.cpp @@ -61,7 +61,7 @@ uint32_t Core::Db::DbConnection::open() try { m_pConnection = base->connect( m_connectionInfo.host, m_connectionInfo.user, m_connectionInfo.password, - options, m_connectionInfo.port ); + options, m_connectionInfo.port ); m_pConnection->setSchema( m_connectionInfo.database ); } @@ -79,9 +79,9 @@ uint32_t Core::Db::DbConnection::getLastError() return m_pConnection->getErrorNo(); } -void Core::Db::DbConnection::ping() +bool Core::Db::DbConnection::ping() { - m_pConnection->ping(); + return m_pConnection->ping(); } bool Core::Db::DbConnection::lockIfReady() @@ -146,6 +146,17 @@ boost::shared_ptr< Mysql::ResultSet > Core::Db::DbConnection::query( boost::shar if( !stmt ) return nullptr; + if( !ping() ) + { + g_log.error( "MysqlConnection went down" ); + // naivly reconnect and hope for the best + open(); + lockIfReady(); + if( !prepareStatements() ) + g_log.error( "Mysql Statements failed to prepare..." ); + g_log.info( "MysqlConnection reestablished" ); + } + uint32_t index = stmt->getIndex(); auto pStmt = getPreparedStatement( index ); diff --git a/src/common/Database/DbConnection.h b/src/common/Database/DbConnection.h index ddb66e17..f304e423 100644 --- a/src/common/Database/DbConnection.h +++ b/src/common/Database/DbConnection.h @@ -72,7 +72,7 @@ namespace Db void rollbackTransaction(); void commitTransaction(); - void ping(); + bool ping(); uint32_t getLastError(); bool lockIfReady(); From 5bf895ec3d694e7c986140d9510214d9018fc2cf Mon Sep 17 00:00:00 2001 From: Mordred Date: Tue, 16 Jan 2018 19:01:10 +0100 Subject: [PATCH 10/45] Updated submodules --- src/libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries b/src/libraries index f4d3c5b3..bab17595 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit f4d3c5b38d13a15efc42686c9bac768c2be28be1 +Subproject commit bab17595d24c697c6abea881e7849b388c898647 From 15d6ae7e0d21799e49cbfb3a9cc03854905bab9d Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 17 Jan 2018 20:09:16 +1100 Subject: [PATCH 11/45] use typeinfo for script types instead of an enum --- .../sapphire_zone/Script/NativeScriptApi.h | 29 +++++++------------ .../Script/NativeScriptManager.h | 6 ++-- src/servers/sapphire_zone/Script/ScriptInfo.h | 2 +- .../sapphire_zone/Script/ScriptManager.cpp | 26 ++++++++--------- 4 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/servers/sapphire_zone/Script/NativeScriptApi.h b/src/servers/sapphire_zone/Script/NativeScriptApi.h index 65d317d4..4835027d 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptApi.h +++ b/src/servers/sapphire_zone/Script/NativeScriptApi.h @@ -2,6 +2,9 @@ #define NATIVE_SCRIPT_API #include +#include +#include + #include #include #include @@ -18,25 +21,15 @@ using namespace Core; #define EVENTSCRIPT_AETHERYTE_ID 0x50000 #define EVENTSCRIPT_AETHERNET_ID 0x50001 -enum ScriptType -{ - None, - ScriptedStatusEffect, - ScriptedAction, - ScriptedEvent, - ScriptedBattleNpc, - ScriptedZone -}; - class ScriptObject { protected: std::string m_scriptName; uint32_t m_id; - ScriptType m_type; + std::size_t m_type; public: - ScriptObject( std::string name, uint32_t id, ScriptType type ) : + ScriptObject( std::string name, uint32_t id, std::size_t type ) : m_scriptName( name ), m_id( id ), m_type( type ) @@ -52,7 +45,7 @@ public: return m_id; } - virtual ScriptType getType() const + virtual std::size_t getType() const { return m_type; } @@ -63,7 +56,7 @@ class StatusEffectScript : public ScriptObject { public: StatusEffectScript( std::string name, uint32_t effectId ) : - ScriptObject( name, effectId, ScriptType::ScriptedStatusEffect ) + ScriptObject( name, effectId, typeid( StatusEffectScript ).hash_code() ) { } virtual void onTick( Entity::Actor& actor ) { } @@ -81,7 +74,7 @@ class ActionScript : public ScriptObject { public: ActionScript( std::string name, uint32_t abilityId ) : - ScriptObject( name, abilityId, ScriptType::ScriptedAction ) + ScriptObject( name, abilityId, typeid( ActionScript ).hash_code() ) { } virtual void onStart( Entity::Actor& sourceActor, Entity::Actor& targetActor ) { } @@ -94,7 +87,7 @@ class EventScript : public ScriptObject { public: EventScript( std::string name, uint32_t questId ) : - ScriptObject( name, questId, ScriptType::ScriptedEvent ) + ScriptObject( name, questId, typeid( EventScript ).hash_code() ) { } virtual void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) { } @@ -112,7 +105,7 @@ class BattleNpcScript : public ScriptObject { public: BattleNpcScript( std::string name, uint32_t npcId ) : - ScriptObject( name, npcId, ScriptType::ScriptedBattleNpc ) + ScriptObject( name, npcId, typeid( BattleNpcScript ).hash_code() ) { } }; @@ -120,7 +113,7 @@ class ZoneScript : public ScriptObject { public: ZoneScript( std::string name, uint32_t zoneId ) : - ScriptObject( name, zoneId, ScriptType::ScriptedZone ) + ScriptObject( name, zoneId, typeid( ZoneScript ).hash_code() ) { } virtual void onZoneInit() { } diff --git a/src/servers/sapphire_zone/Script/NativeScriptManager.h b/src/servers/sapphire_zone/Script/NativeScriptManager.h index af3e256c..38588ffd 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptManager.h +++ b/src/servers/sapphire_zone/Script/NativeScriptManager.h @@ -19,7 +19,7 @@ namespace Scripting { class NativeScriptManager { protected: - std::unordered_map< ScriptType, std::unordered_map< uint32_t, ScriptObject* > > m_scripts; + std::unordered_map< std::size_t, std::unordered_map< uint32_t, ScriptObject* > > m_scripts; ScriptLoader m_loader; @@ -43,8 +43,10 @@ namespace Scripting { // todo: use some template magic (type_traits is_same?) to avoid ScriptType param // not sure if worthwhile given that it adds an extra place where script types need to be managed template< typename T > - T* getScript( ScriptType type, uint32_t scriptId ) + T* getScript( uint32_t scriptId ) { + auto type = typeid( T ).hash_code(); + auto script = m_scripts[type].find( scriptId ); if( script == m_scripts[type].end() ) return nullptr; diff --git a/src/servers/sapphire_zone/Script/ScriptInfo.h b/src/servers/sapphire_zone/Script/ScriptInfo.h index 7ddabc18..ae9fafb0 100644 --- a/src/servers/sapphire_zone/Script/ScriptInfo.h +++ b/src/servers/sapphire_zone/Script/ScriptInfo.h @@ -26,7 +26,7 @@ namespace Scripting { ModuleHandle handle; std::vector< ScriptObject* > scripts; - ScriptType type; + std::size_t type; }; } } diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index f949c249..40ec2bdc 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -156,7 +156,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac scriptId = EVENTSCRIPT_AETHERNET_ID; } - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, scriptId ); + auto script = m_nativeScriptManager->getScript< EventScript >( scriptId ); if( !script ) return false; script->onTalk( eventId, player, actorId ); @@ -166,7 +166,7 @@ bool Core::Scripting::ScriptManager::onTalk( Entity::Player& player, uint64_t ac bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) { - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( !script ) return false; script->onEnterZone( player, eventId, param1, param2 ); @@ -176,7 +176,7 @@ bool Core::Scripting::ScriptManager::onEnterTerritory( Entity::Player& player, u bool Core::Scripting::ScriptManager::onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( !script ) return false; script->onWithinRange( player, eventId, param1, x, y, z ); @@ -186,7 +186,7 @@ bool Core::Scripting::ScriptManager::onWithinRange( Entity::Player& player, uint bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) { - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( !script ) return false; script->onOutsideRange( player, eventId, param1, x, y, z ); @@ -196,7 +196,7 @@ bool Core::Scripting::ScriptManager::onOutsideRange( Entity::Player& player, uin bool Core::Scripting::ScriptManager::onEmote( Entity::Player& player, uint64_t actorId, uint32_t eventId, uint8_t emoteId ) { - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( !script ) return false; script->onEmote( actorId, eventId, emoteId, player ); @@ -235,7 +235,7 @@ bool Core::Scripting::ScriptManager::onEventHandlerReturn( Entity::Player& playe bool Core::Scripting::ScriptManager::onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, uint16_t subEvent, uint16_t param, uint32_t catalogId ) { - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( script ) { script->onEventHandlerTradeReturn( player, eventId, subEvent, param, catalogId ); @@ -252,7 +252,7 @@ bool Core::Scripting::ScriptManager::onEventItem( Entity::Player& player, uint32 std::string objName = Event::getEventName( eventId ); player.sendDebug( "Calling: " + objName + "." + eventName + " - " + std::to_string( eventId ) ); - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, eventId ); + auto script = m_nativeScriptManager->getScript< EventScript >( eventId ); if( script ) { player.eventStart( targetId, eventId, Event::EventHandler::Item, 0, 0 ); @@ -278,7 +278,7 @@ bool Core::Scripting::ScriptManager::onMobKill( Entity::Player& player, uint16_t uint16_t questId = activeQuests->c.questId; - auto script = m_nativeScriptManager->getScript< EventScript >( ScriptType::ScriptedEvent, questId ); + auto script = m_nativeScriptManager->getScript< EventScript >( questId ); if( script ) { std::string objName = Event::getEventName( 0x00010000 | questId ); @@ -294,7 +294,7 @@ bool Core::Scripting::ScriptManager::onMobKill( Entity::Player& player, uint16_t bool Core::Scripting::ScriptManager::onCastFinish( Entity::Player& player, Entity::ActorPtr pTarget, uint32_t actionId ) { - auto script = m_nativeScriptManager->getScript< ActionScript >( ScriptType::ScriptedAction, actionId ); + auto script = m_nativeScriptManager->getScript< ActionScript >( actionId ); if( script ) script->onCastFinish( player, *pTarget ); @@ -303,7 +303,7 @@ bool Core::Scripting::ScriptManager::onCastFinish( Entity::Player& player, Entit bool Core::Scripting::ScriptManager::onStatusReceive( Entity::ActorPtr pActor, uint32_t effectId ) { - auto script = m_nativeScriptManager->getScript< StatusEffectScript >( ScriptType::ScriptedStatusEffect, effectId ); + auto script = m_nativeScriptManager->getScript< StatusEffectScript >( effectId ); if( script ) { @@ -319,7 +319,7 @@ bool Core::Scripting::ScriptManager::onStatusReceive( Entity::ActorPtr pActor, u bool Core::Scripting::ScriptManager::onStatusTick( Entity::ActorPtr pActor, Core::StatusEffect::StatusEffect& effect ) { - auto script = m_nativeScriptManager->getScript< StatusEffectScript >( ScriptType::ScriptedStatusEffect, effect.getId() ); + auto script = m_nativeScriptManager->getScript< StatusEffectScript >( effect.getId() ); if( script ) { if( pActor->isPlayer() ) @@ -334,7 +334,7 @@ bool Core::Scripting::ScriptManager::onStatusTick( Entity::ActorPtr pActor, Core bool Core::Scripting::ScriptManager::onStatusTimeOut( Entity::ActorPtr pActor, uint32_t effectId ) { - auto script = m_nativeScriptManager->getScript< StatusEffectScript >( ScriptType::ScriptedStatusEffect, effectId ); + auto script = m_nativeScriptManager->getScript< StatusEffectScript >( effectId ); if( script ) { if( pActor->isPlayer() ) @@ -349,7 +349,7 @@ bool Core::Scripting::ScriptManager::onStatusTimeOut( Entity::ActorPtr pActor, u bool Core::Scripting::ScriptManager::onZoneInit( ZonePtr pZone ) { - auto script = m_nativeScriptManager->getScript< ZoneScript >( ScriptType::ScriptedZone, pZone->getId() ); + auto script = m_nativeScriptManager->getScript< ZoneScript >( pZone->getId() ); if( script ) { script->onZoneInit(); From 32d5a55ee9cafd8734038c7762794badd42cb3a3 Mon Sep 17 00:00:00 2001 From: Mordred Date: Wed, 17 Jan 2018 23:22:19 +0100 Subject: [PATCH 12/45] Fixed weatherrate being pulled off the wrong field --- src/common/Exd/ExdData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Exd/ExdData.cpp b/src/common/Exd/ExdData.cpp index 9ac2197a..73aa85f0 100644 --- a/src/common/Exd/ExdData.cpp +++ b/src/common/Exd/ExdData.cpp @@ -85,7 +85,7 @@ bool Core::Data::ExdData::loadZoneInfo() int16_t map_index = getField< int16_t >( mapDataFields, 12 ); bool is_two_bytes = getField< bool >( mapDataFields, 15 ); - uint16_t weather_rate = getField< uint16_t >( fields, 10 ) > 75 ? 0 : getField< uint16_t >( fields, 10 ); + uint8_t weather_rate = getField< uint8_t >( fields, 12 ) > 75 ? 0 : getField< uint8_t >( fields, 12 ); auto weatherRateFields = weatherRate.get_row( weather_rate ); int32_t aetheryte_index = getField< int32_t >( fields, 23 ); From b3ba2a992cc8b1f85f959dd8eacedab118ab8ea2 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 18 Jan 2018 13:56:55 +1100 Subject: [PATCH 13/45] fix hotloading setting, minor cleanup --- bin/config/settings_zone.xml | 2 +- src/servers/sapphire_zone/Script/NativeScriptManager.h | 2 -- src/servers/sapphire_zone/Script/ScriptInfo.h | 1 - src/servers/sapphire_zone/Script/ScriptManager.cpp | 4 ++++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/config/settings_zone.xml b/bin/config/settings_zone.xml index f50c18ce..547219a7 100644 --- a/bin/config/settings_zone.xml +++ b/bin/config/settings_zone.xml @@ -13,7 +13,7 @@ ./cache/ - 1 + true ../scripts/native/ ../cmake-build-debug/ cmake --build %1% --target %2% diff --git a/src/servers/sapphire_zone/Script/NativeScriptManager.h b/src/servers/sapphire_zone/Script/NativeScriptManager.h index 38588ffd..a793b68e 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptManager.h +++ b/src/servers/sapphire_zone/Script/NativeScriptManager.h @@ -40,8 +40,6 @@ namespace Scripting { const std::string getModuleExtension(); bool isModuleLoaded( const std::string& name ); - // todo: use some template magic (type_traits is_same?) to avoid ScriptType param - // not sure if worthwhile given that it adds an extra place where script types need to be managed template< typename T > T* getScript( uint32_t scriptId ) { diff --git a/src/servers/sapphire_zone/Script/ScriptInfo.h b/src/servers/sapphire_zone/Script/ScriptInfo.h index ae9fafb0..f57c1a7c 100644 --- a/src/servers/sapphire_zone/Script/ScriptInfo.h +++ b/src/servers/sapphire_zone/Script/ScriptInfo.h @@ -26,7 +26,6 @@ namespace Scripting { ModuleHandle handle; std::vector< ScriptObject* > scripts; - std::size_t type; }; } } diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index 40ec2bdc..c9a1fa01 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -74,6 +74,10 @@ bool Core::Scripting::ScriptManager::init() void Core::Scripting::ScriptManager::watchDirectories() { + auto shouldWatch = g_serverZone.getConfig()->getValue< bool >( "Settings.General.Scripts.HotSwap.Enabled", true ); + if( !shouldWatch ) + return; + Watchdog::watchMany( g_serverZone.getConfig()->getValue< std::string >( "Settings.General.Scripts.Path", "./compiledscripts/" ) + "*" + m_nativeScriptManager->getModuleExtension(), [ this ]( const std::vector< ci::fs::path >& paths ) { From c568a998c356552cdfe6d928500337af2fd3f5e0 Mon Sep 17 00:00:00 2001 From: Mordred Date: Thu, 18 Jan 2018 21:49:12 +0100 Subject: [PATCH 14/45] More event simplification --- .../sapphire_zone/Network/GameConnection.cpp | 10 +- .../sapphire_zone/Network/GameConnection.h | 3 +- .../Network/Handlers/EventHandlers.cpp | 117 ++++++++---------- .../sapphire_zone/Script/ScriptManager.cpp | 23 +--- 4 files changed, 58 insertions(+), 95 deletions(-) diff --git a/src/servers/sapphire_zone/Network/GameConnection.cpp b/src/servers/sapphire_zone/Network/GameConnection.cpp index 534acc20..4d95a1c1 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.cpp +++ b/src/servers/sapphire_zone/Network/GameConnection.cpp @@ -79,13 +79,13 @@ Core::Network::GameConnection::GameConnection( Core::Network::HivePtr pHive, setZoneHandler( ClientZoneIpcType::EmoteEventHandler, "EventHandlerEmote", &GameConnection::eventHandlerEmote ); setZoneHandler( ClientZoneIpcType::WithinRangeEventHandler, "EventHandlerWithinRange", &GameConnection::eventHandlerWithinRange ); setZoneHandler( ClientZoneIpcType::OutOfRangeEventHandler, "EventHandlerOutsideRange", &GameConnection::eventHandlerOutsideRange ); - setZoneHandler( ClientZoneIpcType::EnterTeriEventHandler, "EventHandler", &GameConnection::eventHandler ); + setZoneHandler( ClientZoneIpcType::EnterTeriEventHandler, "EventHandlerEnterTeri", &GameConnection::eventHandlerEnterTerritory ); - setZoneHandler( ClientZoneIpcType::ReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandler ); - setZoneHandler( ClientZoneIpcType::TradeReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandler ); + setZoneHandler( ClientZoneIpcType::ReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandlerReturn ); + setZoneHandler( ClientZoneIpcType::TradeReturnEventHandler, "EventHandlerReturn", &GameConnection::eventHandlerReturn ); - setZoneHandler( ClientZoneIpcType::LinkshellEventHandler, "LinkshellEventHandler", &GameConnection::eventHandler ); - setZoneHandler( ClientZoneIpcType::LinkshellEventHandler1, "LinkshellEventHandler1", &GameConnection::eventHandler ); + setZoneHandler( ClientZoneIpcType::LinkshellEventHandler, "LinkshellEventHandler", &GameConnection::eventHandlerLinkshell ); + setZoneHandler( ClientZoneIpcType::LinkshellEventHandler1, "LinkshellEventHandler1", &GameConnection::eventHandlerLinkshell ); setZoneHandler( ClientZoneIpcType::CFDutyInfoHandler, "CFDutyInfoRequest", &GameConnection::cfDutyInfoRequest ); setZoneHandler( ClientZoneIpcType::CFRegisterDuty, "CFRegisterDuty", &GameConnection::cfRegisterDuty ); diff --git a/src/servers/sapphire_zone/Network/GameConnection.h b/src/servers/sapphire_zone/Network/GameConnection.h index 5b75c77c..8293e75c 100644 --- a/src/servers/sapphire_zone/Network/GameConnection.h +++ b/src/servers/sapphire_zone/Network/GameConnection.h @@ -99,12 +99,13 @@ public: DECLARE_HANDLER( actionHandler ); DECLARE_HANDLER( inventoryModifyHandler ); DECLARE_HANDLER( discoveryHandler ); - DECLARE_HANDLER( eventHandler ); DECLARE_HANDLER( eventHandlerTalk ); DECLARE_HANDLER( eventHandlerEmote ); DECLARE_HANDLER( eventHandlerWithinRange ); DECLARE_HANDLER( eventHandlerOutsideRange ); DECLARE_HANDLER( eventHandlerEnterTerritory ); + DECLARE_HANDLER( eventHandlerReturn ); + DECLARE_HANDLER( eventHandlerLinkshell ); DECLARE_HANDLER( logoutHandler ); diff --git a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp index 3d9d12a0..e36c9717 100644 --- a/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/EventHandlers.cpp @@ -28,75 +28,8 @@ using namespace Core::Common; using namespace Core::Network::Packets; using namespace Core::Network::Packets::Server; -void Core::Network::GameConnection::eventHandler( const Packets::GamePacket& inPacket, - Entity::Player& player ) -{ - uint16_t eventHandlerId = inPacket.getValAt< uint16_t >( 0x12 ); - - // we need to abort the event in case it has not been scripted so the player wont be locked up - auto abortEventFunc = []( Core::Entity::Player& player, uint64_t actorId, uint32_t eventId ) - { - player.queuePacket( EventStartPacket( player.getId(), actorId, eventId, 1, 0, 0 ) ); - player.queuePacket( EventFinishPacket( player.getId(), eventId, 1, 0 ) ); - // this isn't ideal as it will also reset any other status that might be active - player.queuePacket( PlayerStateFlagsPacket( player, PlayerStateFlagList{} ) ); - }; - - std::string eventIdStr = boost::str( boost::format( "%|04X|" ) % static_cast< uint32_t >( eventHandlerId & 0xFFFF ) ); - player.sendDebug( "---------------------------------------" ); - player.sendDebug( "EventHandler ( " + eventIdStr + " )" ); - - switch( eventHandlerId ) - { - - case ClientZoneIpcType::TalkEventHandler: // Talk event - case ClientZoneIpcType::EmoteEventHandler: // Emote event - case ClientZoneIpcType::WithinRangeEventHandler: - case ClientZoneIpcType::OutOfRangeEventHandler: - case ClientZoneIpcType::EnterTeriEventHandler: - break; - - case ClientZoneIpcType::ReturnEventHandler: - case ClientZoneIpcType::TradeReturnEventHandler: - { - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x20 ); - uint16_t subEvent = inPacket.getValAt< uint16_t >( 0x24 ); - uint16_t param1 = inPacket.getValAt< uint16_t >( 0x26 ); - uint16_t param2 = inPacket.getValAt< uint16_t >( 0x28 ); - uint16_t param3 = inPacket.getValAt< uint16_t >( 0x2C ); - - std::string eventName = Event::getEventName( eventId ); - - if( !g_scriptMgr.onEventHandlerReturn( player, eventId, subEvent, param1, param2, param3 ) ) - abortEventFunc( player, 0, eventId ); - break; - } - - case ClientZoneIpcType::LinkshellEventHandler: - case ClientZoneIpcType::LinkshellEventHandler1: - { - uint32_t eventId = inPacket.getValAt< uint32_t >( 0x20 ); - uint16_t subEvent = inPacket.getValAt< uint16_t >( 0x24 ); - std::string lsName = inPacket.getStringAt( 0x27 ); - - ZoneChannelPacket< FFXIVIpcEventLinkshell > linkshellEvent( player.getId() ); - linkshellEvent.data().eventId = eventId; - linkshellEvent.data().scene = static_cast< uint8_t >( subEvent ); - linkshellEvent.data().param3 = 1; - linkshellEvent.data().unknown1 = 0x15a; - player.queuePacket( linkshellEvent ); - -// abortEventFunc( pPlayer, 0, eventId ); - break; - } - - } - -} - void Core::Network::GameConnection::eventHandlerTalk( const Packets::GamePacket& inPacket, Entity::Player& player ) { - auto actorId = inPacket.getValAt< uint64_t >( 0x20 ); auto eventId = inPacket.getValAt< uint32_t >( 0x28 ); auto eventType = static_cast< uint16_t >( eventId >> 16 ); @@ -226,4 +159,54 @@ void Core::Network::GameConnection::eventHandlerEnterTerritory( const Packets::G player.checkEvent( eventId ); } +void Core::Network::GameConnection::eventHandlerReturn( const Packets::GamePacket &inPacket, + Entity::Player &player ) +{ + auto eventId = inPacket.getValAt< uint32_t >( 0x20 ); + auto scene = inPacket.getValAt< uint16_t >( 0x24 ); + auto param1 = inPacket.getValAt< uint16_t >( 0x26 ); + auto param2 = inPacket.getValAt< uint16_t >( 0x28 ); + auto param3 = inPacket.getValAt< uint16_t >( 0x2C ); + + std::string eventName = Event::getEventName( eventId ); + + player.sendDebug( "eventId: " + + std::to_string( eventId ) + + " ( 0x" + boost::str( boost::format( "%|08X|" ) % ( uint64_t ) ( eventId & 0xFFFFFFF ) ) + " ) " + + " scene: " + std::to_string( scene ) + + " p1: " + std::to_string( param1 ) + + " p2: " + std::to_string( param2 ) + + " p3: " + std::to_string( param3 ) ); + + auto pEvent = player.getEvent( eventId ); + if( pEvent ) + { + pEvent->setPlayedScene( false ); + // try to retrieve a stored callback + auto eventCallback = pEvent->getEventReturnCallback(); + // if there is one, proceed to call it + if( eventCallback ) + eventCallback( player, eventId, param1, param2, param3 ); + } + + player.checkEvent( eventId ); + +} + +void Core::Network::GameConnection::eventHandlerLinkshell( const Packets::GamePacket &inPacket, + Entity::Player &player ) +{ + auto eventId = inPacket.getValAt< uint32_t >( 0x20 ); + auto scene = inPacket.getValAt< uint16_t >( 0x24 ); + auto lsName = inPacket.getStringAt( 0x27 ); + + ZoneChannelPacket< FFXIVIpcEventLinkshell > linkshellEvent( player.getId() ); + linkshellEvent.data().eventId = eventId; + linkshellEvent.data().scene = static_cast< uint8_t >( scene ); + linkshellEvent.data().param3 = 1; + linkshellEvent.data().unknown1 = 0x15a; + player.queuePacket( linkshellEvent ); + +} + diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index c9a1fa01..f2f10ceb 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -212,28 +212,7 @@ bool Core::Scripting::ScriptManager::onEventHandlerReturn( Entity::Player& playe uint16_t param3 ) { - player.sendDebug( "eventId: " + - std::to_string( eventId ) + - " ( 0x" + boost::str( boost::format( "%|08X|" ) % ( uint64_t ) ( eventId & 0xFFFFFFF ) ) + " ) " + - " scene: " + std::to_string( subEvent ) + - " p1: " + std::to_string( param1 ) + - " p2: " + std::to_string( param2 ) + - " p3: " + std::to_string( param3 ) ); - - auto pEvent = player.getEvent( eventId ); - if( pEvent ) - { - pEvent->setPlayedScene( false ); - // try to retrieve a stored callback - auto eventCallback = pEvent->getEventReturnCallback(); - // if there is one, proceed to call it - if( eventCallback ) - eventCallback( player, eventId, param1, param2, param3 ); - // check the event, finishing it if needed - player.checkEvent( eventId ); - } - - return true; + return false; } bool Core::Scripting::ScriptManager::onEventHandlerTradeReturn( Entity::Player& player, uint32_t eventId, From 4b9da92b34eb28ce47529da3cd638986d24e613a Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 19 Jan 2018 20:17:49 +1100 Subject: [PATCH 15/45] remove scriptname from scripts --- .../native/CmnDef/CmnDefCutSceneReplay.cpp | 2 +- scripts/native/CmnDef/CmnDefInnBed.cpp | 2 +- scripts/native/CmnDef/CmnDefLinkShell.cpp | 2 +- scripts/native/CmnDef/HouFurOrchestrion.cpp | 2 +- scripts/native/action/ActionSprint3.cpp | 2 +- scripts/native/aetheryte/Aethernet.cpp | 2 +- scripts/native/aetheryte/Aetheryte.cpp | 2 +- scripts/native/opening/OpeningGridania.cpp | 2 +- scripts/native/opening/OpeningLimsa.cpp | 2 +- scripts/native/opening/OpeningUldah.cpp | 2 +- scripts/native/quest/ManFst001.cpp | 2 +- scripts/native/quest/ManFst002.cpp | 2 +- scripts/native/quest/ManFst003.cpp | 2 +- scripts/native/quest/ManFst004.cpp | 2 +- scripts/native/quest/ManSea001.cpp | 2 +- scripts/native/quest/ManSea002.cpp | 2 +- scripts/native/quest/ManWil001.cpp | 2 +- scripts/native/quest/ManWil002.cpp | 2 +- .../quest/subquest/gridania/SubFst001.cpp | 2 +- .../quest/subquest/gridania/SubFst002.cpp | 152 +++++++++--------- .../quest/subquest/gridania/SubFst010.cpp | 2 +- .../quest/subquest/gridania/SubFst013.cpp | 2 +- .../sapphire_zone/Script/NativeScriptApi.h | 29 ++-- 23 files changed, 108 insertions(+), 115 deletions(-) diff --git a/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp b/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp index 618c1610..39bf4300 100644 --- a/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp +++ b/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp @@ -3,7 +3,7 @@ class CmnDefCutSceneReplay : public EventScript { public: - CmnDefCutSceneReplay() : EventScript( "CmnDefCutSceneReplay", 721028 ) + CmnDefCutSceneReplay() : EventScript( 721028 ) {} void Scene00000( Entity::Player& player ) diff --git a/scripts/native/CmnDef/CmnDefInnBed.cpp b/scripts/native/CmnDef/CmnDefInnBed.cpp index 5e675b88..ac8a0a68 100644 --- a/scripts/native/CmnDef/CmnDefInnBed.cpp +++ b/scripts/native/CmnDef/CmnDefInnBed.cpp @@ -3,7 +3,7 @@ class CmnDefInnBed : public EventScript { public: - CmnDefInnBed() : EventScript( "CmnDefInnBed", 720916 ) + CmnDefInnBed() : EventScript( 720916 ) {} // menu diff --git a/scripts/native/CmnDef/CmnDefLinkShell.cpp b/scripts/native/CmnDef/CmnDefLinkShell.cpp index eb2a7b29..f0df71f9 100644 --- a/scripts/native/CmnDef/CmnDefLinkShell.cpp +++ b/scripts/native/CmnDef/CmnDefLinkShell.cpp @@ -7,7 +7,7 @@ class CmnDefLinkShell : public EventScript { public: - CmnDefLinkShell() : EventScript( "CmnDefLinkShell", 0xB0006 ) + CmnDefLinkShell() : EventScript( 0xB0006 ) {} void Scene00001( Entity::Player& player ) diff --git a/scripts/native/CmnDef/HouFurOrchestrion.cpp b/scripts/native/CmnDef/HouFurOrchestrion.cpp index bb370e24..9e47c554 100644 --- a/scripts/native/CmnDef/HouFurOrchestrion.cpp +++ b/scripts/native/CmnDef/HouFurOrchestrion.cpp @@ -3,7 +3,7 @@ class HouFurOrchestrion : public EventScript { public: - HouFurOrchestrion() : EventScript( "HouFurOrchestrion", 721226 ) + HouFurOrchestrion() : EventScript( 721226 ) {} void Scene00000( Entity::Player& player ) diff --git a/scripts/native/action/ActionSprint3.cpp b/scripts/native/action/ActionSprint3.cpp index 6e9af153..076bbf5f 100644 --- a/scripts/native/action/ActionSprint3.cpp +++ b/scripts/native/action/ActionSprint3.cpp @@ -3,7 +3,7 @@ class ActionSprint3 : public ActionScript { public: - ActionSprint3() : ActionScript( "ActionSprint3", 3 ) + ActionSprint3() : ActionScript( 3 ) {} void onCastFinish( Core::Entity::Player& player, Core::Entity::Actor& targetActor ) override diff --git a/scripts/native/aetheryte/Aethernet.cpp b/scripts/native/aetheryte/Aethernet.cpp index b3881120..9a3ccd8f 100644 --- a/scripts/native/aetheryte/Aethernet.cpp +++ b/scripts/native/aetheryte/Aethernet.cpp @@ -12,7 +12,7 @@ class Aethernet : public EventScript { public: - Aethernet() : EventScript( "Aethernet", EVENTSCRIPT_AETHERNET_ID ) + Aethernet() : EventScript( EVENTSCRIPT_AETHERNET_ID ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override diff --git a/scripts/native/aetheryte/Aetheryte.cpp b/scripts/native/aetheryte/Aetheryte.cpp index 96ba8675..51ba6cb1 100644 --- a/scripts/native/aetheryte/Aetheryte.cpp +++ b/scripts/native/aetheryte/Aetheryte.cpp @@ -13,7 +13,7 @@ class Aetheryte : public EventScript { public: - Aetheryte() : EventScript( "Aetheryte", EVENTSCRIPT_AETHERYTE_ID ) + Aetheryte() : EventScript( EVENTSCRIPT_AETHERYTE_ID ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override diff --git a/scripts/native/opening/OpeningGridania.cpp b/scripts/native/opening/OpeningGridania.cpp index c6463ef7..9f6d6f0a 100644 --- a/scripts/native/opening/OpeningGridania.cpp +++ b/scripts/native/opening/OpeningGridania.cpp @@ -65,7 +65,7 @@ private: } public: - OpeningGridania() : EventScript( "OpeningGridania", 1245186 ) + OpeningGridania() : EventScript( 1245186 ) {} void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override diff --git a/scripts/native/opening/OpeningLimsa.cpp b/scripts/native/opening/OpeningLimsa.cpp index 369e8686..a40ea482 100644 --- a/scripts/native/opening/OpeningLimsa.cpp +++ b/scripts/native/opening/OpeningLimsa.cpp @@ -81,7 +81,7 @@ private: public: - OpeningLimsa() : EventScript( "OpeningLimsa", 1245185 ) {} + OpeningLimsa() : EventScript( 1245185 ) {} void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override { diff --git a/scripts/native/opening/OpeningUldah.cpp b/scripts/native/opening/OpeningUldah.cpp index ba940295..fdd1c5d2 100644 --- a/scripts/native/opening/OpeningUldah.cpp +++ b/scripts/native/opening/OpeningUldah.cpp @@ -65,7 +65,7 @@ private: public: - OpeningUldah() : EventScript( "OpeningUldah", 1245187 ) {} + OpeningUldah() : EventScript( 1245187 ) {} void onEnterZone( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override { diff --git a/scripts/native/quest/ManFst001.cpp b/scripts/native/quest/ManFst001.cpp index 726d2dc5..b73581ac 100644 --- a/scripts/native/quest/ManFst001.cpp +++ b/scripts/native/quest/ManFst001.cpp @@ -90,7 +90,7 @@ private: } public: - ManFst001() : EventScript( "ManFst001", 65575 ) {} + ManFst001() : EventScript( 65575 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManFst002.cpp b/scripts/native/quest/ManFst002.cpp index 6b084490..707150cb 100644 --- a/scripts/native/quest/ManFst002.cpp +++ b/scripts/native/quest/ManFst002.cpp @@ -189,7 +189,7 @@ private: } public: - ManFst002() : EventScript( "ManFst002", 65621 ) {} + ManFst002() : EventScript( 65621 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManFst003.cpp b/scripts/native/quest/ManFst003.cpp index e564a7ca..c8cd4da6 100644 --- a/scripts/native/quest/ManFst003.cpp +++ b/scripts/native/quest/ManFst003.cpp @@ -12,7 +12,7 @@ private: public: - ManFst003() : EventScript( "ManFst003", 65659 ) {} + ManFst003() : EventScript( 65659 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManFst004.cpp b/scripts/native/quest/ManFst004.cpp index b8896a41..18ac04b8 100644 --- a/scripts/native/quest/ManFst004.cpp +++ b/scripts/native/quest/ManFst004.cpp @@ -71,7 +71,7 @@ class ManFst004 : public EventScript static constexpr auto UnlockDesion = 14; public: - ManFst004() : EventScript( "Close to Home", 65660 ){}; + ManFst004() : EventScript( 65660 ){}; ~ManFst004(){}; ////////////////////////////////////////////////////////////////////// diff --git a/scripts/native/quest/ManSea001.cpp b/scripts/native/quest/ManSea001.cpp index 2a3e4aaa..aee4da80 100644 --- a/scripts/native/quest/ManSea001.cpp +++ b/scripts/native/quest/ManSea001.cpp @@ -145,7 +145,7 @@ private: } public: - ManSea001() : EventScript( "ManSea001", 65643 ) {} + ManSea001() : EventScript( 65643 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManSea002.cpp b/scripts/native/quest/ManSea002.cpp index 5db24e06..57d7dda7 100644 --- a/scripts/native/quest/ManSea002.cpp +++ b/scripts/native/quest/ManSea002.cpp @@ -136,7 +136,7 @@ private: player.eventPlay( getId(), 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0, callback ); } public: - ManSea002() : EventScript( "ManSea002", 65644 ) {} + ManSea002() : EventScript( 65644 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManWil001.cpp b/scripts/native/quest/ManWil001.cpp index 93b7f42f..ee04e2aa 100644 --- a/scripts/native/quest/ManWil001.cpp +++ b/scripts/native/quest/ManWil001.cpp @@ -129,7 +129,7 @@ private: public: - ManWil001() : EventScript( "ManWil001", 66130 ) {} + ManWil001() : EventScript( 66130 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/ManWil002.cpp b/scripts/native/quest/ManWil002.cpp index 3f1c399c..9f160f72 100644 --- a/scripts/native/quest/ManWil002.cpp +++ b/scripts/native/quest/ManWil002.cpp @@ -144,7 +144,7 @@ private: public: - ManWil002() : EventScript( "ManWil002", 66104 ) { } + ManWil002() : EventScript( 66104 ) { } void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/subquest/gridania/SubFst001.cpp b/scripts/native/quest/subquest/gridania/SubFst001.cpp index c6b18dbc..2aedc7f8 100644 --- a/scripts/native/quest/subquest/gridania/SubFst001.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst001.cpp @@ -60,7 +60,7 @@ private: public: - SubFst001() : EventScript( "SubFst001", 65560 ) {} + SubFst001() : EventScript( 65560 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/subquest/gridania/SubFst002.cpp b/scripts/native/quest/subquest/gridania/SubFst002.cpp index d128fe0f..2e32fa23 100644 --- a/scripts/native/quest/subquest/gridania/SubFst002.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst002.cpp @@ -1,76 +1,76 @@ -#include "../../../ScriptObject.h" - -// Quest Script: SubFst002_00025 -// Quest Name: Quarrels with Squirrels -// Quest ID: 65561 -// Start NPC: 1000263 -// End NPC: 1000263 - -class SubFst002 : public EventScript -{ -private: - static constexpr auto SEQ_0 = 0; - static constexpr auto SEQ_1 = 1; - static constexpr auto SEQ_2 = 2; - static constexpr auto SEQ_FINISH = 255; - static constexpr auto ACTOR0 = 1000263; - static constexpr auto ENEMY0 = 37; - static constexpr auto SEQ_0_ACTOR0 = 0; - static constexpr auto SEQ_2_ACTOR0 = 1; - - void Scene00000( Entity::Player& player ) - { - auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 ) - { - if( param2 == 1 ) // accept quest - { - player.updateQuest( getId(), SEQ_1 ); - } - }; - - player.eventPlay( getId (), 0, NONE, callback ); - } - - void Scene00001(Entity::Player& player) - { - auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 ) - { - if( param2 == 1 ) // finish quest - { - if( player.giveQuestRewards( getId(), 0 ) ) - player.finishQuest( getId() ); - } - }; - - player.eventPlay( getId(), 1, NONE, callback ); - } - -public: - SubFst002() : EventScript( "SubFst002", 65561 ) {} - - void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override - { - auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); - - if( actor == ACTOR0 && !player.hasQuest( getId() ) ) - Scene00000( player ); - else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) - Scene00001( player ); - } - - void onNpcKill( uint32_t npcId, Entity::Player& player ) override - { - if( npcId != ENEMY0 ) - return; - - auto currentKC = player.getQuestUI8AL( getId() ) + 1; - - if( currentKC >= 6 ) - player.updateQuest( getId(), SEQ_FINISH ); - else - { - player.setQuestUI8AL( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); - } - } -}; +#include "../../../ScriptObject.h" + +// Quest Script: SubFst002_00025 +// Quest Name: Quarrels with Squirrels +// Quest ID: 65561 +// Start NPC: 1000263 +// End NPC: 1000263 + +class SubFst002 : public EventScript +{ +private: + static constexpr auto SEQ_0 = 0; + static constexpr auto SEQ_1 = 1; + static constexpr auto SEQ_2 = 2; + static constexpr auto SEQ_FINISH = 255; + static constexpr auto ACTOR0 = 1000263; + static constexpr auto ENEMY0 = 37; + static constexpr auto SEQ_0_ACTOR0 = 0; + static constexpr auto SEQ_2_ACTOR0 = 1; + + void Scene00000( Entity::Player& player ) + { + auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 ) + { + if( param2 == 1 ) // accept quest + { + player.updateQuest( getId(), SEQ_1 ); + } + }; + + player.eventPlay( getId (), 0, NONE, callback ); + } + + void Scene00001(Entity::Player& player) + { + auto callback = [&]( Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2, uint16_t param3 ) + { + if( param2 == 1 ) // finish quest + { + if( player.giveQuestRewards( getId(), 0 ) ) + player.finishQuest( getId() ); + } + }; + + player.eventPlay( getId(), 1, NONE, callback ); + } + +public: + SubFst002() : EventScript( 65561 ) {} + + void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override + { + auto actor = Event::mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); + + if( actor == ACTOR0 && !player.hasQuest( getId() ) ) + Scene00000( player ); + else if( actor == ACTOR0 && player.getQuestSeq( getId() ) == SEQ_FINISH ) + Scene00001( player ); + } + + void onNpcKill( uint32_t npcId, Entity::Player& player ) override + { + if( npcId != ENEMY0 ) + return; + + auto currentKC = player.getQuestUI8AL( getId() ) + 1; + + if( currentKC >= 6 ) + player.updateQuest( getId(), SEQ_FINISH ); + else + { + player.setQuestUI8AL( getId(), currentKC ); + player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + } + } +}; diff --git a/scripts/native/quest/subquest/gridania/SubFst010.cpp b/scripts/native/quest/subquest/gridania/SubFst010.cpp index bccd887d..e3e03582 100644 --- a/scripts/native/quest/subquest/gridania/SubFst010.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst010.cpp @@ -42,7 +42,7 @@ private: } public: - SubFst010() : EventScript( "SubFst010", 65537 ) {} + SubFst010() : EventScript( 65537 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/scripts/native/quest/subquest/gridania/SubFst013.cpp b/scripts/native/quest/subquest/gridania/SubFst013.cpp index d696642f..7bf4f6da 100644 --- a/scripts/native/quest/subquest/gridania/SubFst013.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst013.cpp @@ -148,7 +148,7 @@ private: public: - SubFst013() : EventScript( "SubFst013", 65576 ) {} + SubFst013() : EventScript( 65576 ) {} void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { diff --git a/src/servers/sapphire_zone/Script/NativeScriptApi.h b/src/servers/sapphire_zone/Script/NativeScriptApi.h index 4835027d..72c0fac6 100644 --- a/src/servers/sapphire_zone/Script/NativeScriptApi.h +++ b/src/servers/sapphire_zone/Script/NativeScriptApi.h @@ -24,22 +24,15 @@ using namespace Core; class ScriptObject { protected: - std::string m_scriptName; uint32_t m_id; std::size_t m_type; public: - ScriptObject( std::string name, uint32_t id, std::size_t type ) : - m_scriptName( name ), + ScriptObject( uint32_t id, std::size_t type ) : m_id( id ), m_type( type ) { } - virtual const std::string& getName() const - { - return m_scriptName; - } - virtual uint32_t getId() const { return m_id; @@ -55,8 +48,8 @@ public: class StatusEffectScript : public ScriptObject { public: - StatusEffectScript( std::string name, uint32_t effectId ) : - ScriptObject( name, effectId, typeid( StatusEffectScript ).hash_code() ) + StatusEffectScript( uint32_t effectId ) : + ScriptObject( effectId, typeid( StatusEffectScript ).hash_code() ) { } virtual void onTick( Entity::Actor& actor ) { } @@ -73,8 +66,8 @@ public: class ActionScript : public ScriptObject { public: - ActionScript( std::string name, uint32_t abilityId ) : - ScriptObject( name, abilityId, typeid( ActionScript ).hash_code() ) + ActionScript( uint32_t abilityId ) : + ScriptObject( abilityId, typeid( ActionScript ).hash_code() ) { } virtual void onStart( Entity::Actor& sourceActor, Entity::Actor& targetActor ) { } @@ -86,8 +79,8 @@ public: class EventScript : public ScriptObject { public: - EventScript( std::string name, uint32_t questId ) : - ScriptObject( name, questId, typeid( EventScript ).hash_code() ) + EventScript( uint32_t questId ) : + ScriptObject( questId, typeid( EventScript ).hash_code() ) { } virtual void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) { } @@ -104,16 +97,16 @@ public: class BattleNpcScript : public ScriptObject { public: - BattleNpcScript( std::string name, uint32_t npcId ) : - ScriptObject( name, npcId, typeid( BattleNpcScript ).hash_code() ) + BattleNpcScript( uint32_t npcId ) : + ScriptObject( npcId, typeid( BattleNpcScript ).hash_code() ) { } }; class ZoneScript : public ScriptObject { public: - ZoneScript( std::string name, uint32_t zoneId ) : - ScriptObject( name, zoneId, typeid( ZoneScript ).hash_code() ) + ZoneScript( uint32_t zoneId ) : + ScriptObject( zoneId, typeid( ZoneScript ).hash_code() ) { } virtual void onZoneInit() { } From ef007bb442b089f6932685c70446d2b2f71d5ac9 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 19 Jan 2018 20:29:29 +1100 Subject: [PATCH 16/45] update libs submodule --- src/libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries b/src/libraries index bab17595..e58b804b 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit bab17595d24c697c6abea881e7849b388c898647 +Subproject commit e58b804be5672cade4c55cd5f5ec60889d817550 From aabcdf6e74937c84c4f3521a0c82965b484d836d Mon Sep 17 00:00:00 2001 From: Mordred Date: Sat, 27 Jan 2018 23:52:49 +0100 Subject: [PATCH 17/45] Replacement of old ZoneMgr --- src/common/CMakeLists.txt | 3 +- src/common/Common.h | 23 - src/common/Exd/ExdData.cpp | 3 + src/common/Exd/ExdData.h | 1 + .../Exd}/ExdDataGenerated.cpp | 1 + .../Exd}/ExdDataGenerated.h | 585 +++++++++--------- src/libraries | 2 +- src/servers/sapphire_zone/Actor/Player.cpp | 15 +- .../sapphire_zone/Actor/PlayerInventory.cpp | 1 - src/servers/sapphire_zone/Actor/PlayerSql.cpp | 8 +- .../DebugCommand/DebugCommandHandler.cpp | 4 +- .../Network/Handlers/ActionHandler.cpp | 2 - .../Network/Handlers/GMCommandHandlers.cpp | 16 +- .../Network/Handlers/InventoryHandler.cpp | 2 - .../Network/Handlers/PacketHandlers.cpp | 14 +- .../sapphire_zone/Script/ScriptManager.cpp | 2 +- src/servers/sapphire_zone/ServerZone.cpp | 25 +- .../sapphire_zone/Zone/TerritoryMgr.cpp | 201 ++++++ src/servers/sapphire_zone/Zone/TerritoryMgr.h | 133 ++++ src/servers/sapphire_zone/Zone/Zone.cpp | 59 +- src/servers/sapphire_zone/Zone/Zone.h | 23 +- src/servers/sapphire_zone/Zone/ZoneMgr.cpp | 89 --- src/servers/sapphire_zone/Zone/ZoneMgr.h | 39 -- src/tools/exd_struct_test/main.cpp | 2 +- 24 files changed, 723 insertions(+), 530 deletions(-) rename src/{tools/exd_struct_test => common/Exd}/ExdDataGenerated.cpp (99%) rename src/{tools/exd_struct_test => common/Exd}/ExdDataGenerated.h (88%) create mode 100644 src/servers/sapphire_zone/Zone/TerritoryMgr.cpp create mode 100644 src/servers/sapphire_zone/Zone/TerritoryMgr.h delete mode 100644 src/servers/sapphire_zone/Zone/ZoneMgr.cpp delete mode 100644 src/servers/sapphire_zone/Zone/ZoneMgr.h diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 7d9fd527..606f027b 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -5,7 +5,8 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) file(GLOB UTILS_PUBLIC_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/Exd/*.h" ) file(GLOB UTILS_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/Config/*.cpp" diff --git a/src/common/Common.h b/src/common/Common.h index 993d8efe..94736d9b 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -162,29 +162,6 @@ namespace Common { instance, }; - enum TerritoryIntendedUseType : uint8_t //ToDo: Add The Rest of The Territory Types and Have Better Names For Them - { - Town = 0, - OpenWorld = 1, - Inn = 2, - Dungeon = 3, - JailArea = 5, - OpeningArea = 6, - BeforeTrialDung = 7, - AllianceRaid = 8, - OpenWorldInstanceBattle = 9, - Trial = 10, - HousingArea = 13, - HousingPrivateArea = 14, - MSQPrivateArea = 15, - Raids = 16, - RaidFights = 17, - ChocoboTutorial = 21, - Wedding = 22, - BeginnerTutorial = 27, - PalaceOfTheDead = 31, - }; - enum CharaLook : uint8_t { Race = 0x00, diff --git a/src/common/Exd/ExdData.cpp b/src/common/Exd/ExdData.cpp index 73aa85f0..52b192af 100644 --- a/src/common/Exd/ExdData.cpp +++ b/src/common/Exd/ExdData.cpp @@ -89,6 +89,7 @@ bool Core::Data::ExdData::loadZoneInfo() auto weatherRateFields = weatherRate.get_row( weather_rate ); int32_t aetheryte_index = getField< int32_t >( fields, 23 ); + uint8_t zoneType = getField< uint8_t >( fields, 9 ); ZoneInfo info{ 0 }; @@ -101,6 +102,8 @@ bool Core::Data::ExdData::loadZoneInfo() info.map_id = map_id; info.weather_rate = weather_rate; // TODO: deal with weather groups info.aetheryte_index = aetheryte_index; + info.zone_type = zoneType; + uint8_t sumPc = 0; for( size_t i = 0; i < 16; ) diff --git a/src/common/Exd/ExdData.h b/src/common/Exd/ExdData.h index 3a5dedf9..d17bffb8 100644 --- a/src/common/Exd/ExdData.h +++ b/src/common/Exd/ExdData.h @@ -37,6 +37,7 @@ namespace Core { std::map< uint8_t, int32_t> weather_rate_map; int32_t aetheryte_index; + uint8_t zone_type; }; struct ClassJobInfo diff --git a/src/tools/exd_struct_test/ExdDataGenerated.cpp b/src/common/Exd/ExdDataGenerated.cpp similarity index 99% rename from src/tools/exd_struct_test/ExdDataGenerated.cpp rename to src/common/Exd/ExdDataGenerated.cpp index f8d711b8..ff6e1a45 100644 --- a/src/tools/exd_struct_test/ExdDataGenerated.cpp +++ b/src/common/Exd/ExdDataGenerated.cpp @@ -3532,6 +3532,7 @@ placeNameZone = exdData->getField< uint16_t >( row, 4 ); placeName = exdData->getField< uint16_t >( row, 5 ); map = exdData->getField< uint16_t >( row, 6 ); + territoryIntendedUse = exdData->getField< uint8_t >( row, 9 ); weatherRate = exdData->getField< uint8_t >( row, 12 ); aetheryte = exdData->getField< int32_t >( row, 23 ); } diff --git a/src/tools/exd_struct_test/ExdDataGenerated.h b/src/common/Exd/ExdDataGenerated.h similarity index 88% rename from src/tools/exd_struct_test/ExdDataGenerated.h rename to src/common/Exd/ExdDataGenerated.h index 24b1149d..34db4a36 100644 --- a/src/tools/exd_struct_test/ExdDataGenerated.h +++ b/src/common/Exd/ExdDataGenerated.h @@ -1,5 +1,5 @@ -#ifndef _EXDDATA_H -#define _EXDDATA_H +#ifndef _EXDDATAGENERATED_H +#define _EXDDATAGENERATED_H /* This file has been automatically generated. Changes will be lost upon regeneration. @@ -3020,6 +3020,7 @@ struct TerritoryType uint16_t placeNameZone; uint16_t placeName; uint16_t map; + uint8_t territoryIntendedUse; uint8_t weatherRate; int32_t aetheryte; @@ -4188,1741 +4189,1741 @@ struct WorldDCGroupType std::set< uint32_t > m_WorldDCGroupTypeIdList; -const std::set< uint32_t >& getAchievementIdList() +const std::set< uint32_t >& ExdDataGenerated::getAchievementIdList() { if( m_AchievementIdList.size() == 0 ) loadIdList( m_AchievementDat, m_AchievementIdList ); return m_AchievementIdList; } -const std::set< uint32_t >& getAchievementCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getAchievementCategoryIdList() { if( m_AchievementCategoryIdList.size() == 0 ) loadIdList( m_AchievementCategoryDat, m_AchievementCategoryIdList ); return m_AchievementCategoryIdList; } -const std::set< uint32_t >& getAchievementKindIdList() +const std::set< uint32_t >& ExdDataGenerated::getAchievementKindIdList() { if( m_AchievementKindIdList.size() == 0 ) loadIdList( m_AchievementKindDat, m_AchievementKindIdList ); return m_AchievementKindIdList; } -const std::set< uint32_t >& getActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionIdList() { if( m_ActionIdList.size() == 0 ) loadIdList( m_ActionDat, m_ActionIdList ); return m_ActionIdList; } -const std::set< uint32_t >& getActionCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionCategoryIdList() { if( m_ActionCategoryIdList.size() == 0 ) loadIdList( m_ActionCategoryDat, m_ActionCategoryIdList ); return m_ActionCategoryIdList; } -const std::set< uint32_t >& getActionComboRouteIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionComboRouteIdList() { if( m_ActionComboRouteIdList.size() == 0 ) loadIdList( m_ActionComboRouteDat, m_ActionComboRouteIdList ); return m_ActionComboRouteIdList; } -const std::set< uint32_t >& getActionIndirectionIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionIndirectionIdList() { if( m_ActionIndirectionIdList.size() == 0 ) loadIdList( m_ActionIndirectionDat, m_ActionIndirectionIdList ); return m_ActionIndirectionIdList; } -const std::set< uint32_t >& getActionProcStatusIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionProcStatusIdList() { if( m_ActionProcStatusIdList.size() == 0 ) loadIdList( m_ActionProcStatusDat, m_ActionProcStatusIdList ); return m_ActionProcStatusIdList; } -const std::set< uint32_t >& getActionTimelineIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionTimelineIdList() { if( m_ActionTimelineIdList.size() == 0 ) loadIdList( m_ActionTimelineDat, m_ActionTimelineIdList ); return m_ActionTimelineIdList; } -const std::set< uint32_t >& getActionTransientIdList() +const std::set< uint32_t >& ExdDataGenerated::getActionTransientIdList() { if( m_ActionTransientIdList.size() == 0 ) loadIdList( m_ActionTransientDat, m_ActionTransientIdList ); return m_ActionTransientIdList; } -const std::set< uint32_t >& getAddonIdList() +const std::set< uint32_t >& ExdDataGenerated::getAddonIdList() { if( m_AddonIdList.size() == 0 ) loadIdList( m_AddonDat, m_AddonIdList ); return m_AddonIdList; } -const std::set< uint32_t >& getAdventureIdList() +const std::set< uint32_t >& ExdDataGenerated::getAdventureIdList() { if( m_AdventureIdList.size() == 0 ) loadIdList( m_AdventureDat, m_AdventureIdList ); return m_AdventureIdList; } -const std::set< uint32_t >& getAdventureExPhaseIdList() +const std::set< uint32_t >& ExdDataGenerated::getAdventureExPhaseIdList() { if( m_AdventureExPhaseIdList.size() == 0 ) loadIdList( m_AdventureExPhaseDat, m_AdventureExPhaseIdList ); return m_AdventureExPhaseIdList; } -const std::set< uint32_t >& getAetherCurrentIdList() +const std::set< uint32_t >& ExdDataGenerated::getAetherCurrentIdList() { if( m_AetherCurrentIdList.size() == 0 ) loadIdList( m_AetherCurrentDat, m_AetherCurrentIdList ); return m_AetherCurrentIdList; } -const std::set< uint32_t >& getAetherialWheelIdList() +const std::set< uint32_t >& ExdDataGenerated::getAetherialWheelIdList() { if( m_AetherialWheelIdList.size() == 0 ) loadIdList( m_AetherialWheelDat, m_AetherialWheelIdList ); return m_AetherialWheelIdList; } -const std::set< uint32_t >& getAetheryteIdList() +const std::set< uint32_t >& ExdDataGenerated::getAetheryteIdList() { if( m_AetheryteIdList.size() == 0 ) loadIdList( m_AetheryteDat, m_AetheryteIdList ); return m_AetheryteIdList; } -const std::set< uint32_t >& getAirshipExplorationLevelIdList() +const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationLevelIdList() { if( m_AirshipExplorationLevelIdList.size() == 0 ) loadIdList( m_AirshipExplorationLevelDat, m_AirshipExplorationLevelIdList ); return m_AirshipExplorationLevelIdList; } -const std::set< uint32_t >& getAirshipExplorationLogIdList() +const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationLogIdList() { if( m_AirshipExplorationLogIdList.size() == 0 ) loadIdList( m_AirshipExplorationLogDat, m_AirshipExplorationLogIdList ); return m_AirshipExplorationLogIdList; } -const std::set< uint32_t >& getAirshipExplorationParamTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationParamTypeIdList() { if( m_AirshipExplorationParamTypeIdList.size() == 0 ) loadIdList( m_AirshipExplorationParamTypeDat, m_AirshipExplorationParamTypeIdList ); return m_AirshipExplorationParamTypeIdList; } -const std::set< uint32_t >& getAirshipExplorationPartIdList() +const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationPartIdList() { if( m_AirshipExplorationPartIdList.size() == 0 ) loadIdList( m_AirshipExplorationPartDat, m_AirshipExplorationPartIdList ); return m_AirshipExplorationPartIdList; } -const std::set< uint32_t >& getAirshipExplorationPointIdList() +const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationPointIdList() { if( m_AirshipExplorationPointIdList.size() == 0 ) loadIdList( m_AirshipExplorationPointDat, m_AirshipExplorationPointIdList ); return m_AirshipExplorationPointIdList; } -const std::set< uint32_t >& getAnimaWeapon5IdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5IdList() { if( m_AnimaWeapon5IdList.size() == 0 ) loadIdList( m_AnimaWeapon5Dat, m_AnimaWeapon5IdList ); return m_AnimaWeapon5IdList; } -const std::set< uint32_t >& getAnimaWeapon5ParamIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5ParamIdList() { if( m_AnimaWeapon5ParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5ParamDat, m_AnimaWeapon5ParamIdList ); return m_AnimaWeapon5ParamIdList; } -const std::set< uint32_t >& getAnimaWeapon5PatternGroupIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5PatternGroupIdList() { if( m_AnimaWeapon5PatternGroupIdList.size() == 0 ) loadIdList( m_AnimaWeapon5PatternGroupDat, m_AnimaWeapon5PatternGroupIdList ); return m_AnimaWeapon5PatternGroupIdList; } -const std::set< uint32_t >& getAnimaWeapon5SpiritTalkIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5SpiritTalkIdList() { if( m_AnimaWeapon5SpiritTalkIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkDat, m_AnimaWeapon5SpiritTalkIdList ); return m_AnimaWeapon5SpiritTalkIdList; } -const std::set< uint32_t >& getAnimaWeapon5SpiritTalkParamIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5SpiritTalkParamIdList() { if( m_AnimaWeapon5SpiritTalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkParamDat, m_AnimaWeapon5SpiritTalkParamIdList ); return m_AnimaWeapon5SpiritTalkParamIdList; } -const std::set< uint32_t >& getAnimaWeapon5TradeItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5TradeItemIdList() { if( m_AnimaWeapon5TradeItemIdList.size() == 0 ) loadIdList( m_AnimaWeapon5TradeItemDat, m_AnimaWeapon5TradeItemIdList ); return m_AnimaWeapon5TradeItemIdList; } -const std::set< uint32_t >& getAnimaWeaponFUITalkIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponFUITalkIdList() { if( m_AnimaWeaponFUITalkIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkDat, m_AnimaWeaponFUITalkIdList ); return m_AnimaWeaponFUITalkIdList; } -const std::set< uint32_t >& getAnimaWeaponFUITalkParamIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponFUITalkParamIdList() { if( m_AnimaWeaponFUITalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkParamDat, m_AnimaWeaponFUITalkParamIdList ); return m_AnimaWeaponFUITalkParamIdList; } -const std::set< uint32_t >& getAnimaWeaponIconIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponIconIdList() { if( m_AnimaWeaponIconIdList.size() == 0 ) loadIdList( m_AnimaWeaponIconDat, m_AnimaWeaponIconIdList ); return m_AnimaWeaponIconIdList; } -const std::set< uint32_t >& getAnimaWeaponItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponItemIdList() { if( m_AnimaWeaponItemIdList.size() == 0 ) loadIdList( m_AnimaWeaponItemDat, m_AnimaWeaponItemIdList ); return m_AnimaWeaponItemIdList; } -const std::set< uint32_t >& getAquariumFishIdList() +const std::set< uint32_t >& ExdDataGenerated::getAquariumFishIdList() { if( m_AquariumFishIdList.size() == 0 ) loadIdList( m_AquariumFishDat, m_AquariumFishIdList ); return m_AquariumFishIdList; } -const std::set< uint32_t >& getAquariumWaterIdList() +const std::set< uint32_t >& ExdDataGenerated::getAquariumWaterIdList() { if( m_AquariumWaterIdList.size() == 0 ) loadIdList( m_AquariumWaterDat, m_AquariumWaterIdList ); return m_AquariumWaterIdList; } -const std::set< uint32_t >& getAttackTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getAttackTypeIdList() { if( m_AttackTypeIdList.size() == 0 ) loadIdList( m_AttackTypeDat, m_AttackTypeIdList ); return m_AttackTypeIdList; } -const std::set< uint32_t >& getBalloonIdList() +const std::set< uint32_t >& ExdDataGenerated::getBalloonIdList() { if( m_BalloonIdList.size() == 0 ) loadIdList( m_BalloonDat, m_BalloonIdList ); return m_BalloonIdList; } -const std::set< uint32_t >& getBaseParamIdList() +const std::set< uint32_t >& ExdDataGenerated::getBaseParamIdList() { if( m_BaseParamIdList.size() == 0 ) loadIdList( m_BaseParamDat, m_BaseParamIdList ); return m_BaseParamIdList; } -const std::set< uint32_t >& getBattleLeveIdList() +const std::set< uint32_t >& ExdDataGenerated::getBattleLeveIdList() { if( m_BattleLeveIdList.size() == 0 ) loadIdList( m_BattleLeveDat, m_BattleLeveIdList ); return m_BattleLeveIdList; } -const std::set< uint32_t >& getBeastRankBonusIdList() +const std::set< uint32_t >& ExdDataGenerated::getBeastRankBonusIdList() { if( m_BeastRankBonusIdList.size() == 0 ) loadIdList( m_BeastRankBonusDat, m_BeastRankBonusIdList ); return m_BeastRankBonusIdList; } -const std::set< uint32_t >& getBeastReputationRankIdList() +const std::set< uint32_t >& ExdDataGenerated::getBeastReputationRankIdList() { if( m_BeastReputationRankIdList.size() == 0 ) loadIdList( m_BeastReputationRankDat, m_BeastReputationRankIdList ); return m_BeastReputationRankIdList; } -const std::set< uint32_t >& getBeastTribeIdList() +const std::set< uint32_t >& ExdDataGenerated::getBeastTribeIdList() { if( m_BeastTribeIdList.size() == 0 ) loadIdList( m_BeastTribeDat, m_BeastTribeIdList ); return m_BeastTribeIdList; } -const std::set< uint32_t >& getBehaviorIdList() +const std::set< uint32_t >& ExdDataGenerated::getBehaviorIdList() { if( m_BehaviorIdList.size() == 0 ) loadIdList( m_BehaviorDat, m_BehaviorIdList ); return m_BehaviorIdList; } -const std::set< uint32_t >& getBGMIdList() +const std::set< uint32_t >& ExdDataGenerated::getBGMIdList() { if( m_BGMIdList.size() == 0 ) loadIdList( m_BGMDat, m_BGMIdList ); return m_BGMIdList; } -const std::set< uint32_t >& getBNpcAnnounceIconIdList() +const std::set< uint32_t >& ExdDataGenerated::getBNpcAnnounceIconIdList() { if( m_BNpcAnnounceIconIdList.size() == 0 ) loadIdList( m_BNpcAnnounceIconDat, m_BNpcAnnounceIconIdList ); return m_BNpcAnnounceIconIdList; } -const std::set< uint32_t >& getBNpcBaseIdList() +const std::set< uint32_t >& ExdDataGenerated::getBNpcBaseIdList() { if( m_BNpcBaseIdList.size() == 0 ) loadIdList( m_BNpcBaseDat, m_BNpcBaseIdList ); return m_BNpcBaseIdList; } -const std::set< uint32_t >& getBNpcCustomizeIdList() +const std::set< uint32_t >& ExdDataGenerated::getBNpcCustomizeIdList() { if( m_BNpcCustomizeIdList.size() == 0 ) loadIdList( m_BNpcCustomizeDat, m_BNpcCustomizeIdList ); return m_BNpcCustomizeIdList; } -const std::set< uint32_t >& getBNpcNameIdList() +const std::set< uint32_t >& ExdDataGenerated::getBNpcNameIdList() { if( m_BNpcNameIdList.size() == 0 ) loadIdList( m_BNpcNameDat, m_BNpcNameIdList ); return m_BNpcNameIdList; } -const std::set< uint32_t >& getBuddyActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getBuddyActionIdList() { if( m_BuddyActionIdList.size() == 0 ) loadIdList( m_BuddyActionDat, m_BuddyActionIdList ); return m_BuddyActionIdList; } -const std::set< uint32_t >& getBuddyEquipIdList() +const std::set< uint32_t >& ExdDataGenerated::getBuddyEquipIdList() { if( m_BuddyEquipIdList.size() == 0 ) loadIdList( m_BuddyEquipDat, m_BuddyEquipIdList ); return m_BuddyEquipIdList; } -const std::set< uint32_t >& getBuddyItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getBuddyItemIdList() { if( m_BuddyItemIdList.size() == 0 ) loadIdList( m_BuddyItemDat, m_BuddyItemIdList ); return m_BuddyItemIdList; } -const std::set< uint32_t >& getBuddyRankIdList() +const std::set< uint32_t >& ExdDataGenerated::getBuddyRankIdList() { if( m_BuddyRankIdList.size() == 0 ) loadIdList( m_BuddyRankDat, m_BuddyRankIdList ); return m_BuddyRankIdList; } -const std::set< uint32_t >& getBuddySkillIdList() +const std::set< uint32_t >& ExdDataGenerated::getBuddySkillIdList() { if( m_BuddySkillIdList.size() == 0 ) loadIdList( m_BuddySkillDat, m_BuddySkillIdList ); return m_BuddySkillIdList; } -const std::set< uint32_t >& getCabinetIdList() +const std::set< uint32_t >& ExdDataGenerated::getCabinetIdList() { if( m_CabinetIdList.size() == 0 ) loadIdList( m_CabinetDat, m_CabinetIdList ); return m_CabinetIdList; } -const std::set< uint32_t >& getCabinetCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getCabinetCategoryIdList() { if( m_CabinetCategoryIdList.size() == 0 ) loadIdList( m_CabinetCategoryDat, m_CabinetCategoryIdList ); return m_CabinetCategoryIdList; } -const std::set< uint32_t >& getCalendarIdList() +const std::set< uint32_t >& ExdDataGenerated::getCalendarIdList() { if( m_CalendarIdList.size() == 0 ) loadIdList( m_CalendarDat, m_CalendarIdList ); return m_CalendarIdList; } -const std::set< uint32_t >& getChainBonusIdList() +const std::set< uint32_t >& ExdDataGenerated::getChainBonusIdList() { if( m_ChainBonusIdList.size() == 0 ) loadIdList( m_ChainBonusDat, m_ChainBonusIdList ); return m_ChainBonusIdList; } -const std::set< uint32_t >& getCharaMakeCustomizeIdList() +const std::set< uint32_t >& ExdDataGenerated::getCharaMakeCustomizeIdList() { if( m_CharaMakeCustomizeIdList.size() == 0 ) loadIdList( m_CharaMakeCustomizeDat, m_CharaMakeCustomizeIdList ); return m_CharaMakeCustomizeIdList; } -const std::set< uint32_t >& getCharaMakeTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getCharaMakeTypeIdList() { if( m_CharaMakeTypeIdList.size() == 0 ) loadIdList( m_CharaMakeTypeDat, m_CharaMakeTypeIdList ); return m_CharaMakeTypeIdList; } -const std::set< uint32_t >& getChocoboRaceIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceIdList() { if( m_ChocoboRaceIdList.size() == 0 ) loadIdList( m_ChocoboRaceDat, m_ChocoboRaceIdList ); return m_ChocoboRaceIdList; } -const std::set< uint32_t >& getChocoboRaceAbilityIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceAbilityIdList() { if( m_ChocoboRaceAbilityIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityDat, m_ChocoboRaceAbilityIdList ); return m_ChocoboRaceAbilityIdList; } -const std::set< uint32_t >& getChocoboRaceAbilityTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceAbilityTypeIdList() { if( m_ChocoboRaceAbilityTypeIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityTypeDat, m_ChocoboRaceAbilityTypeIdList ); return m_ChocoboRaceAbilityTypeIdList; } -const std::set< uint32_t >& getChocoboRaceItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceItemIdList() { if( m_ChocoboRaceItemIdList.size() == 0 ) loadIdList( m_ChocoboRaceItemDat, m_ChocoboRaceItemIdList ); return m_ChocoboRaceItemIdList; } -const std::set< uint32_t >& getChocoboRaceRankIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceRankIdList() { if( m_ChocoboRaceRankIdList.size() == 0 ) loadIdList( m_ChocoboRaceRankDat, m_ChocoboRaceRankIdList ); return m_ChocoboRaceRankIdList; } -const std::set< uint32_t >& getChocoboRaceStatusIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceStatusIdList() { if( m_ChocoboRaceStatusIdList.size() == 0 ) loadIdList( m_ChocoboRaceStatusDat, m_ChocoboRaceStatusIdList ); return m_ChocoboRaceStatusIdList; } -const std::set< uint32_t >& getChocoboRaceTerritoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceTerritoryIdList() { if( m_ChocoboRaceTerritoryIdList.size() == 0 ) loadIdList( m_ChocoboRaceTerritoryDat, m_ChocoboRaceTerritoryIdList ); return m_ChocoboRaceTerritoryIdList; } -const std::set< uint32_t >& getChocoboTaxiStandIdList() +const std::set< uint32_t >& ExdDataGenerated::getChocoboTaxiStandIdList() { if( m_ChocoboTaxiStandIdList.size() == 0 ) loadIdList( m_ChocoboTaxiStandDat, m_ChocoboTaxiStandIdList ); return m_ChocoboTaxiStandIdList; } -const std::set< uint32_t >& getClassJobIdList() +const std::set< uint32_t >& ExdDataGenerated::getClassJobIdList() { if( m_ClassJobIdList.size() == 0 ) loadIdList( m_ClassJobDat, m_ClassJobIdList ); return m_ClassJobIdList; } -const std::set< uint32_t >& getClassJobCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getClassJobCategoryIdList() { if( m_ClassJobCategoryIdList.size() == 0 ) loadIdList( m_ClassJobCategoryDat, m_ClassJobCategoryIdList ); return m_ClassJobCategoryIdList; } -const std::set< uint32_t >& getCompanionIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanionIdList() { if( m_CompanionIdList.size() == 0 ) loadIdList( m_CompanionDat, m_CompanionIdList ); return m_CompanionIdList; } -const std::set< uint32_t >& getCompanionMoveIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanionMoveIdList() { if( m_CompanionMoveIdList.size() == 0 ) loadIdList( m_CompanionMoveDat, m_CompanionMoveIdList ); return m_CompanionMoveIdList; } -const std::set< uint32_t >& getCompanionTransientIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanionTransientIdList() { if( m_CompanionTransientIdList.size() == 0 ) loadIdList( m_CompanionTransientDat, m_CompanionTransientIdList ); return m_CompanionTransientIdList; } -const std::set< uint32_t >& getCompanyActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyActionIdList() { if( m_CompanyActionIdList.size() == 0 ) loadIdList( m_CompanyActionDat, m_CompanyActionIdList ); return m_CompanyActionIdList; } -const std::set< uint32_t >& getCompanyCraftDraftIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftDraftIdList() { if( m_CompanyCraftDraftIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftDat, m_CompanyCraftDraftIdList ); return m_CompanyCraftDraftIdList; } -const std::set< uint32_t >& getCompanyCraftDraftCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftDraftCategoryIdList() { if( m_CompanyCraftDraftCategoryIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftCategoryDat, m_CompanyCraftDraftCategoryIdList ); return m_CompanyCraftDraftCategoryIdList; } -const std::set< uint32_t >& getCompanyCraftManufactoryStateIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftManufactoryStateIdList() { if( m_CompanyCraftManufactoryStateIdList.size() == 0 ) loadIdList( m_CompanyCraftManufactoryStateDat, m_CompanyCraftManufactoryStateIdList ); return m_CompanyCraftManufactoryStateIdList; } -const std::set< uint32_t >& getCompanyCraftPartIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftPartIdList() { if( m_CompanyCraftPartIdList.size() == 0 ) loadIdList( m_CompanyCraftPartDat, m_CompanyCraftPartIdList ); return m_CompanyCraftPartIdList; } -const std::set< uint32_t >& getCompanyCraftProcessIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftProcessIdList() { if( m_CompanyCraftProcessIdList.size() == 0 ) loadIdList( m_CompanyCraftProcessDat, m_CompanyCraftProcessIdList ); return m_CompanyCraftProcessIdList; } -const std::set< uint32_t >& getCompanyCraftSequenceIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftSequenceIdList() { if( m_CompanyCraftSequenceIdList.size() == 0 ) loadIdList( m_CompanyCraftSequenceDat, m_CompanyCraftSequenceIdList ); return m_CompanyCraftSequenceIdList; } -const std::set< uint32_t >& getCompanyCraftSupplyItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftSupplyItemIdList() { if( m_CompanyCraftSupplyItemIdList.size() == 0 ) loadIdList( m_CompanyCraftSupplyItemDat, m_CompanyCraftSupplyItemIdList ); return m_CompanyCraftSupplyItemIdList; } -const std::set< uint32_t >& getCompanyCraftTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftTypeIdList() { if( m_CompanyCraftTypeIdList.size() == 0 ) loadIdList( m_CompanyCraftTypeDat, m_CompanyCraftTypeIdList ); return m_CompanyCraftTypeIdList; } -const std::set< uint32_t >& getCompleteJournalIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompleteJournalIdList() { if( m_CompleteJournalIdList.size() == 0 ) loadIdList( m_CompleteJournalDat, m_CompleteJournalIdList ); return m_CompleteJournalIdList; } -const std::set< uint32_t >& getCompleteJournalCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getCompleteJournalCategoryIdList() { if( m_CompleteJournalCategoryIdList.size() == 0 ) loadIdList( m_CompleteJournalCategoryDat, m_CompleteJournalCategoryIdList ); return m_CompleteJournalCategoryIdList; } -const std::set< uint32_t >& getContentExActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentExActionIdList() { if( m_ContentExActionIdList.size() == 0 ) loadIdList( m_ContentExActionDat, m_ContentExActionIdList ); return m_ContentExActionIdList; } -const std::set< uint32_t >& getContentFinderConditionIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentFinderConditionIdList() { if( m_ContentFinderConditionIdList.size() == 0 ) loadIdList( m_ContentFinderConditionDat, m_ContentFinderConditionIdList ); return m_ContentFinderConditionIdList; } -const std::set< uint32_t >& getContentFinderConditionTransientIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentFinderConditionTransientIdList() { if( m_ContentFinderConditionTransientIdList.size() == 0 ) loadIdList( m_ContentFinderConditionTransientDat, m_ContentFinderConditionTransientIdList ); return m_ContentFinderConditionTransientIdList; } -const std::set< uint32_t >& getContentMemberTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentMemberTypeIdList() { if( m_ContentMemberTypeIdList.size() == 0 ) loadIdList( m_ContentMemberTypeDat, m_ContentMemberTypeIdList ); return m_ContentMemberTypeIdList; } -const std::set< uint32_t >& getContentRouletteIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentRouletteIdList() { if( m_ContentRouletteIdList.size() == 0 ) loadIdList( m_ContentRouletteDat, m_ContentRouletteIdList ); return m_ContentRouletteIdList; } -const std::set< uint32_t >& getContentTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getContentTypeIdList() { if( m_ContentTypeIdList.size() == 0 ) loadIdList( m_ContentTypeDat, m_ContentTypeIdList ); return m_ContentTypeIdList; } -const std::set< uint32_t >& getCraftActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getCraftActionIdList() { if( m_CraftActionIdList.size() == 0 ) loadIdList( m_CraftActionDat, m_CraftActionIdList ); return m_CraftActionIdList; } -const std::set< uint32_t >& getCraftLeveIdList() +const std::set< uint32_t >& ExdDataGenerated::getCraftLeveIdList() { if( m_CraftLeveIdList.size() == 0 ) loadIdList( m_CraftLeveDat, m_CraftLeveIdList ); return m_CraftLeveIdList; } -const std::set< uint32_t >& getCraftTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getCraftTypeIdList() { if( m_CraftTypeIdList.size() == 0 ) loadIdList( m_CraftTypeDat, m_CraftTypeIdList ); return m_CraftTypeIdList; } -const std::set< uint32_t >& getCurrencyIdList() +const std::set< uint32_t >& ExdDataGenerated::getCurrencyIdList() { if( m_CurrencyIdList.size() == 0 ) loadIdList( m_CurrencyDat, m_CurrencyIdList ); return m_CurrencyIdList; } -const std::set< uint32_t >& getCustomTalkIdList() +const std::set< uint32_t >& ExdDataGenerated::getCustomTalkIdList() { if( m_CustomTalkIdList.size() == 0 ) loadIdList( m_CustomTalkDat, m_CustomTalkIdList ); return m_CustomTalkIdList; } -const std::set< uint32_t >& getCutsceneIdList() +const std::set< uint32_t >& ExdDataGenerated::getCutsceneIdList() { if( m_CutsceneIdList.size() == 0 ) loadIdList( m_CutsceneDat, m_CutsceneIdList ); return m_CutsceneIdList; } -const std::set< uint32_t >& getCutScreenImageIdList() +const std::set< uint32_t >& ExdDataGenerated::getCutScreenImageIdList() { if( m_CutScreenImageIdList.size() == 0 ) loadIdList( m_CutScreenImageDat, m_CutScreenImageIdList ); return m_CutScreenImageIdList; } -const std::set< uint32_t >& getDailySupplyItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getDailySupplyItemIdList() { if( m_DailySupplyItemIdList.size() == 0 ) loadIdList( m_DailySupplyItemDat, m_DailySupplyItemIdList ); return m_DailySupplyItemIdList; } -const std::set< uint32_t >& getDeepDungeonBanIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonBanIdList() { if( m_DeepDungeonBanIdList.size() == 0 ) loadIdList( m_DeepDungeonBanDat, m_DeepDungeonBanIdList ); return m_DeepDungeonBanIdList; } -const std::set< uint32_t >& getDeepDungeonDangerIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonDangerIdList() { if( m_DeepDungeonDangerIdList.size() == 0 ) loadIdList( m_DeepDungeonDangerDat, m_DeepDungeonDangerIdList ); return m_DeepDungeonDangerIdList; } -const std::set< uint32_t >& getDeepDungeonEquipmentIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonEquipmentIdList() { if( m_DeepDungeonEquipmentIdList.size() == 0 ) loadIdList( m_DeepDungeonEquipmentDat, m_DeepDungeonEquipmentIdList ); return m_DeepDungeonEquipmentIdList; } -const std::set< uint32_t >& getDeepDungeonFloorEffectUIIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonFloorEffectUIIdList() { if( m_DeepDungeonFloorEffectUIIdList.size() == 0 ) loadIdList( m_DeepDungeonFloorEffectUIDat, m_DeepDungeonFloorEffectUIIdList ); return m_DeepDungeonFloorEffectUIIdList; } -const std::set< uint32_t >& getDeepDungeonItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonItemIdList() { if( m_DeepDungeonItemIdList.size() == 0 ) loadIdList( m_DeepDungeonItemDat, m_DeepDungeonItemIdList ); return m_DeepDungeonItemIdList; } -const std::set< uint32_t >& getDeepDungeonStatusIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonStatusIdList() { if( m_DeepDungeonStatusIdList.size() == 0 ) loadIdList( m_DeepDungeonStatusDat, m_DeepDungeonStatusIdList ); return m_DeepDungeonStatusIdList; } -const std::set< uint32_t >& getDefaultTalkIdList() +const std::set< uint32_t >& ExdDataGenerated::getDefaultTalkIdList() { if( m_DefaultTalkIdList.size() == 0 ) loadIdList( m_DefaultTalkDat, m_DefaultTalkIdList ); return m_DefaultTalkIdList; } -const std::set< uint32_t >& getDeliveryQuestIdList() +const std::set< uint32_t >& ExdDataGenerated::getDeliveryQuestIdList() { if( m_DeliveryQuestIdList.size() == 0 ) loadIdList( m_DeliveryQuestDat, m_DeliveryQuestIdList ); return m_DeliveryQuestIdList; } -const std::set< uint32_t >& getDisposalShopIdList() +const std::set< uint32_t >& ExdDataGenerated::getDisposalShopIdList() { if( m_DisposalShopIdList.size() == 0 ) loadIdList( m_DisposalShopDat, m_DisposalShopIdList ); return m_DisposalShopIdList; } -const std::set< uint32_t >& getDisposalShopFilterTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getDisposalShopFilterTypeIdList() { if( m_DisposalShopFilterTypeIdList.size() == 0 ) loadIdList( m_DisposalShopFilterTypeDat, m_DisposalShopFilterTypeIdList ); return m_DisposalShopFilterTypeIdList; } -const std::set< uint32_t >& getDisposalShopItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getDisposalShopItemIdList() { if( m_DisposalShopItemIdList.size() == 0 ) loadIdList( m_DisposalShopItemDat, m_DisposalShopItemIdList ); return m_DisposalShopItemIdList; } -const std::set< uint32_t >& getDpsChallengeIdList() +const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeIdList() { if( m_DpsChallengeIdList.size() == 0 ) loadIdList( m_DpsChallengeDat, m_DpsChallengeIdList ); return m_DpsChallengeIdList; } -const std::set< uint32_t >& getDpsChallengeOfficerIdList() +const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeOfficerIdList() { if( m_DpsChallengeOfficerIdList.size() == 0 ) loadIdList( m_DpsChallengeOfficerDat, m_DpsChallengeOfficerIdList ); return m_DpsChallengeOfficerIdList; } -const std::set< uint32_t >& getDpsChallengeTransientIdList() +const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeTransientIdList() { if( m_DpsChallengeTransientIdList.size() == 0 ) loadIdList( m_DpsChallengeTransientDat, m_DpsChallengeTransientIdList ); return m_DpsChallengeTransientIdList; } -const std::set< uint32_t >& getEmoteIdList() +const std::set< uint32_t >& ExdDataGenerated::getEmoteIdList() { if( m_EmoteIdList.size() == 0 ) loadIdList( m_EmoteDat, m_EmoteIdList ); return m_EmoteIdList; } -const std::set< uint32_t >& getEmoteCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getEmoteCategoryIdList() { if( m_EmoteCategoryIdList.size() == 0 ) loadIdList( m_EmoteCategoryDat, m_EmoteCategoryIdList ); return m_EmoteCategoryIdList; } -const std::set< uint32_t >& getENpcBaseIdList() +const std::set< uint32_t >& ExdDataGenerated::getENpcBaseIdList() { if( m_ENpcBaseIdList.size() == 0 ) loadIdList( m_ENpcBaseDat, m_ENpcBaseIdList ); return m_ENpcBaseIdList; } -const std::set< uint32_t >& getENpcResidentIdList() +const std::set< uint32_t >& ExdDataGenerated::getENpcResidentIdList() { if( m_ENpcResidentIdList.size() == 0 ) loadIdList( m_ENpcResidentDat, m_ENpcResidentIdList ); return m_ENpcResidentIdList; } -const std::set< uint32_t >& getEObjIdList() +const std::set< uint32_t >& ExdDataGenerated::getEObjIdList() { if( m_EObjIdList.size() == 0 ) loadIdList( m_EObjDat, m_EObjIdList ); return m_EObjIdList; } -const std::set< uint32_t >& getEquipRaceCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getEquipRaceCategoryIdList() { if( m_EquipRaceCategoryIdList.size() == 0 ) loadIdList( m_EquipRaceCategoryDat, m_EquipRaceCategoryIdList ); return m_EquipRaceCategoryIdList; } -const std::set< uint32_t >& getEquipSlotCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getEquipSlotCategoryIdList() { if( m_EquipSlotCategoryIdList.size() == 0 ) loadIdList( m_EquipSlotCategoryDat, m_EquipSlotCategoryIdList ); return m_EquipSlotCategoryIdList; } -const std::set< uint32_t >& getEventActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getEventActionIdList() { if( m_EventActionIdList.size() == 0 ) loadIdList( m_EventActionDat, m_EventActionIdList ); return m_EventActionIdList; } -const std::set< uint32_t >& getEventIconPriorityIdList() +const std::set< uint32_t >& ExdDataGenerated::getEventIconPriorityIdList() { if( m_EventIconPriorityIdList.size() == 0 ) loadIdList( m_EventIconPriorityDat, m_EventIconPriorityIdList ); return m_EventIconPriorityIdList; } -const std::set< uint32_t >& getEventIconTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getEventIconTypeIdList() { if( m_EventIconTypeIdList.size() == 0 ) loadIdList( m_EventIconTypeDat, m_EventIconTypeIdList ); return m_EventIconTypeIdList; } -const std::set< uint32_t >& getEventItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getEventItemIdList() { if( m_EventItemIdList.size() == 0 ) loadIdList( m_EventItemDat, m_EventItemIdList ); return m_EventItemIdList; } -const std::set< uint32_t >& getEventItemHelpIdList() +const std::set< uint32_t >& ExdDataGenerated::getEventItemHelpIdList() { if( m_EventItemHelpIdList.size() == 0 ) loadIdList( m_EventItemHelpDat, m_EventItemHelpIdList ); return m_EventItemHelpIdList; } -const std::set< uint32_t >& getExVersionIdList() +const std::set< uint32_t >& ExdDataGenerated::getExVersionIdList() { if( m_ExVersionIdList.size() == 0 ) loadIdList( m_ExVersionDat, m_ExVersionIdList ); return m_ExVersionIdList; } -const std::set< uint32_t >& getFateIdList() +const std::set< uint32_t >& ExdDataGenerated::getFateIdList() { if( m_FateIdList.size() == 0 ) loadIdList( m_FateDat, m_FateIdList ); return m_FateIdList; } -const std::set< uint32_t >& getFCActivityIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCActivityIdList() { if( m_FCActivityIdList.size() == 0 ) loadIdList( m_FCActivityDat, m_FCActivityIdList ); return m_FCActivityIdList; } -const std::set< uint32_t >& getFCAuthorityIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCAuthorityIdList() { if( m_FCAuthorityIdList.size() == 0 ) loadIdList( m_FCAuthorityDat, m_FCAuthorityIdList ); return m_FCAuthorityIdList; } -const std::set< uint32_t >& getFCAuthorityCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCAuthorityCategoryIdList() { if( m_FCAuthorityCategoryIdList.size() == 0 ) loadIdList( m_FCAuthorityCategoryDat, m_FCAuthorityCategoryIdList ); return m_FCAuthorityCategoryIdList; } -const std::set< uint32_t >& getFCChestNameIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCChestNameIdList() { if( m_FCChestNameIdList.size() == 0 ) loadIdList( m_FCChestNameDat, m_FCChestNameIdList ); return m_FCChestNameIdList; } -const std::set< uint32_t >& getFccShopIdList() +const std::set< uint32_t >& ExdDataGenerated::getFccShopIdList() { if( m_FccShopIdList.size() == 0 ) loadIdList( m_FccShopDat, m_FccShopIdList ); return m_FccShopIdList; } -const std::set< uint32_t >& getFCHierarchyIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCHierarchyIdList() { if( m_FCHierarchyIdList.size() == 0 ) loadIdList( m_FCHierarchyDat, m_FCHierarchyIdList ); return m_FCHierarchyIdList; } -const std::set< uint32_t >& getFCReputationIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCReputationIdList() { if( m_FCReputationIdList.size() == 0 ) loadIdList( m_FCReputationDat, m_FCReputationIdList ); return m_FCReputationIdList; } -const std::set< uint32_t >& getFCRightsIdList() +const std::set< uint32_t >& ExdDataGenerated::getFCRightsIdList() { if( m_FCRightsIdList.size() == 0 ) loadIdList( m_FCRightsDat, m_FCRightsIdList ); return m_FCRightsIdList; } -const std::set< uint32_t >& getFishingSpotIdList() +const std::set< uint32_t >& ExdDataGenerated::getFishingSpotIdList() { if( m_FishingSpotIdList.size() == 0 ) loadIdList( m_FishingSpotDat, m_FishingSpotIdList ); return m_FishingSpotIdList; } -const std::set< uint32_t >& getFishParameterIdList() +const std::set< uint32_t >& ExdDataGenerated::getFishParameterIdList() { if( m_FishParameterIdList.size() == 0 ) loadIdList( m_FishParameterDat, m_FishParameterIdList ); return m_FishParameterIdList; } -const std::set< uint32_t >& getGardeningSeedIdList() +const std::set< uint32_t >& ExdDataGenerated::getGardeningSeedIdList() { if( m_GardeningSeedIdList.size() == 0 ) loadIdList( m_GardeningSeedDat, m_GardeningSeedIdList ); return m_GardeningSeedIdList; } -const std::set< uint32_t >& getGatheringConditionIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringConditionIdList() { if( m_GatheringConditionIdList.size() == 0 ) loadIdList( m_GatheringConditionDat, m_GatheringConditionIdList ); return m_GatheringConditionIdList; } -const std::set< uint32_t >& getGatheringExpIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringExpIdList() { if( m_GatheringExpIdList.size() == 0 ) loadIdList( m_GatheringExpDat, m_GatheringExpIdList ); return m_GatheringExpIdList; } -const std::set< uint32_t >& getGatheringItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringItemIdList() { if( m_GatheringItemIdList.size() == 0 ) loadIdList( m_GatheringItemDat, m_GatheringItemIdList ); return m_GatheringItemIdList; } -const std::set< uint32_t >& getGatheringItemLevelConvertTableIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringItemLevelConvertTableIdList() { if( m_GatheringItemLevelConvertTableIdList.size() == 0 ) loadIdList( m_GatheringItemLevelConvertTableDat, m_GatheringItemLevelConvertTableIdList ); return m_GatheringItemLevelConvertTableIdList; } -const std::set< uint32_t >& getGatheringItemPointIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringItemPointIdList() { if( m_GatheringItemPointIdList.size() == 0 ) loadIdList( m_GatheringItemPointDat, m_GatheringItemPointIdList ); return m_GatheringItemPointIdList; } -const std::set< uint32_t >& getGatheringNotebookListIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringNotebookListIdList() { if( m_GatheringNotebookListIdList.size() == 0 ) loadIdList( m_GatheringNotebookListDat, m_GatheringNotebookListIdList ); return m_GatheringNotebookListIdList; } -const std::set< uint32_t >& getGatheringPointIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringPointIdList() { if( m_GatheringPointIdList.size() == 0 ) loadIdList( m_GatheringPointDat, m_GatheringPointIdList ); return m_GatheringPointIdList; } -const std::set< uint32_t >& getGatheringPointBaseIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBaseIdList() { if( m_GatheringPointBaseIdList.size() == 0 ) loadIdList( m_GatheringPointBaseDat, m_GatheringPointBaseIdList ); return m_GatheringPointBaseIdList; } -const std::set< uint32_t >& getGatheringPointBonusIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBonusIdList() { if( m_GatheringPointBonusIdList.size() == 0 ) loadIdList( m_GatheringPointBonusDat, m_GatheringPointBonusIdList ); return m_GatheringPointBonusIdList; } -const std::set< uint32_t >& getGatheringPointBonusTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBonusTypeIdList() { if( m_GatheringPointBonusTypeIdList.size() == 0 ) loadIdList( m_GatheringPointBonusTypeDat, m_GatheringPointBonusTypeIdList ); return m_GatheringPointBonusTypeIdList; } -const std::set< uint32_t >& getGatheringPointNameIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringPointNameIdList() { if( m_GatheringPointNameIdList.size() == 0 ) loadIdList( m_GatheringPointNameDat, m_GatheringPointNameIdList ); return m_GatheringPointNameIdList; } -const std::set< uint32_t >& getGatheringSubCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringSubCategoryIdList() { if( m_GatheringSubCategoryIdList.size() == 0 ) loadIdList( m_GatheringSubCategoryDat, m_GatheringSubCategoryIdList ); return m_GatheringSubCategoryIdList; } -const std::set< uint32_t >& getGatheringTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getGatheringTypeIdList() { if( m_GatheringTypeIdList.size() == 0 ) loadIdList( m_GatheringTypeDat, m_GatheringTypeIdList ); return m_GatheringTypeIdList; } -const std::set< uint32_t >& getGcArmyExpeditionIdList() +const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionIdList() { if( m_GcArmyExpeditionIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionDat, m_GcArmyExpeditionIdList ); return m_GcArmyExpeditionIdList; } -const std::set< uint32_t >& getGcArmyExpeditionMemberBonusIdList() +const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionMemberBonusIdList() { if( m_GcArmyExpeditionMemberBonusIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionMemberBonusDat, m_GcArmyExpeditionMemberBonusIdList ); return m_GcArmyExpeditionMemberBonusIdList; } -const std::set< uint32_t >& getGcArmyExpeditionTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionTypeIdList() { if( m_GcArmyExpeditionTypeIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionTypeDat, m_GcArmyExpeditionTypeIdList ); return m_GcArmyExpeditionTypeIdList; } -const std::set< uint32_t >& getGcArmyMemberGrowIdList() +const std::set< uint32_t >& ExdDataGenerated::getGcArmyMemberGrowIdList() { if( m_GcArmyMemberGrowIdList.size() == 0 ) loadIdList( m_GcArmyMemberGrowDat, m_GcArmyMemberGrowIdList ); return m_GcArmyMemberGrowIdList; } -const std::set< uint32_t >& getGcArmyTrainingIdList() +const std::set< uint32_t >& ExdDataGenerated::getGcArmyTrainingIdList() { if( m_GcArmyTrainingIdList.size() == 0 ) loadIdList( m_GcArmyTrainingDat, m_GcArmyTrainingIdList ); return m_GcArmyTrainingIdList; } -const std::set< uint32_t >& getGCScripShopCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCScripShopCategoryIdList() { if( m_GCScripShopCategoryIdList.size() == 0 ) loadIdList( m_GCScripShopCategoryDat, m_GCScripShopCategoryIdList ); return m_GCScripShopCategoryIdList; } -const std::set< uint32_t >& getGCScripShopItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCScripShopItemIdList() { if( m_GCScripShopItemIdList.size() == 0 ) loadIdList( m_GCScripShopItemDat, m_GCScripShopItemIdList ); return m_GCScripShopItemIdList; } -const std::set< uint32_t >& getGCShopIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCShopIdList() { if( m_GCShopIdList.size() == 0 ) loadIdList( m_GCShopDat, m_GCShopIdList ); return m_GCShopIdList; } -const std::set< uint32_t >& getGCShopItemCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCShopItemCategoryIdList() { if( m_GCShopItemCategoryIdList.size() == 0 ) loadIdList( m_GCShopItemCategoryDat, m_GCShopItemCategoryIdList ); return m_GCShopItemCategoryIdList; } -const std::set< uint32_t >& getGCSupplyDutyIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCSupplyDutyIdList() { if( m_GCSupplyDutyIdList.size() == 0 ) loadIdList( m_GCSupplyDutyDat, m_GCSupplyDutyIdList ); return m_GCSupplyDutyIdList; } -const std::set< uint32_t >& getGCSupplyDutyRewardIdList() +const std::set< uint32_t >& ExdDataGenerated::getGCSupplyDutyRewardIdList() { if( m_GCSupplyDutyRewardIdList.size() == 0 ) loadIdList( m_GCSupplyDutyRewardDat, m_GCSupplyDutyRewardIdList ); return m_GCSupplyDutyRewardIdList; } -const std::set< uint32_t >& getGeneralActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getGeneralActionIdList() { if( m_GeneralActionIdList.size() == 0 ) loadIdList( m_GeneralActionDat, m_GeneralActionIdList ); return m_GeneralActionIdList; } -const std::set< uint32_t >& getGilShopIdList() +const std::set< uint32_t >& ExdDataGenerated::getGilShopIdList() { if( m_GilShopIdList.size() == 0 ) loadIdList( m_GilShopDat, m_GilShopIdList ); return m_GilShopIdList; } -const std::set< uint32_t >& getGilShopItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getGilShopItemIdList() { if( m_GilShopItemIdList.size() == 0 ) loadIdList( m_GilShopItemDat, m_GilShopItemIdList ); return m_GilShopItemIdList; } -const std::set< uint32_t >& getGoldSaucerTextDataIdList() +const std::set< uint32_t >& ExdDataGenerated::getGoldSaucerTextDataIdList() { if( m_GoldSaucerTextDataIdList.size() == 0 ) loadIdList( m_GoldSaucerTextDataDat, m_GoldSaucerTextDataIdList ); return m_GoldSaucerTextDataIdList; } -const std::set< uint32_t >& getGrandCompanyIdList() +const std::set< uint32_t >& ExdDataGenerated::getGrandCompanyIdList() { if( m_GrandCompanyIdList.size() == 0 ) loadIdList( m_GrandCompanyDat, m_GrandCompanyIdList ); return m_GrandCompanyIdList; } -const std::set< uint32_t >& getGrandCompanyRankIdList() +const std::set< uint32_t >& ExdDataGenerated::getGrandCompanyRankIdList() { if( m_GrandCompanyRankIdList.size() == 0 ) loadIdList( m_GrandCompanyRankDat, m_GrandCompanyRankIdList ); return m_GrandCompanyRankIdList; } -const std::set< uint32_t >& getGuardianDeityIdList() +const std::set< uint32_t >& ExdDataGenerated::getGuardianDeityIdList() { if( m_GuardianDeityIdList.size() == 0 ) loadIdList( m_GuardianDeityDat, m_GuardianDeityIdList ); return m_GuardianDeityIdList; } -const std::set< uint32_t >& getGuildleveAssignmentIdList() +const std::set< uint32_t >& ExdDataGenerated::getGuildleveAssignmentIdList() { if( m_GuildleveAssignmentIdList.size() == 0 ) loadIdList( m_GuildleveAssignmentDat, m_GuildleveAssignmentIdList ); return m_GuildleveAssignmentIdList; } -const std::set< uint32_t >& getGuildOrderGuideIdList() +const std::set< uint32_t >& ExdDataGenerated::getGuildOrderGuideIdList() { if( m_GuildOrderGuideIdList.size() == 0 ) loadIdList( m_GuildOrderGuideDat, m_GuildOrderGuideIdList ); return m_GuildOrderGuideIdList; } -const std::set< uint32_t >& getGuildOrderOfficerIdList() +const std::set< uint32_t >& ExdDataGenerated::getGuildOrderOfficerIdList() { if( m_GuildOrderOfficerIdList.size() == 0 ) loadIdList( m_GuildOrderOfficerDat, m_GuildOrderOfficerIdList ); return m_GuildOrderOfficerIdList; } -const std::set< uint32_t >& getHouseRetainerPoseIdList() +const std::set< uint32_t >& ExdDataGenerated::getHouseRetainerPoseIdList() { if( m_HouseRetainerPoseIdList.size() == 0 ) loadIdList( m_HouseRetainerPoseDat, m_HouseRetainerPoseIdList ); return m_HouseRetainerPoseIdList; } -const std::set< uint32_t >& getHousingFurnitureIdList() +const std::set< uint32_t >& ExdDataGenerated::getHousingFurnitureIdList() { if( m_HousingFurnitureIdList.size() == 0 ) loadIdList( m_HousingFurnitureDat, m_HousingFurnitureIdList ); return m_HousingFurnitureIdList; } -const std::set< uint32_t >& getHousingYardObjectIdList() +const std::set< uint32_t >& ExdDataGenerated::getHousingYardObjectIdList() { if( m_HousingYardObjectIdList.size() == 0 ) loadIdList( m_HousingYardObjectDat, m_HousingYardObjectIdList ); return m_HousingYardObjectIdList; } -const std::set< uint32_t >& getInstanceContentIdList() +const std::set< uint32_t >& ExdDataGenerated::getInstanceContentIdList() { if( m_InstanceContentIdList.size() == 0 ) loadIdList( m_InstanceContentDat, m_InstanceContentIdList ); return m_InstanceContentIdList; } -const std::set< uint32_t >& getInstanceContentBuffIdList() +const std::set< uint32_t >& ExdDataGenerated::getInstanceContentBuffIdList() { if( m_InstanceContentBuffIdList.size() == 0 ) loadIdList( m_InstanceContentBuffDat, m_InstanceContentBuffIdList ); return m_InstanceContentBuffIdList; } -const std::set< uint32_t >& getInstanceContentTextDataIdList() +const std::set< uint32_t >& ExdDataGenerated::getInstanceContentTextDataIdList() { if( m_InstanceContentTextDataIdList.size() == 0 ) loadIdList( m_InstanceContentTextDataDat, m_InstanceContentTextDataIdList ); return m_InstanceContentTextDataIdList; } -const std::set< uint32_t >& getInstanceContentTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getInstanceContentTypeIdList() { if( m_InstanceContentTypeIdList.size() == 0 ) loadIdList( m_InstanceContentTypeDat, m_InstanceContentTypeIdList ); return m_InstanceContentTypeIdList; } -const std::set< uint32_t >& getItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemIdList() { if( m_ItemIdList.size() == 0 ) loadIdList( m_ItemDat, m_ItemIdList ); return m_ItemIdList; } -const std::set< uint32_t >& getItemActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemActionIdList() { if( m_ItemActionIdList.size() == 0 ) loadIdList( m_ItemActionDat, m_ItemActionIdList ); return m_ItemActionIdList; } -const std::set< uint32_t >& getItemFoodIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemFoodIdList() { if( m_ItemFoodIdList.size() == 0 ) loadIdList( m_ItemFoodDat, m_ItemFoodIdList ); return m_ItemFoodIdList; } -const std::set< uint32_t >& getItemSearchCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemSearchCategoryIdList() { if( m_ItemSearchCategoryIdList.size() == 0 ) loadIdList( m_ItemSearchCategoryDat, m_ItemSearchCategoryIdList ); return m_ItemSearchCategoryIdList; } -const std::set< uint32_t >& getItemSeriesIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemSeriesIdList() { if( m_ItemSeriesIdList.size() == 0 ) loadIdList( m_ItemSeriesDat, m_ItemSeriesIdList ); return m_ItemSeriesIdList; } -const std::set< uint32_t >& getItemSpecialBonusIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemSpecialBonusIdList() { if( m_ItemSpecialBonusIdList.size() == 0 ) loadIdList( m_ItemSpecialBonusDat, m_ItemSpecialBonusIdList ); return m_ItemSpecialBonusIdList; } -const std::set< uint32_t >& getItemUICategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getItemUICategoryIdList() { if( m_ItemUICategoryIdList.size() == 0 ) loadIdList( m_ItemUICategoryDat, m_ItemUICategoryIdList ); return m_ItemUICategoryIdList; } -const std::set< uint32_t >& getJournalCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getJournalCategoryIdList() { if( m_JournalCategoryIdList.size() == 0 ) loadIdList( m_JournalCategoryDat, m_JournalCategoryIdList ); return m_JournalCategoryIdList; } -const std::set< uint32_t >& getJournalGenreIdList() +const std::set< uint32_t >& ExdDataGenerated::getJournalGenreIdList() { if( m_JournalGenreIdList.size() == 0 ) loadIdList( m_JournalGenreDat, m_JournalGenreIdList ); return m_JournalGenreIdList; } -const std::set< uint32_t >& getJournalSectionIdList() +const std::set< uint32_t >& ExdDataGenerated::getJournalSectionIdList() { if( m_JournalSectionIdList.size() == 0 ) loadIdList( m_JournalSectionDat, m_JournalSectionIdList ); return m_JournalSectionIdList; } -const std::set< uint32_t >& getLeveIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveIdList() { if( m_LeveIdList.size() == 0 ) loadIdList( m_LeveDat, m_LeveIdList ); return m_LeveIdList; } -const std::set< uint32_t >& getLeveAssignmentTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveAssignmentTypeIdList() { if( m_LeveAssignmentTypeIdList.size() == 0 ) loadIdList( m_LeveAssignmentTypeDat, m_LeveAssignmentTypeIdList ); return m_LeveAssignmentTypeIdList; } -const std::set< uint32_t >& getLeveClientIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveClientIdList() { if( m_LeveClientIdList.size() == 0 ) loadIdList( m_LeveClientDat, m_LeveClientIdList ); return m_LeveClientIdList; } -const std::set< uint32_t >& getLevelIdList() +const std::set< uint32_t >& ExdDataGenerated::getLevelIdList() { if( m_LevelIdList.size() == 0 ) loadIdList( m_LevelDat, m_LevelIdList ); return m_LevelIdList; } -const std::set< uint32_t >& getLeveRewardItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveRewardItemIdList() { if( m_LeveRewardItemIdList.size() == 0 ) loadIdList( m_LeveRewardItemDat, m_LeveRewardItemIdList ); return m_LeveRewardItemIdList; } -const std::set< uint32_t >& getLeveRewardItemGroupIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveRewardItemGroupIdList() { if( m_LeveRewardItemGroupIdList.size() == 0 ) loadIdList( m_LeveRewardItemGroupDat, m_LeveRewardItemGroupIdList ); return m_LeveRewardItemGroupIdList; } -const std::set< uint32_t >& getLeveVfxIdList() +const std::set< uint32_t >& ExdDataGenerated::getLeveVfxIdList() { if( m_LeveVfxIdList.size() == 0 ) loadIdList( m_LeveVfxDat, m_LeveVfxIdList ); return m_LeveVfxIdList; } -const std::set< uint32_t >& getLogFilterIdList() +const std::set< uint32_t >& ExdDataGenerated::getLogFilterIdList() { if( m_LogFilterIdList.size() == 0 ) loadIdList( m_LogFilterDat, m_LogFilterIdList ); return m_LogFilterIdList; } -const std::set< uint32_t >& getLogKindIdList() +const std::set< uint32_t >& ExdDataGenerated::getLogKindIdList() { if( m_LogKindIdList.size() == 0 ) loadIdList( m_LogKindDat, m_LogKindIdList ); return m_LogKindIdList; } -const std::set< uint32_t >& getLogKindCategoryTextIdList() +const std::set< uint32_t >& ExdDataGenerated::getLogKindCategoryTextIdList() { if( m_LogKindCategoryTextIdList.size() == 0 ) loadIdList( m_LogKindCategoryTextDat, m_LogKindCategoryTextIdList ); return m_LogKindCategoryTextIdList; } -const std::set< uint32_t >& getLogMessageIdList() +const std::set< uint32_t >& ExdDataGenerated::getLogMessageIdList() { if( m_LogMessageIdList.size() == 0 ) loadIdList( m_LogMessageDat, m_LogMessageIdList ); return m_LogMessageIdList; } -const std::set< uint32_t >& getMacroIconIdList() +const std::set< uint32_t >& ExdDataGenerated::getMacroIconIdList() { if( m_MacroIconIdList.size() == 0 ) loadIdList( m_MacroIconDat, m_MacroIconIdList ); return m_MacroIconIdList; } -const std::set< uint32_t >& getMacroIconRedirectOldIdList() +const std::set< uint32_t >& ExdDataGenerated::getMacroIconRedirectOldIdList() { if( m_MacroIconRedirectOldIdList.size() == 0 ) loadIdList( m_MacroIconRedirectOldDat, m_MacroIconRedirectOldIdList ); return m_MacroIconRedirectOldIdList; } -const std::set< uint32_t >& getMainCommandIdList() +const std::set< uint32_t >& ExdDataGenerated::getMainCommandIdList() { if( m_MainCommandIdList.size() == 0 ) loadIdList( m_MainCommandDat, m_MainCommandIdList ); return m_MainCommandIdList; } -const std::set< uint32_t >& getMainCommandCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getMainCommandCategoryIdList() { if( m_MainCommandCategoryIdList.size() == 0 ) loadIdList( m_MainCommandCategoryDat, m_MainCommandCategoryIdList ); return m_MainCommandCategoryIdList; } -const std::set< uint32_t >& getMapIdList() +const std::set< uint32_t >& ExdDataGenerated::getMapIdList() { if( m_MapIdList.size() == 0 ) loadIdList( m_MapDat, m_MapIdList ); return m_MapIdList; } -const std::set< uint32_t >& getMapMarkerIdList() +const std::set< uint32_t >& ExdDataGenerated::getMapMarkerIdList() { if( m_MapMarkerIdList.size() == 0 ) loadIdList( m_MapMarkerDat, m_MapMarkerIdList ); return m_MapMarkerIdList; } -const std::set< uint32_t >& getMapSymbolIdList() +const std::set< uint32_t >& ExdDataGenerated::getMapSymbolIdList() { if( m_MapSymbolIdList.size() == 0 ) loadIdList( m_MapSymbolDat, m_MapSymbolIdList ); return m_MapSymbolIdList; } -const std::set< uint32_t >& getMasterpieceSupplyDutyIdList() +const std::set< uint32_t >& ExdDataGenerated::getMasterpieceSupplyDutyIdList() { if( m_MasterpieceSupplyDutyIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyDutyDat, m_MasterpieceSupplyDutyIdList ); return m_MasterpieceSupplyDutyIdList; } -const std::set< uint32_t >& getMasterpieceSupplyMultiplierIdList() +const std::set< uint32_t >& ExdDataGenerated::getMasterpieceSupplyMultiplierIdList() { if( m_MasterpieceSupplyMultiplierIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyMultiplierDat, m_MasterpieceSupplyMultiplierIdList ); return m_MasterpieceSupplyMultiplierIdList; } -const std::set< uint32_t >& getMateriaIdList() +const std::set< uint32_t >& ExdDataGenerated::getMateriaIdList() { if( m_MateriaIdList.size() == 0 ) loadIdList( m_MateriaDat, m_MateriaIdList ); return m_MateriaIdList; } -const std::set< uint32_t >& getMinionRaceIdList() +const std::set< uint32_t >& ExdDataGenerated::getMinionRaceIdList() { if( m_MinionRaceIdList.size() == 0 ) loadIdList( m_MinionRaceDat, m_MinionRaceIdList ); return m_MinionRaceIdList; } -const std::set< uint32_t >& getMinionRulesIdList() +const std::set< uint32_t >& ExdDataGenerated::getMinionRulesIdList() { if( m_MinionRulesIdList.size() == 0 ) loadIdList( m_MinionRulesDat, m_MinionRulesIdList ); return m_MinionRulesIdList; } -const std::set< uint32_t >& getMinionSkillTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getMinionSkillTypeIdList() { if( m_MinionSkillTypeIdList.size() == 0 ) loadIdList( m_MinionSkillTypeDat, m_MinionSkillTypeIdList ); return m_MinionSkillTypeIdList; } -const std::set< uint32_t >& getMobHuntTargetIdList() +const std::set< uint32_t >& ExdDataGenerated::getMobHuntTargetIdList() { if( m_MobHuntTargetIdList.size() == 0 ) loadIdList( m_MobHuntTargetDat, m_MobHuntTargetIdList ); return m_MobHuntTargetIdList; } -const std::set< uint32_t >& getModelCharaIdList() +const std::set< uint32_t >& ExdDataGenerated::getModelCharaIdList() { if( m_ModelCharaIdList.size() == 0 ) loadIdList( m_ModelCharaDat, m_ModelCharaIdList ); return m_ModelCharaIdList; } -const std::set< uint32_t >& getMonsterNoteIdList() +const std::set< uint32_t >& ExdDataGenerated::getMonsterNoteIdList() { if( m_MonsterNoteIdList.size() == 0 ) loadIdList( m_MonsterNoteDat, m_MonsterNoteIdList ); return m_MonsterNoteIdList; } -const std::set< uint32_t >& getMonsterNoteTargetIdList() +const std::set< uint32_t >& ExdDataGenerated::getMonsterNoteTargetIdList() { if( m_MonsterNoteTargetIdList.size() == 0 ) loadIdList( m_MonsterNoteTargetDat, m_MonsterNoteTargetIdList ); return m_MonsterNoteTargetIdList; } -const std::set< uint32_t >& getMountIdList() +const std::set< uint32_t >& ExdDataGenerated::getMountIdList() { if( m_MountIdList.size() == 0 ) loadIdList( m_MountDat, m_MountIdList ); return m_MountIdList; } -const std::set< uint32_t >& getMountActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getMountActionIdList() { if( m_MountActionIdList.size() == 0 ) loadIdList( m_MountActionDat, m_MountActionIdList ); return m_MountActionIdList; } -const std::set< uint32_t >& getNpcEquipIdList() +const std::set< uint32_t >& ExdDataGenerated::getNpcEquipIdList() { if( m_NpcEquipIdList.size() == 0 ) loadIdList( m_NpcEquipDat, m_NpcEquipIdList ); return m_NpcEquipIdList; } -const std::set< uint32_t >& getOmenIdList() +const std::set< uint32_t >& ExdDataGenerated::getOmenIdList() { if( m_OmenIdList.size() == 0 ) loadIdList( m_OmenDat, m_OmenIdList ); return m_OmenIdList; } -const std::set< uint32_t >& getOnlineStatusIdList() +const std::set< uint32_t >& ExdDataGenerated::getOnlineStatusIdList() { if( m_OnlineStatusIdList.size() == 0 ) loadIdList( m_OnlineStatusDat, m_OnlineStatusIdList ); return m_OnlineStatusIdList; } -const std::set< uint32_t >& getOrchestrionIdList() +const std::set< uint32_t >& ExdDataGenerated::getOrchestrionIdList() { if( m_OrchestrionIdList.size() == 0 ) loadIdList( m_OrchestrionDat, m_OrchestrionIdList ); return m_OrchestrionIdList; } -const std::set< uint32_t >& getOrchestrionPathIdList() +const std::set< uint32_t >& ExdDataGenerated::getOrchestrionPathIdList() { if( m_OrchestrionPathIdList.size() == 0 ) loadIdList( m_OrchestrionPathDat, m_OrchestrionPathIdList ); return m_OrchestrionPathIdList; } -const std::set< uint32_t >& getParamGrowIdList() +const std::set< uint32_t >& ExdDataGenerated::getParamGrowIdList() { if( m_ParamGrowIdList.size() == 0 ) loadIdList( m_ParamGrowDat, m_ParamGrowIdList ); return m_ParamGrowIdList; } -const std::set< uint32_t >& getPetIdList() +const std::set< uint32_t >& ExdDataGenerated::getPetIdList() { if( m_PetIdList.size() == 0 ) loadIdList( m_PetDat, m_PetIdList ); return m_PetIdList; } -const std::set< uint32_t >& getPetActionIdList() +const std::set< uint32_t >& ExdDataGenerated::getPetActionIdList() { if( m_PetActionIdList.size() == 0 ) loadIdList( m_PetActionDat, m_PetActionIdList ); return m_PetActionIdList; } -const std::set< uint32_t >& getPictureIdList() +const std::set< uint32_t >& ExdDataGenerated::getPictureIdList() { if( m_PictureIdList.size() == 0 ) loadIdList( m_PictureDat, m_PictureIdList ); return m_PictureIdList; } -const std::set< uint32_t >& getPlaceNameIdList() +const std::set< uint32_t >& ExdDataGenerated::getPlaceNameIdList() { if( m_PlaceNameIdList.size() == 0 ) loadIdList( m_PlaceNameDat, m_PlaceNameIdList ); return m_PlaceNameIdList; } -const std::set< uint32_t >& getQuestIdList() +const std::set< uint32_t >& ExdDataGenerated::getQuestIdList() { if( m_QuestIdList.size() == 0 ) loadIdList( m_QuestDat, m_QuestIdList ); return m_QuestIdList; } -const std::set< uint32_t >& getQuestRewardOtherIdList() +const std::set< uint32_t >& ExdDataGenerated::getQuestRewardOtherIdList() { if( m_QuestRewardOtherIdList.size() == 0 ) loadIdList( m_QuestRewardOtherDat, m_QuestRewardOtherIdList ); return m_QuestRewardOtherIdList; } -const std::set< uint32_t >& getRaceIdList() +const std::set< uint32_t >& ExdDataGenerated::getRaceIdList() { if( m_RaceIdList.size() == 0 ) loadIdList( m_RaceDat, m_RaceIdList ); return m_RaceIdList; } -const std::set< uint32_t >& getRacingChocoboItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboItemIdList() { if( m_RacingChocoboItemIdList.size() == 0 ) loadIdList( m_RacingChocoboItemDat, m_RacingChocoboItemIdList ); return m_RacingChocoboItemIdList; } -const std::set< uint32_t >& getRacingChocoboNameIdList() +const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameIdList() { if( m_RacingChocoboNameIdList.size() == 0 ) loadIdList( m_RacingChocoboNameDat, m_RacingChocoboNameIdList ); return m_RacingChocoboNameIdList; } -const std::set< uint32_t >& getRacingChocoboNameCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameCategoryIdList() { if( m_RacingChocoboNameCategoryIdList.size() == 0 ) loadIdList( m_RacingChocoboNameCategoryDat, m_RacingChocoboNameCategoryIdList ); return m_RacingChocoboNameCategoryIdList; } -const std::set< uint32_t >& getRacingChocoboNameInfoIdList() +const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameInfoIdList() { if( m_RacingChocoboNameInfoIdList.size() == 0 ) loadIdList( m_RacingChocoboNameInfoDat, m_RacingChocoboNameInfoIdList ); return m_RacingChocoboNameInfoIdList; } -const std::set< uint32_t >& getRacingChocoboParamIdList() +const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboParamIdList() { if( m_RacingChocoboParamIdList.size() == 0 ) loadIdList( m_RacingChocoboParamDat, m_RacingChocoboParamIdList ); return m_RacingChocoboParamIdList; } -const std::set< uint32_t >& getRecipeIdList() +const std::set< uint32_t >& ExdDataGenerated::getRecipeIdList() { if( m_RecipeIdList.size() == 0 ) loadIdList( m_RecipeDat, m_RecipeIdList ); return m_RecipeIdList; } -const std::set< uint32_t >& getRecipeElementIdList() +const std::set< uint32_t >& ExdDataGenerated::getRecipeElementIdList() { if( m_RecipeElementIdList.size() == 0 ) loadIdList( m_RecipeElementDat, m_RecipeElementIdList ); return m_RecipeElementIdList; } -const std::set< uint32_t >& getRecipeLevelTableIdList() +const std::set< uint32_t >& ExdDataGenerated::getRecipeLevelTableIdList() { if( m_RecipeLevelTableIdList.size() == 0 ) loadIdList( m_RecipeLevelTableDat, m_RecipeLevelTableIdList ); return m_RecipeLevelTableIdList; } -const std::set< uint32_t >& getRecipeNotebookListIdList() +const std::set< uint32_t >& ExdDataGenerated::getRecipeNotebookListIdList() { if( m_RecipeNotebookListIdList.size() == 0 ) loadIdList( m_RecipeNotebookListDat, m_RecipeNotebookListIdList ); return m_RecipeNotebookListIdList; } -const std::set< uint32_t >& getRelicIdList() +const std::set< uint32_t >& ExdDataGenerated::getRelicIdList() { if( m_RelicIdList.size() == 0 ) loadIdList( m_RelicDat, m_RelicIdList ); return m_RelicIdList; } -const std::set< uint32_t >& getRelic3IdList() +const std::set< uint32_t >& ExdDataGenerated::getRelic3IdList() { if( m_Relic3IdList.size() == 0 ) loadIdList( m_Relic3Dat, m_Relic3IdList ); return m_Relic3IdList; } -const std::set< uint32_t >& getRelicItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getRelicItemIdList() { if( m_RelicItemIdList.size() == 0 ) loadIdList( m_RelicItemDat, m_RelicItemIdList ); return m_RelicItemIdList; } -const std::set< uint32_t >& getRelicNoteIdList() +const std::set< uint32_t >& ExdDataGenerated::getRelicNoteIdList() { if( m_RelicNoteIdList.size() == 0 ) loadIdList( m_RelicNoteDat, m_RelicNoteIdList ); return m_RelicNoteIdList; } -const std::set< uint32_t >& getRelicNoteCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getRelicNoteCategoryIdList() { if( m_RelicNoteCategoryIdList.size() == 0 ) loadIdList( m_RelicNoteCategoryDat, m_RelicNoteCategoryIdList ); return m_RelicNoteCategoryIdList; } -const std::set< uint32_t >& getRetainerTaskIdList() +const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskIdList() { if( m_RetainerTaskIdList.size() == 0 ) loadIdList( m_RetainerTaskDat, m_RetainerTaskIdList ); return m_RetainerTaskIdList; } -const std::set< uint32_t >& getRetainerTaskNormalIdList() +const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskNormalIdList() { if( m_RetainerTaskNormalIdList.size() == 0 ) loadIdList( m_RetainerTaskNormalDat, m_RetainerTaskNormalIdList ); return m_RetainerTaskNormalIdList; } -const std::set< uint32_t >& getRetainerTaskParameterIdList() +const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskParameterIdList() { if( m_RetainerTaskParameterIdList.size() == 0 ) loadIdList( m_RetainerTaskParameterDat, m_RetainerTaskParameterIdList ); return m_RetainerTaskParameterIdList; } -const std::set< uint32_t >& getRetainerTaskRandomIdList() +const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskRandomIdList() { if( m_RetainerTaskRandomIdList.size() == 0 ) loadIdList( m_RetainerTaskRandomDat, m_RetainerTaskRandomIdList ); return m_RetainerTaskRandomIdList; } -const std::set< uint32_t >& getSalvageIdList() +const std::set< uint32_t >& ExdDataGenerated::getSalvageIdList() { if( m_SalvageIdList.size() == 0 ) loadIdList( m_SalvageDat, m_SalvageIdList ); return m_SalvageIdList; } -const std::set< uint32_t >& getSatisfactionNpcIdList() +const std::set< uint32_t >& ExdDataGenerated::getSatisfactionNpcIdList() { if( m_SatisfactionNpcIdList.size() == 0 ) loadIdList( m_SatisfactionNpcDat, m_SatisfactionNpcIdList ); return m_SatisfactionNpcIdList; } -const std::set< uint32_t >& getSatisfactionSupplyIdList() +const std::set< uint32_t >& ExdDataGenerated::getSatisfactionSupplyIdList() { if( m_SatisfactionSupplyIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyDat, m_SatisfactionSupplyIdList ); return m_SatisfactionSupplyIdList; } -const std::set< uint32_t >& getSatisfactionSupplyRewardIdList() +const std::set< uint32_t >& ExdDataGenerated::getSatisfactionSupplyRewardIdList() { if( m_SatisfactionSupplyRewardIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyRewardDat, m_SatisfactionSupplyRewardIdList ); return m_SatisfactionSupplyRewardIdList; } -const std::set< uint32_t >& getScreenImageIdList() +const std::set< uint32_t >& ExdDataGenerated::getScreenImageIdList() { if( m_ScreenImageIdList.size() == 0 ) loadIdList( m_ScreenImageDat, m_ScreenImageIdList ); return m_ScreenImageIdList; } -const std::set< uint32_t >& getSecretRecipeBookIdList() +const std::set< uint32_t >& ExdDataGenerated::getSecretRecipeBookIdList() { if( m_SecretRecipeBookIdList.size() == 0 ) loadIdList( m_SecretRecipeBookDat, m_SecretRecipeBookIdList ); return m_SecretRecipeBookIdList; } -const std::set< uint32_t >& getSpearfishingItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getSpearfishingItemIdList() { if( m_SpearfishingItemIdList.size() == 0 ) loadIdList( m_SpearfishingItemDat, m_SpearfishingItemIdList ); return m_SpearfishingItemIdList; } -const std::set< uint32_t >& getSpearfishingNotebookIdList() +const std::set< uint32_t >& ExdDataGenerated::getSpearfishingNotebookIdList() { if( m_SpearfishingNotebookIdList.size() == 0 ) loadIdList( m_SpearfishingNotebookDat, m_SpearfishingNotebookIdList ); return m_SpearfishingNotebookIdList; } -const std::set< uint32_t >& getSpecialShopIdList() +const std::set< uint32_t >& ExdDataGenerated::getSpecialShopIdList() { if( m_SpecialShopIdList.size() == 0 ) loadIdList( m_SpecialShopDat, m_SpecialShopIdList ); return m_SpecialShopIdList; } -const std::set< uint32_t >& getSpecialShopItemCategoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getSpecialShopItemCategoryIdList() { if( m_SpecialShopItemCategoryIdList.size() == 0 ) loadIdList( m_SpecialShopItemCategoryDat, m_SpecialShopItemCategoryIdList ); return m_SpecialShopItemCategoryIdList; } -const std::set< uint32_t >& getStainIdList() +const std::set< uint32_t >& ExdDataGenerated::getStainIdList() { if( m_StainIdList.size() == 0 ) loadIdList( m_StainDat, m_StainIdList ); return m_StainIdList; } -const std::set< uint32_t >& getStatusIdList() +const std::set< uint32_t >& ExdDataGenerated::getStatusIdList() { if( m_StatusIdList.size() == 0 ) loadIdList( m_StatusDat, m_StatusIdList ); return m_StatusIdList; } -const std::set< uint32_t >& getStoryIdList() +const std::set< uint32_t >& ExdDataGenerated::getStoryIdList() { if( m_StoryIdList.size() == 0 ) loadIdList( m_StoryDat, m_StoryIdList ); return m_StoryIdList; } -const std::set< uint32_t >& getSwitchTalkIdList() +const std::set< uint32_t >& ExdDataGenerated::getSwitchTalkIdList() { if( m_SwitchTalkIdList.size() == 0 ) loadIdList( m_SwitchTalkDat, m_SwitchTalkIdList ); return m_SwitchTalkIdList; } -const std::set< uint32_t >& getTerritoryTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getTerritoryTypeIdList() { if( m_TerritoryTypeIdList.size() == 0 ) loadIdList( m_TerritoryTypeDat, m_TerritoryTypeIdList ); return m_TerritoryTypeIdList; } -const std::set< uint32_t >& getTextCommandIdList() +const std::set< uint32_t >& ExdDataGenerated::getTextCommandIdList() { if( m_TextCommandIdList.size() == 0 ) loadIdList( m_TextCommandDat, m_TextCommandIdList ); return m_TextCommandIdList; } -const std::set< uint32_t >& getTitleIdList() +const std::set< uint32_t >& ExdDataGenerated::getTitleIdList() { if( m_TitleIdList.size() == 0 ) loadIdList( m_TitleDat, m_TitleIdList ); return m_TitleIdList; } -const std::set< uint32_t >& getTomestonesIdList() +const std::set< uint32_t >& ExdDataGenerated::getTomestonesIdList() { if( m_TomestonesIdList.size() == 0 ) loadIdList( m_TomestonesDat, m_TomestonesIdList ); return m_TomestonesIdList; } -const std::set< uint32_t >& getTomestonesItemIdList() +const std::set< uint32_t >& ExdDataGenerated::getTomestonesItemIdList() { if( m_TomestonesItemIdList.size() == 0 ) loadIdList( m_TomestonesItemDat, m_TomestonesItemIdList ); return m_TomestonesItemIdList; } -const std::set< uint32_t >& getTopicSelectIdList() +const std::set< uint32_t >& ExdDataGenerated::getTopicSelectIdList() { if( m_TopicSelectIdList.size() == 0 ) loadIdList( m_TopicSelectDat, m_TopicSelectIdList ); return m_TopicSelectIdList; } -const std::set< uint32_t >& getTownIdList() +const std::set< uint32_t >& ExdDataGenerated::getTownIdList() { if( m_TownIdList.size() == 0 ) loadIdList( m_TownDat, m_TownIdList ); return m_TownIdList; } -const std::set< uint32_t >& getTraitIdList() +const std::set< uint32_t >& ExdDataGenerated::getTraitIdList() { if( m_TraitIdList.size() == 0 ) loadIdList( m_TraitDat, m_TraitIdList ); return m_TraitIdList; } -const std::set< uint32_t >& getTraitRecastIdList() +const std::set< uint32_t >& ExdDataGenerated::getTraitRecastIdList() { if( m_TraitRecastIdList.size() == 0 ) loadIdList( m_TraitRecastDat, m_TraitRecastIdList ); return m_TraitRecastIdList; } -const std::set< uint32_t >& getTraitTransientIdList() +const std::set< uint32_t >& ExdDataGenerated::getTraitTransientIdList() { if( m_TraitTransientIdList.size() == 0 ) loadIdList( m_TraitTransientDat, m_TraitTransientIdList ); return m_TraitTransientIdList; } -const std::set< uint32_t >& getTribeIdList() +const std::set< uint32_t >& ExdDataGenerated::getTribeIdList() { if( m_TribeIdList.size() == 0 ) loadIdList( m_TribeDat, m_TribeIdList ); return m_TribeIdList; } -const std::set< uint32_t >& getTripleTriadIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadIdList() { if( m_TripleTriadIdList.size() == 0 ) loadIdList( m_TripleTriadDat, m_TripleTriadIdList ); return m_TripleTriadIdList; } -const std::set< uint32_t >& getTripleTriadCardIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardIdList() { if( m_TripleTriadCardIdList.size() == 0 ) loadIdList( m_TripleTriadCardDat, m_TripleTriadCardIdList ); return m_TripleTriadCardIdList; } -const std::set< uint32_t >& getTripleTriadCardRarityIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardRarityIdList() { if( m_TripleTriadCardRarityIdList.size() == 0 ) loadIdList( m_TripleTriadCardRarityDat, m_TripleTriadCardRarityIdList ); return m_TripleTriadCardRarityIdList; } -const std::set< uint32_t >& getTripleTriadCardResidentIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardResidentIdList() { if( m_TripleTriadCardResidentIdList.size() == 0 ) loadIdList( m_TripleTriadCardResidentDat, m_TripleTriadCardResidentIdList ); return m_TripleTriadCardResidentIdList; } -const std::set< uint32_t >& getTripleTriadCardTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardTypeIdList() { if( m_TripleTriadCardTypeIdList.size() == 0 ) loadIdList( m_TripleTriadCardTypeDat, m_TripleTriadCardTypeIdList ); return m_TripleTriadCardTypeIdList; } -const std::set< uint32_t >& getTripleTriadCompetitionIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCompetitionIdList() { if( m_TripleTriadCompetitionIdList.size() == 0 ) loadIdList( m_TripleTriadCompetitionDat, m_TripleTriadCompetitionIdList ); return m_TripleTriadCompetitionIdList; } -const std::set< uint32_t >& getTripleTriadRuleIdList() +const std::set< uint32_t >& ExdDataGenerated::getTripleTriadRuleIdList() { if( m_TripleTriadRuleIdList.size() == 0 ) loadIdList( m_TripleTriadRuleDat, m_TripleTriadRuleIdList ); return m_TripleTriadRuleIdList; } -const std::set< uint32_t >& getTutorialIdList() +const std::set< uint32_t >& ExdDataGenerated::getTutorialIdList() { if( m_TutorialIdList.size() == 0 ) loadIdList( m_TutorialDat, m_TutorialIdList ); return m_TutorialIdList; } -const std::set< uint32_t >& getTutorialDPSIdList() +const std::set< uint32_t >& ExdDataGenerated::getTutorialDPSIdList() { if( m_TutorialDPSIdList.size() == 0 ) loadIdList( m_TutorialDPSDat, m_TutorialDPSIdList ); return m_TutorialDPSIdList; } -const std::set< uint32_t >& getTutorialHealerIdList() +const std::set< uint32_t >& ExdDataGenerated::getTutorialHealerIdList() { if( m_TutorialHealerIdList.size() == 0 ) loadIdList( m_TutorialHealerDat, m_TutorialHealerIdList ); return m_TutorialHealerIdList; } -const std::set< uint32_t >& getTutorialTankIdList() +const std::set< uint32_t >& ExdDataGenerated::getTutorialTankIdList() { if( m_TutorialTankIdList.size() == 0 ) loadIdList( m_TutorialTankDat, m_TutorialTankIdList ); return m_TutorialTankIdList; } -const std::set< uint32_t >& getWarpIdList() +const std::set< uint32_t >& ExdDataGenerated::getWarpIdList() { if( m_WarpIdList.size() == 0 ) loadIdList( m_WarpDat, m_WarpIdList ); return m_WarpIdList; } -const std::set< uint32_t >& getWeatherIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeatherIdList() { if( m_WeatherIdList.size() == 0 ) loadIdList( m_WeatherDat, m_WeatherIdList ); return m_WeatherIdList; } -const std::set< uint32_t >& getWeatherGroupIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeatherGroupIdList() { if( m_WeatherGroupIdList.size() == 0 ) loadIdList( m_WeatherGroupDat, m_WeatherGroupIdList ); return m_WeatherGroupIdList; } -const std::set< uint32_t >& getWeatherRateIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeatherRateIdList() { if( m_WeatherRateIdList.size() == 0 ) loadIdList( m_WeatherRateDat, m_WeatherRateIdList ); return m_WeatherRateIdList; } -const std::set< uint32_t >& getWeeklyBingoOrderDataIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoOrderDataIdList() { if( m_WeeklyBingoOrderDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoOrderDataDat, m_WeeklyBingoOrderDataIdList ); return m_WeeklyBingoOrderDataIdList; } -const std::set< uint32_t >& getWeeklyBingoRewardDataIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoRewardDataIdList() { if( m_WeeklyBingoRewardDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoRewardDataDat, m_WeeklyBingoRewardDataIdList ); return m_WeeklyBingoRewardDataIdList; } -const std::set< uint32_t >& getWeeklyBingoTextIdList() +const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoTextIdList() { if( m_WeeklyBingoTextIdList.size() == 0 ) loadIdList( m_WeeklyBingoTextDat, m_WeeklyBingoTextIdList ); return m_WeeklyBingoTextIdList; } -const std::set< uint32_t >& getWorldDCGroupTypeIdList() +const std::set< uint32_t >& ExdDataGenerated::getWorldDCGroupTypeIdList() { if( m_WorldDCGroupTypeIdList.size() == 0 ) loadIdList( m_WorldDCGroupTypeDat, m_WorldDCGroupTypeIdList ); diff --git a/src/libraries b/src/libraries index e58b804b..bab17595 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit e58b804be5672cade4c55cd5f5ec60889d817550 +Subproject commit bab17595d24c697c6abea881e7849b388c898647 diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index b2438051..ea9e2861 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -11,7 +11,7 @@ #include "Player.h" #include "BattleNpc.h" -#include "Zone/ZoneMgr.h" +#include "Zone/TerritoryMgr.h" #include "Zone/Zone.h" #include "ServerZone.h" @@ -43,7 +43,7 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; +extern Core::TerritoryMgr g_territoryMgr; extern Core::Data::ExdData g_exdData; extern Core::Scripting::ScriptManager g_scriptMgr; @@ -309,7 +309,7 @@ void Core::Entity::Player::teleport( uint16_t aetheryteId, uint8_t type ) setStateFlag( PlayerStateFlag::BetweenAreas ); - auto z_pos = g_zoneMgr.getZonePosition( data->levelId ); + auto z_pos = g_territoryMgr.getTerritoryPosition( data->levelId ); Common::FFXIVARR_POSITION3 pos; pos.x = 0; @@ -367,8 +367,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId ) { auto pPlayer = getAsPlayer(); - auto pZone = g_zoneMgr.getZone( zoneId ); - + auto pZone = g_territoryMgr.getZoneByTerriId( zoneId ); if( !pZone /*|| ( ( pZone == m_pCurrentZone ) && m_lastPing )*/ ) { @@ -437,7 +436,7 @@ void Core::Entity::Player::setZone( uint32_t zoneId ) } ZoneChannelPacket< FFXIVIpcInitZone > initZonePacket( getId() ); - initZonePacket.data().zoneId = getCurrentZone()->getLayoutId(); + initZonePacket.data().zoneId = getCurrentZone()->getTerritoryId(); initZonePacket.data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() ); initZonePacket.data().bitmask = 0x1; initZonePacket.data().unknown5 = 0x2A; @@ -540,7 +539,7 @@ void Core::Entity::Player::discover( int16_t map_id, int16_t sub_id ) int32_t offset = 4; - auto info = g_exdData.m_zoneInfoMap[getCurrentZone()->getId()]; + auto info = g_exdData.m_zoneInfoMap[getCurrentZone()->getTerritoryId()]; if( info.is_two_byte ) offset = 4 + 2 * info.discovery_index; else @@ -1030,7 +1029,7 @@ void Core::Entity::Player::update( int64_t currTime ) if( m_queuedZoneing && ( currTime - m_queuedZoneing->m_queueTime ) > 800 ) { Common::FFXIVARR_POSITION3 targetPos = m_queuedZoneing->m_targetPosition; - if( getCurrentZone()->getId() != m_queuedZoneing->m_targetZone ) + if( getCurrentZone()->getTerritoryId() != m_queuedZoneing->m_targetZone ) { performZoning( m_queuedZoneing->m_targetZone, targetPos, m_queuedZoneing->m_targetRotation); } diff --git a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp index 6e201984..e20dfa88 100644 --- a/src/servers/sapphire_zone/Actor/PlayerInventory.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerInventory.cpp @@ -5,7 +5,6 @@ #include "Player.h" -#include "Zone/ZoneMgr.h" #include "Zone/Zone.h" #include "Network/PacketWrappers/ActorControlPacket142.h" diff --git a/src/servers/sapphire_zone/Actor/PlayerSql.cpp b/src/servers/sapphire_zone/Actor/PlayerSql.cpp index 5a242c52..34816b72 100644 --- a/src/servers/sapphire_zone/Actor/PlayerSql.cpp +++ b/src/servers/sapphire_zone/Actor/PlayerSql.cpp @@ -16,7 +16,7 @@ #include "Player.h" -#include "Zone/ZoneMgr.h" +#include "Zone/TerritoryMgr.h" #include "Zone/Zone.h" #include "ServerZone.h" @@ -30,7 +30,7 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; +extern Core::TerritoryMgr g_territoryMgr; extern Core::Data::ExdData g_exdData; @@ -58,7 +58,7 @@ bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession ) auto zoneId = res->getUInt( "TerritoryId" ); - ZonePtr pCurrZone = g_zoneMgr.getZone( zoneId ); + ZonePtr pCurrZone = g_territoryMgr.getZoneByTerriId( zoneId ); m_zoneId = zoneId; // TODO: logic for instances needs to be added here @@ -70,7 +70,7 @@ bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession ) // default to new gridania // TODO: should probably just abort and mark character as corrupt - pCurrZone = g_zoneMgr.getZone( 132 ); + pCurrZone = g_territoryMgr.getZoneByTerriId( 132 ); m_pos.x = 0.0f; m_pos.y = 0.0f; diff --git a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp index ad448772..04c6a633 100644 --- a/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp +++ b/src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp @@ -425,7 +425,7 @@ void Core::DebugCommandHandler::get( char * data, Entity::Player& player, boost: if( ( subCommand == "pos" ) ) { - int16_t map_id = g_exdData.m_zoneInfoMap[player.getCurrentZone()->getId()].map_id; + int16_t map_id = g_exdData.m_zoneInfoMap[player.getCurrentZone()->getTerritoryId()].map_id; player.sendNotice( "Pos:\n" + std::to_string( player.getPos().x ) + "\n" + @@ -433,7 +433,7 @@ void Core::DebugCommandHandler::get( char * data, Entity::Player& player, boost: std::to_string( player.getPos().z ) + "\n" + std::to_string( player.getRotation() ) + "\nMapId: " + std::to_string( map_id ) + "\nZoneID: " + - std::to_string( player.getCurrentZone()->getId() ) + "\n" ); + std::to_string(player.getCurrentZone()->getTerritoryId() ) + "\n" ); } else { diff --git a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp index 79e5e8ea..90c9140a 100644 --- a/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/ActionHandler.cpp @@ -13,7 +13,6 @@ #include "Zone/Zone.h" #include "Zone/ZonePosition.h" #include "ServerZone.h" -#include "Zone/ZoneMgr.h" #include "Network/PacketWrappers/InitUIPacket.h" #include "Network/PacketWrappers/PingPacket.h" @@ -37,7 +36,6 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; extern Core::Data::ExdData g_exdData; extern Core::DebugCommandHandler g_gameCommandMgr; diff --git a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp index 736a1fd8..8ffbb655 100644 --- a/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/GMCommandHandlers.cpp @@ -10,10 +10,10 @@ #include "Network/GameConnection.h" #include "Session.h" +#include "Zone/TerritoryMgr.h" #include "Zone/Zone.h" #include "Zone/ZonePosition.h" #include "ServerZone.h" -#include "Zone/ZoneMgr.h" #include "Network/PacketWrappers/InitUIPacket.h" #include "Network/PacketWrappers/PingPacket.h" @@ -37,7 +37,7 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; +extern Core::TerritoryMgr g_territoryMgr; extern Core::Data::ExdData g_exdData; extern Core::DebugCommandHandler g_gameCommandMgr; @@ -403,16 +403,22 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac } case GmCommand::Teri: { - auto zoneInfo = g_zoneMgr.getZone( param1 ); - if ( !zoneInfo ) + + if( !g_territoryMgr.isValidTerritory( param1 ) ) { player.sendUrgent( "Invalid zone " + std::to_string( param1 ) ); } else { + auto pZone = g_territoryMgr.getZoneByTerriId( param1 ); + if( !pZone ) + { + player.sendUrgent( "No zone instance found for " + std::to_string( param1 ) ); + break; + } targetPlayer->setPosition( targetPlayer->getPos() ); targetPlayer->performZoning( param1, targetPlayer->getPos(), 0 ); - player.sendNotice( targetPlayer->getName() + " was warped to zone " + std::to_string( param1 ) + " (" + zoneInfo->getName( ) + ")" ); + player.sendNotice( targetPlayer->getName() + " was warped to zone " + std::to_string( param1 ) + " (" + pZone->getName() + ")" ); } break; } diff --git a/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp b/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp index 3f87d2ab..752ca776 100644 --- a/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/InventoryHandler.cpp @@ -13,7 +13,6 @@ #include "Zone/Zone.h" #include "Zone/ZonePosition.h" #include "ServerZone.h" -#include "Zone/ZoneMgr.h" #include "Network/PacketWrappers/ServerNoticePacket.h" #include "Network/PacketWrappers/ActorControlPacket142.h" @@ -27,7 +26,6 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; extern Core::Data::ExdData g_exdData; extern Core::DebugCommandHandler g_gameCommandMgr; diff --git a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp index fe58f3aa..31495441 100644 --- a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp @@ -12,10 +12,10 @@ #include "Network/GameConnection.h" #include "Session.h" +#include "ServerZone.h" +#include "Zone/TerritoryMgr.h" #include "Zone/Zone.h" #include "Zone/ZonePosition.h" -#include "ServerZone.h" -#include "Zone/ZoneMgr.h" #include "Network/PacketWrappers/InitUIPacket.h" #include "Network/PacketWrappers/PingPacket.h" @@ -40,7 +40,7 @@ extern Core::Logger g_log; extern Core::ServerZone g_serverZone; -extern Core::ZoneMgr g_zoneMgr; +extern Core::TerritoryMgr g_territoryMgr; extern Core::Data::ExdData g_exdData; extern Core::DebugCommandHandler g_gameCommandMgr; @@ -297,7 +297,7 @@ void Core::Network::GameConnection::zoneLineHandler( const Packets::GamePacket& auto pZone = player.getCurrentZone(); - auto pLine = g_zoneMgr.getZonePosition( zoneLineId ); + auto pLine = g_territoryMgr.getTerritoryPosition( zoneLineId ); Common::FFXIVARR_POSITION3 targetPos{}; uint32_t targetZone; @@ -324,7 +324,7 @@ void Core::Network::GameConnection::zoneLineHandler( const Packets::GamePacket& targetPos.x = 0; targetPos.y = 0; targetPos.z = 0; - targetZone = pZone->getId(); + targetZone = pZone->getTerritoryId(); } player.performZoning( targetZone, targetPos, rotation); @@ -442,7 +442,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket int32_t entrysizes = sizeof( listPacket.data().entries ); memset( listPacket.data().entries, 0, sizeof( listPacket.data().entries ) ); - listPacket.data().entries[0].bytes[2] = player.getCurrentZone()->getId(); + listPacket.data().entries[0].bytes[2] = player.getCurrentZone()->getTerritoryId(); listPacket.data().entries[0].bytes[3] = 0x80; listPacket.data().entries[0].bytes[4] = 0x02; listPacket.data().entries[0].bytes[6] = 0x3B; @@ -450,7 +450,7 @@ void Core::Network::GameConnection::socialListHandler( const Packets::GamePacket listPacket.data().entries[0].classJob = static_cast< uint8_t >( player.getClass() ); listPacket.data().entries[0].contentId = player.getContentId(); listPacket.data().entries[0].level = player.getLevel(); - listPacket.data().entries[0].zoneId = player.getCurrentZone()->getId(); + listPacket.data().entries[0].zoneId = player.getCurrentZone()->getTerritoryId(); listPacket.data().entries[0].zoneId1 = 0x0100; // TODO: no idea what this does //listPacket.data().entries[0].one = 1; diff --git a/src/servers/sapphire_zone/Script/ScriptManager.cpp b/src/servers/sapphire_zone/Script/ScriptManager.cpp index f2f10ceb..40eddee6 100644 --- a/src/servers/sapphire_zone/Script/ScriptManager.cpp +++ b/src/servers/sapphire_zone/Script/ScriptManager.cpp @@ -332,7 +332,7 @@ bool Core::Scripting::ScriptManager::onStatusTimeOut( Entity::ActorPtr pActor, u bool Core::Scripting::ScriptManager::onZoneInit( ZonePtr pZone ) { - auto script = m_nativeScriptManager->getScript< ZoneScript >( pZone->getId() ); + auto script = m_nativeScriptManager->getScript< ZoneScript >(pZone->getTerritoryId() ); if( script ) { script->onZoneInit(); diff --git a/src/servers/sapphire_zone/ServerZone.cpp b/src/servers/sapphire_zone/ServerZone.cpp index d97a7d33..712fa37d 100644 --- a/src/servers/sapphire_zone/ServerZone.cpp +++ b/src/servers/sapphire_zone/ServerZone.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -21,7 +22,7 @@ #include "Network/GameConnection.h" #include "Session.h" -#include "Zone/ZoneMgr.h" +#include "Zone/TerritoryMgr.h" #include "DebugCommand/DebugCommandHandler.h" @@ -33,12 +34,14 @@ #include #include #include +#include Core::Logger g_log; Core::DebugCommandHandler g_gameCommandMgr; Core::Scripting::ScriptManager g_scriptMgr; Core::Data::ExdData g_exdData; -Core::ZoneMgr g_zoneMgr; +Core::Data::ExdDataGenerated g_exdDataGen; +Core::TerritoryMgr g_territoryMgr; Core::LinkshellMgr g_linkshellMgr; Core::Db::DbWorkerPool< Core::Db::CharaDbConnection > g_charaDb; @@ -168,6 +171,13 @@ bool Core::ServerZone::loadSettings( int32_t argc, char* argv[] ) return false; } + g_log.info( "Setting up generated EXD data" ); + if( !g_exdDataGen.init( m_pConfig->getValue< std::string >( "Settings.General.DataPath", "" ) ) ) + { + g_log.fatal( "Error setting up generated EXD data " ); + return false; + } + Core::Db::DbLoader loader; Core::Db::ConnectionInfo info; @@ -224,8 +234,8 @@ void Core::ServerZone::run( int32_t argc, char* argv[] ) g_scriptMgr.init(); - g_log.info( "ZoneMgr: Setting up zones" ); - g_zoneMgr.createZones(); + g_log.info( "TerritoryMgr: Setting up zones" ); + g_territoryMgr.init(); std::vector< std::thread > thread_list; thread_list.emplace_back( std::thread( std::bind( &Network::Hive::Run, hive.get() ) ) ); @@ -258,12 +268,13 @@ void Core::ServerZone::mainLoop() { this_thread::sleep_for( chrono::milliseconds( 50 ) ); - g_zoneMgr.updateZones(); + + auto currTime = static_cast< uint32_t >( Util::getTimeSeconds() ); + + g_territoryMgr.updateTerritoryInstances( currTime ); g_scriptMgr.update(); - auto currTime = static_cast< uint32_t >( time( nullptr ) ); - lock_guard< std::mutex > lock( this->m_sessionMutex ); for( auto sessionIt : this->m_sessionMapById ) { diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp new file mode 100644 index 00000000..e62b1f9f --- /dev/null +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -0,0 +1,201 @@ +#include "TerritoryMgr.h" + +#include +#include +#include + +#include "Zone.h" +#include "ZonePosition.h" + +extern Core::Logger g_log; +extern Core::Data::ExdData g_exdData; +extern Core::Data::ExdDataGenerated g_exdDataGen; + +Core::TerritoryMgr::TerritoryMgr() : + m_lastInstanceId( 10000 ) +{ + +} + +void Core::TerritoryMgr::loadTerritoryTypeDetailCache() +{ + auto idList = g_exdDataGen.getTerritoryTypeIdList(); + + for( auto id : idList ) + { + auto teri1 = g_exdDataGen.getTerritoryType( id ); + + if( !teri1->name.empty() ) + m_territoryTypeDetailCacheMap[id] = teri1; + } +} + +bool Core::TerritoryMgr::isValidTerritory( uint32_t territoryTypeId ) const +{ + return !( m_territoryTypeDetailCacheMap.find( territoryTypeId ) == m_territoryTypeDetailCacheMap.end() ); +} + +bool Core::TerritoryMgr::init() +{ + loadTerritoryTypeDetailCache(); + loadTerritoryPositionMap(); + + createDefaultTerritories(); + + return true; +} + +uint32_t Core::TerritoryMgr::getNextInstanceId() +{ + return ++m_lastInstanceId; +} + +Core::Data::TerritoryTypePtr Core::TerritoryMgr::getTerritoryDetail( uint32_t territoryTypeId ) const +{ + auto tIt = m_territoryTypeDetailCacheMap.find( territoryTypeId ); + if( tIt == m_territoryTypeDetailCacheMap.end() ) + return nullptr; + + return tIt->second; +} + +bool Core::TerritoryMgr::isInstanceContentTerritory( uint32_t territoryTypeId ) const +{ + auto pTeri = getTerritoryDetail( territoryTypeId ); + + if( !pTeri ) + return false; + + if ( territoryTypeId == 359 ) + { + // return false; + } + + return pTeri->territoryIntendedUse == TerritoryIntendedUse::AllianceRaid || + pTeri->territoryIntendedUse == TerritoryIntendedUse::BeforeTrialDung || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Trial || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Dungeon || + pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorldInstanceBattle || + pTeri->territoryIntendedUse == TerritoryIntendedUse::PalaceOfTheDead || + pTeri->territoryIntendedUse == TerritoryIntendedUse::RaidFights || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Raids; +} + +bool Core::TerritoryMgr::isPrivateTerritory( uint32_t territoryTypeId ) const +{ + auto pTeri = getTerritoryDetail( territoryTypeId ); + + if( !pTeri ) + return false; + + return pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || + pTeri->territoryIntendedUse == TerritoryIntendedUse::HousingPrivateArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::JailArea || + pTeri->territoryIntendedUse == TerritoryIntendedUse::MSQPrivateArea; +} + + +bool Core::TerritoryMgr::createDefaultTerritories() +{ + // for each entry in territoryTypeExd, check if it is a normal and if so, add the zone object + for( const auto& territory : m_territoryTypeDetailCacheMap ) + { + auto territoryId = territory.first; + auto territoryInfo = territory.second; + + // if the zone has no name set + if( territoryInfo->name.empty() ) + continue; + + auto pPlaceName = g_exdDataGen.getPlaceName( territoryInfo->placeName ); + + if( !pPlaceName || pPlaceName->name.empty() || !isDefaultTerritory( territoryId ) ) + continue; + + uint32_t guid = getNextInstanceId(); + g_log.Log( LoggingSeverity::info, std::to_string( territoryId ) + + "\t" + std::to_string( guid ) + + "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + + "\t" + territoryInfo->name + + "\t" + pPlaceName->name ); + + ZonePtr pZone( new Zone( territoryId, guid, territoryInfo->name, pPlaceName->name, false ) ); + pZone->init(); + + InstanceIdToZonePtrMap instanceMap; + instanceMap[guid] = pZone; + + m_territoryInstanceMap[territoryId] = instanceMap; + + } + + return true; +} + +void Core::TerritoryMgr::loadTerritoryPositionMap() +{ + auto pQR = g_charaDb.query( "SELECT id, target_zone_id, pos_x, pos_y, pos_z, pos_o, radius FROM zonepositions;" ); + + while( pQR->next() ) + { + uint32_t id = pQR->getUInt( 1 ); + uint32_t targetZoneId = pQR->getUInt( 2 ); + Common::FFXIVARR_POSITION3 pos{}; + pos.x = pQR->getFloat( 3 ); + pos.y = pQR->getFloat( 4 ); + pos.z = pQR->getFloat( 5 ); + float posO = pQR->getFloat( 6 ); + uint32_t radius = pQR->getUInt( 7 ); + + m_territoryPositionMap[id] = ZonePositionPtr( new ZonePosition( id, targetZoneId, pos, radius, posO ) ); + } +} + +bool Core::TerritoryMgr::isDefaultTerritory( uint32_t territoryTypeId ) const +{ + auto pTeri = getTerritoryDetail( territoryTypeId ); + + if( !pTeri ) + return false; + + return pTeri->territoryIntendedUse == TerritoryIntendedUse::Inn || + pTeri->territoryIntendedUse == TerritoryIntendedUse::Town || + pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorld || + pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea; + +} + +Core::ZonePositionPtr Core::TerritoryMgr::getTerritoryPosition( uint32_t territoryPositionId ) const +{ + auto it = m_territoryPositionMap.find( territoryPositionId ); + + if( it != m_territoryPositionMap.end() ) + return it->second; + + return nullptr; +} + +Core::ZonePtr Core::TerritoryMgr::getZoneByTerriId( uint32_t territoryId ) const +{ + auto zoneMap = m_territoryInstanceMap.find( territoryId ); + if( zoneMap == m_territoryInstanceMap.end() ) + return nullptr; + + // TODO: actually select the proper one + return zoneMap->second.begin()->second; + + return nullptr; +} + +void Core::TerritoryMgr::updateTerritoryInstances( uint32_t currentTime ) +{ + for( auto zoneMap : m_territoryInstanceMap ) + { + for( auto zone : zoneMap.second ) + zone.second->runZoneLogic( currentTime ); + } + +} + + diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.h b/src/servers/sapphire_zone/Zone/TerritoryMgr.h new file mode 100644 index 00000000..0018212a --- /dev/null +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.h @@ -0,0 +1,133 @@ +#ifndef SAPPHIRE_TERRITORYMGR_H +#define SAPPHIRE_TERRITORYMGR_H + +#include +#include "Forwards.h" + +namespace Core +{ + namespace Data + { + // TODO: this should actually not be here but should be generated in exdData aswell + struct PlaceName; + struct TerritoryType; + struct InstanceContent; + + using PlaceNamePtr = boost::shared_ptr< PlaceName >; + using TerritoryTypePtr = boost::shared_ptr< TerritoryType >; + using InstanceContentPtr = boost::shared_ptr< InstanceContent >; + } + + /*! + \class TerritoryMgr_c + \brief A class managing zones + + This class manages persistent and temporary instances alike. + + */ + class TerritoryMgr + { + + public: + enum TerritoryIntendedUse : uint8_t //ToDo: Add The Rest of The Territory Types and Have Better Names For Them + { + Town = 0, + OpenWorld = 1, + Inn = 2, + Dungeon = 3, + JailArea = 5, + OpeningArea = 6, + BeforeTrialDung = 7, + AllianceRaid = 8, + OpenWorldInstanceBattle = 9, + Trial = 10, + HousingArea = 13, + HousingPrivateArea = 14, + MSQPrivateArea = 15, + Raids = 16, + RaidFights = 17, + ChocoboTutorial = 21, + Wedding = 22, + BeginnerTutorial = 27, + PalaceOfTheDead = 31, + }; + + TerritoryMgr(); + + /*! initializes the territoryMgr */ + bool init(); + + bool createDefaultTerritories(); + + /*! caches TerritoryType details into m_territoryTypeMap */ + void loadTerritoryTypeDetailCache(); + + /*! List of positions for zonelines */ + void loadTerritoryPositionMap(); + + /*! returns true if the given territoryTypeId is in fact a valid zone + based on informations in the dats ( checks if an entry in the dats exists trhough cache ) */ + bool isValidTerritory( uint32_t territoryTypeId ) const; + + /*! returns the next available instanceId */ + uint32_t getNextInstanceId(); + + /*! returns true if the territoryType in question is not a persistant zone */ + bool isInstanceContentTerritory( uint32_t territoryTypeId ) const; + + /*! returns true if the territoryType in question is not a private zone */ + bool isPrivateTerritory( uint32_t territoryTypeId ) const; + + /*! returns true if the territyTyoe is a default-non instanced zone */ + bool isDefaultTerritory( uint32_t territoryTypeId ) const; + + /*! creates a new instance for a given territoryTypeId */ + ZonePtr createTerritoryInstance( uint32_t territoryTypeId ); + + /*! removes instance by instanceId, return true if successful */ + bool removeTerritoryInstance( uint32_t territoryTypeId ); + + /*! returns the cached detail of a territory, nullptr if not found */ + Data::TerritoryTypePtr getTerritoryDetail( uint32_t territoryTypeId ) const; + + /*! loop for processing territory logic, iterating all existing instances */ + void updateTerritoryInstances( uint32_t currentTime ); + + /*! pushes a new instances onto the handling map */ + bool addInstance( ZonePtr pInstance ); + + /*! returns a ZonePtr to the instance or nullptr if not found */ + ZonePtr getInstance( uint32_t instanceId ) const; + + /*! returns a ZonePositionPtr if found, else nullptr */ + ZonePositionPtr getTerritoryPosition( uint32_t territoryPositionId ) const; + + /*! returns a default Zone by territoryId + TODO: Mind multiple instances?! */ + ZonePtr getZoneByTerriId( uint32_t territoryId ) const; + + private: + using TerritoryTypeDetailCache = std::unordered_map< uint16_t, Data::TerritoryTypePtr >; + using InstanceIdToZonePtrMap = std::unordered_map< uint32_t, ZonePtr >; + using TerritoryIdToInstanceMap = std::unordered_map< uint16_t, InstanceIdToZonePtrMap >; + using PositionMap = std::unordered_map< int32_t, ZonePositionPtr >; + + /*! map holding details for territory templates */ + TerritoryTypeDetailCache m_territoryTypeDetailCacheMap; + + /*! map holding actual instances of territories */ + TerritoryIdToInstanceMap m_territoryInstanceMap; + + /*! map holding positions for zonelines */ + PositionMap m_territoryPositionMap; + + /*! internal counter for instanceIds + TODO: it should be ensured that this does not overflow if the server runs for a loooong time + ( as if that will ever happen ;) ) */ + uint32_t m_lastInstanceId; + + }; + +} + +#endif // SAPPHIRE_TERRITORYMGR_H diff --git a/src/servers/sapphire_zone/Zone/Zone.cpp b/src/servers/sapphire_zone/Zone/Zone.cpp index c1b6dbc6..1b8cb402 100644 --- a/src/servers/sapphire_zone/Zone/Zone.cpp +++ b/src/servers/sapphire_zone/Zone/Zone.cpp @@ -13,7 +13,7 @@ #include #include "Zone.h" -#include "ZoneMgr.h" +#include "TerritoryMgr.h" #include "Session.h" #include "Actor/Actor.h" @@ -41,8 +41,8 @@ namespace Core { * \brief */ Zone::Zone() - : m_zoneId( 0 ) - , m_layoutId( 0 ) + : m_territoryId( 0 ) + , m_guId( 0 ) , m_bPrivate( false ) , m_type( Common::RegionType::normal ) , m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) ) @@ -51,15 +51,15 @@ Zone::Zone() { } -Zone::Zone( uint16_t zoneId, uint32_t layoutId, std::string name, std::string interName, bool bPrivate = false ) +Zone::Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate = false ) : m_type( Common::RegionType::normal ) , m_currentWeather( static_cast< uint8_t >( Common::Weather::FairSkies ) ) { - m_layoutId = layoutId; + m_guId = guId; - m_zoneId = zoneId; - m_zoneCode = name; - m_zoneName = interName; + m_territoryId = territoryId; + m_internalName = internalName; + m_placeName = placeName; m_bPrivate = bPrivate; m_lastMobUpdate = 0; @@ -150,7 +150,7 @@ void Zone::loadCellCache() "Look," "Models," "type " - "FROM battlenpc WHERE ZoneId = " + std::to_string( getId() ) + ";" ); + "FROM battlenpc WHERE ZoneId = " + std::to_string(getTerritoryId() ) + ";" ); std::vector< Entity::BattleNpcPtr > cache; @@ -175,10 +175,7 @@ void Zone::loadCellCache() uint32_t modelId = pQR->getUInt( 17 ); uint32_t type = pQR->getUInt( 18 ); - Common::FFXIVARR_POSITION3 pos; - pos.x = posX; - pos.y = posY; - pos.z = posZ; + Common::FFXIVARR_POSITION3 pos{ posX, posY, posZ }; Entity::BattleNpcPtr pBNpc( new Entity::BattleNpc( modelId, nameId, pos, sizeId, type, level, behaviour, mobType ) ); pBNpc->setRotation( static_cast< float >( rotation ) ); @@ -190,8 +187,8 @@ void Zone::loadCellCache() for( auto entry : cache ) { // get cell position - uint32_t cellX = CellHandler< ZoneMgr >::getPosX( entry->getPos().x ); - uint32_t cellY = CellHandler< ZoneMgr >::getPosY( entry->getPos().z ); + uint32_t cellX = CellHandler< TerritoryMgr >::getPosX( entry->getPos().x ); + uint32_t cellY = CellHandler< TerritoryMgr >::getPosY( entry->getPos().z ); // find the right cell, create it if not existing yet if( m_pCellCache[cellX] == nullptr ) @@ -211,9 +208,9 @@ void Zone::loadCellCache() uint8_t Zone::getNextWeather() { - auto zoneInfo = g_exdData.m_zoneInfoMap[ getLayoutId() ]; + auto zoneInfo = g_exdData.m_zoneInfoMap[getGuId() ]; - uint32_t unixTime = static_cast< uint32_t >( time( nullptr ) ); + uint32_t unixTime = static_cast< uint32_t >( Util::getTimeSeconds() ); // Get Eorzea hour for weather start uint32_t bell = unixTime / 175; // Do the magic 'cause for calculations 16:00 is 0, 00:00 is 8 and 08:00 is 16 @@ -227,12 +224,12 @@ uint8_t Zone::getNextWeather() uint32_t step1 = ( calcBase << 0xB ) ^ calcBase; uint32_t step2 = ( step1 >> 8 ) ^ step1; - uint8_t rate = static_cast< uint8_t >(step2 % 0x64); + auto rate = static_cast< uint8_t >( step2 % 0x64 ); for( auto entry : zoneInfo.weather_rate_map ) { uint8_t sRate = entry.first; - int32_t weatherId = entry.second; + auto weatherId = static_cast< uint8_t >( entry.second ); if( rate <= sRate ) return weatherId; @@ -280,7 +277,7 @@ void Zone::pushActor( Entity::ActorPtr pActor ) if( pActor->isPlayer() ) { - g_log.debug( "[Zone:" + m_zoneCode + "] Adding player [" + std::to_string( pActor->getId() ) + "]" ); + g_log.debug( "[Zone:" + m_internalName + "] Adding player [" + std::to_string( pActor->getId() ) + "]" ); auto pPlayer = pActor->getAsPlayer(); auto pSession = g_serverZone.getSession( pPlayer->getId() ); @@ -313,7 +310,7 @@ void Zone::removeActor( Entity::ActorPtr pActor ) if( pActor->isPlayer() ) { - g_log.debug( "[Zone:" + m_zoneCode + "] Removing player [" + std::to_string( pActor->getId() ) + "]" ); + g_log.debug( "[Zone:" + m_internalName + "] Removing player [" + std::to_string( pActor->getId() ) + "]" ); // If it's a player and he's inside boundaries - update his nearby cells if( pActor->getPos().x <= _maxX && pActor->getPos().x >= _minX && pActor->getPos().z <= _maxY && pActor->getPos().z >= _minY ) @@ -365,9 +362,9 @@ void Zone::queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, } } -uint32_t Zone::getId() +uint32_t Zone::getTerritoryId() { - return m_zoneId; + return m_territoryId; } Common::RegionType Zone::getType() const @@ -375,9 +372,9 @@ Common::RegionType Zone::getType() const return m_type; } -uint16_t Zone::getLayoutId() const +uint16_t Zone::getGuId() const { - return m_layoutId; + return m_guId; } bool Zone::isInstance() const @@ -387,12 +384,12 @@ bool Zone::isInstance() const const std::string& Zone::getName() const { - return m_zoneName; + return m_placeName; } const std::string& Zone::getInternalName() const { - return m_zoneCode; + return m_internalName; } std::size_t Zone::getPopCount() const @@ -407,7 +404,7 @@ bool Zone::checkWeather() if ( m_weatherOverride != m_currentWeather ) { m_currentWeather = m_weatherOverride; - g_log.debug( "[Zone:" + m_zoneCode + "] overriding weather to : " + std::to_string( m_weatherOverride ) ); + g_log.debug( "[Zone:" + m_internalName + "] overriding weather to : " + std::to_string( m_weatherOverride ) ); return true; } } @@ -417,7 +414,7 @@ bool Zone::checkWeather() if ( nextWeather != m_currentWeather ) { m_currentWeather = nextWeather; - g_log.debug( "[Zone:" + m_zoneCode + "] changing weather to : " + std::to_string( nextWeather ) ); + g_log.debug( "[Zone:" + m_internalName + "] changing weather to : " + std::to_string( nextWeather ) ); return true; } } @@ -472,7 +469,7 @@ void Zone::updateBnpcs( int64_t tickCount ) } } -bool Zone::runZoneLogic() +bool Zone::runZoneLogic( uint32_t currTime ) { int64_t tickCount = Util::getTimeMs(); @@ -495,7 +492,7 @@ bool Zone::runZoneLogic() // this session is not linked to this area anymore, remove it from zone session list if( ( !pSession->getPlayer()->getCurrentZone() ) || ( pSession->getPlayer()->getCurrentZone() != shared_from_this() ) ) { - g_log.debug( "[Zone:" + m_zoneCode + "] removing session " + std::to_string( pSession->getId() ) ); + g_log.debug( "[Zone:" + m_internalName + "] removing session " + std::to_string( pSession->getId() ) ); if( pSession->getPlayer()->getCell() ) removeActor( pSession->getPlayer() ); diff --git a/src/servers/sapphire_zone/Zone/Zone.h b/src/servers/sapphire_zone/Zone/Zone.h index 4ea39cb1..c2caa2e3 100644 --- a/src/servers/sapphire_zone/Zone/Zone.h +++ b/src/servers/sapphire_zone/Zone/Zone.h @@ -15,26 +15,21 @@ #include #include namespace Core { -namespace Entity -{ - class Actor; - class Player; -} class Session; class ZonePosition; -typedef std::set< SessionPtr > SessionSet; +using SessionSet = std::set< SessionPtr >; class Zone : public CellHandler< Cell >, public boost::enable_shared_from_this< Zone > { protected: - uint32_t m_zoneId; - uint32_t m_layoutId; + uint32_t m_territoryId; + uint32_t m_guId; - std::string m_zoneName; - std::string m_zoneCode; + std::string m_placeName; + std::string m_internalName; bool m_bPrivate; @@ -57,7 +52,7 @@ protected: public: Zone(); - Zone( uint16_t zoneId, uint32_t layoutId, std::string name, std::string interName, bool bPrivate ); + Zone( uint16_t territoryId, uint32_t guId, const std::string& internalName, const std::string& placeName, bool bPrivate ); virtual ~Zone(); bool init(); @@ -91,11 +86,11 @@ public: void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::GamePacketPtr pPacketEntry ); - virtual uint32_t getId(); + virtual uint32_t getTerritoryId(); Common::RegionType getType() const; - uint16_t getLayoutId() const; + uint16_t getGuId() const; bool isInstance() const; @@ -107,7 +102,7 @@ public: bool checkWeather(); void updateBnpcs( int64_t tickCount ); - bool runZoneLogic(); + bool runZoneLogic( uint32_t currTime ); }; diff --git a/src/servers/sapphire_zone/Zone/ZoneMgr.cpp b/src/servers/sapphire_zone/Zone/ZoneMgr.cpp deleted file mode 100644 index e644f4b5..00000000 --- a/src/servers/sapphire_zone/Zone/ZoneMgr.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include -#include -#include - -#include "ZoneMgr.h" -#include "Zone.h" -#include "ZonePosition.h" - - -extern Core::Logger g_log; -extern Core::Data::ExdData g_exdData; - -namespace Core { - - ZoneMgr::ZoneMgr() = default; - - ZoneMgr::~ZoneMgr() = default; - - void ZoneMgr::loadZonePositionMap() - { - auto pQR = g_charaDb.query( "SELECT id, target_zone_id, pos_x, pos_y, pos_z, pos_o, radius FROM zonepositions;" ); - - while( pQR->next() ) - { - uint32_t id = pQR->getUInt( 1 ); - uint32_t targetZoneId = pQR->getUInt( 2 ); - Common::FFXIVARR_POSITION3 pos; - pos.x = pQR->getFloat( 3 ); - pos.y = pQR->getFloat( 4 ); - pos.z = pQR->getFloat( 5 ); - float posO = pQR->getFloat( 6 ); - uint32_t radius = pQR->getUInt( 7 ); - - m_zonePositionMap[id] = ZonePositionPtr( new ZonePosition( id, targetZoneId, pos, radius, posO ) ); - } - } - - ZonePositionPtr ZoneMgr::getZonePosition( uint32_t zonePositionId ) - { - auto it = m_zonePositionMap.find( zonePositionId ); - - if( it != m_zonePositionMap.end() ) - return it->second; - - return nullptr; - } - - bool ZoneMgr::createZones() - { - loadZonePositionMap(); - - // find zone info from exd - for( auto zone : g_exdData.m_zoneInfoMap ) - { - uint32_t zoneId = zone.first; - - - auto info = zone.second; - g_log.Log( LoggingSeverity::info, std::to_string( info.id ) + "\t" + info.zone_str ); - - ZonePtr pZone( new Zone( info.id, info.layout_id, info.zone_name, info.zone_str, false ) ); - pZone->init(); - m_zoneMap[info.id] = pZone; - } - - return true; - } - - void ZoneMgr::updateZones() - { - for( auto zone : m_zoneMap ) - { - zone.second->runZoneLogic(); - } - } - - ZonePtr ZoneMgr::getZone( uint32_t zoneId ) - { - ZoneMap::iterator it; - it = m_zoneMap.find( zoneId ); - - if( it != m_zoneMap.end() ) - return it->second; - - return nullptr; - } - -} diff --git a/src/servers/sapphire_zone/Zone/ZoneMgr.h b/src/servers/sapphire_zone/Zone/ZoneMgr.h deleted file mode 100644 index bab6c23b..00000000 --- a/src/servers/sapphire_zone/Zone/ZoneMgr.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef _ZONEMGR_H -#define _ZONEMGR_H - - -#include -#include -#include "Forwards.h" - -namespace Core { - - using ZoneMap = std::unordered_map< uint32_t, ZonePtr >; - - class ZoneMgr - { - public: - ZoneMgr(); - ~ZoneMgr(); - - bool createZones(); - - ZonePtr getZone( uint32_t zoneId ); - - void loadZonePositionMap(); - - ZonePositionPtr getZonePosition( uint32_t zonePositionId ); - - void updateZones(); - - private: - ZoneMap m_zoneMap; - - std::unordered_map m_zonePositionMap; - - }; - -} - -#endif - diff --git a/src/tools/exd_struct_test/main.cpp b/src/tools/exd_struct_test/main.cpp index a3b50104..0b9e66cc 100644 --- a/src/tools/exd_struct_test/main.cpp +++ b/src/tools/exd_struct_test/main.cpp @@ -9,7 +9,7 @@ #include #include #include -#include "ExdDataGenerated.h" +#include #include #include #include From 6404951549920fe34167908759c95cda15d438a6 Mon Sep 17 00:00:00 2001 From: Mordred Date: Sat, 27 Jan 2018 23:54:26 +0100 Subject: [PATCH 18/45] Removed debug code --- src/servers/sapphire_zone/Zone/TerritoryMgr.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp index e62b1f9f..1c9c3b59 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -66,11 +66,6 @@ bool Core::TerritoryMgr::isInstanceContentTerritory( uint32_t territoryTypeId ) if( !pTeri ) return false; - if ( territoryTypeId == 359 ) - { - // return false; - } - return pTeri->territoryIntendedUse == TerritoryIntendedUse::AllianceRaid || pTeri->territoryIntendedUse == TerritoryIntendedUse::BeforeTrialDung || pTeri->territoryIntendedUse == TerritoryIntendedUse::Trial || From 140f66a1d04719c1b7d4563715000d731b7673ab Mon Sep 17 00:00:00 2001 From: Mordred Date: Sat, 27 Jan 2018 23:55:34 +0100 Subject: [PATCH 19/45] updated submodule --- src/libraries | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries b/src/libraries index bab17595..e58b804b 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit bab17595d24c697c6abea881e7849b388c898647 +Subproject commit e58b804be5672cade4c55cd5f5ec60889d817550 From 62cfa0a2916bbd6b94ee0a1c18c2526384fe8554 Mon Sep 17 00:00:00 2001 From: Mordred Date: Sun, 28 Jan 2018 00:03:42 +0100 Subject: [PATCH 20/45] Type on comment --- src/servers/sapphire_zone/Zone/TerritoryMgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.h b/src/servers/sapphire_zone/Zone/TerritoryMgr.h index 0018212a..f0f12be1 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.h +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.h @@ -78,7 +78,7 @@ namespace Core /*! returns true if the territoryType in question is not a private zone */ bool isPrivateTerritory( uint32_t territoryTypeId ) const; - /*! returns true if the territyTyoe is a default-non instanced zone */ + /*! returns true if the territoryType is a default non-instanced zone */ bool isDefaultTerritory( uint32_t territoryTypeId ) const; /*! creates a new instance for a given territoryTypeId */ From 0e34a6b10763ab55b740316711ffe74e921804b9 Mon Sep 17 00:00:00 2001 From: Mordred Date: Sun, 28 Jan 2018 00:09:53 +0100 Subject: [PATCH 21/45] Linux build fix --- src/common/Exd/ExdDataGenerated.h | 581 +++++++++++++++--------------- 1 file changed, 290 insertions(+), 291 deletions(-) diff --git a/src/common/Exd/ExdDataGenerated.h b/src/common/Exd/ExdDataGenerated.h index 34db4a36..530caaf0 100644 --- a/src/common/Exd/ExdDataGenerated.h +++ b/src/common/Exd/ExdDataGenerated.h @@ -3026,7 +3026,6 @@ struct TerritoryType TerritoryType( uint32_t row_id, Core::Data::ExdDataGenerated* exdData ); }; - struct TextCommand { std::string command; @@ -4189,1741 +4188,1741 @@ struct WorldDCGroupType std::set< uint32_t > m_WorldDCGroupTypeIdList; -const std::set< uint32_t >& ExdDataGenerated::getAchievementIdList() +const std::set< uint32_t >& getAchievementIdList() { if( m_AchievementIdList.size() == 0 ) loadIdList( m_AchievementDat, m_AchievementIdList ); return m_AchievementIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAchievementCategoryIdList() +const std::set< uint32_t >& getAchievementCategoryIdList() { if( m_AchievementCategoryIdList.size() == 0 ) loadIdList( m_AchievementCategoryDat, m_AchievementCategoryIdList ); return m_AchievementCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAchievementKindIdList() +const std::set< uint32_t >& getAchievementKindIdList() { if( m_AchievementKindIdList.size() == 0 ) loadIdList( m_AchievementKindDat, m_AchievementKindIdList ); return m_AchievementKindIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionIdList() +const std::set< uint32_t >& getActionIdList() { if( m_ActionIdList.size() == 0 ) loadIdList( m_ActionDat, m_ActionIdList ); return m_ActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionCategoryIdList() +const std::set< uint32_t >& getActionCategoryIdList() { if( m_ActionCategoryIdList.size() == 0 ) loadIdList( m_ActionCategoryDat, m_ActionCategoryIdList ); return m_ActionCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionComboRouteIdList() +const std::set< uint32_t >& getActionComboRouteIdList() { if( m_ActionComboRouteIdList.size() == 0 ) loadIdList( m_ActionComboRouteDat, m_ActionComboRouteIdList ); return m_ActionComboRouteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionIndirectionIdList() +const std::set< uint32_t >& getActionIndirectionIdList() { if( m_ActionIndirectionIdList.size() == 0 ) loadIdList( m_ActionIndirectionDat, m_ActionIndirectionIdList ); return m_ActionIndirectionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionProcStatusIdList() +const std::set< uint32_t >& getActionProcStatusIdList() { if( m_ActionProcStatusIdList.size() == 0 ) loadIdList( m_ActionProcStatusDat, m_ActionProcStatusIdList ); return m_ActionProcStatusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionTimelineIdList() +const std::set< uint32_t >& getActionTimelineIdList() { if( m_ActionTimelineIdList.size() == 0 ) loadIdList( m_ActionTimelineDat, m_ActionTimelineIdList ); return m_ActionTimelineIdList; } -const std::set< uint32_t >& ExdDataGenerated::getActionTransientIdList() +const std::set< uint32_t >& getActionTransientIdList() { if( m_ActionTransientIdList.size() == 0 ) loadIdList( m_ActionTransientDat, m_ActionTransientIdList ); return m_ActionTransientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAddonIdList() +const std::set< uint32_t >& getAddonIdList() { if( m_AddonIdList.size() == 0 ) loadIdList( m_AddonDat, m_AddonIdList ); return m_AddonIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAdventureIdList() +const std::set< uint32_t >& getAdventureIdList() { if( m_AdventureIdList.size() == 0 ) loadIdList( m_AdventureDat, m_AdventureIdList ); return m_AdventureIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAdventureExPhaseIdList() +const std::set< uint32_t >& getAdventureExPhaseIdList() { if( m_AdventureExPhaseIdList.size() == 0 ) loadIdList( m_AdventureExPhaseDat, m_AdventureExPhaseIdList ); return m_AdventureExPhaseIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAetherCurrentIdList() +const std::set< uint32_t >& getAetherCurrentIdList() { if( m_AetherCurrentIdList.size() == 0 ) loadIdList( m_AetherCurrentDat, m_AetherCurrentIdList ); return m_AetherCurrentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAetherialWheelIdList() +const std::set< uint32_t >& getAetherialWheelIdList() { if( m_AetherialWheelIdList.size() == 0 ) loadIdList( m_AetherialWheelDat, m_AetherialWheelIdList ); return m_AetherialWheelIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAetheryteIdList() +const std::set< uint32_t >& getAetheryteIdList() { if( m_AetheryteIdList.size() == 0 ) loadIdList( m_AetheryteDat, m_AetheryteIdList ); return m_AetheryteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationLevelIdList() +const std::set< uint32_t >& getAirshipExplorationLevelIdList() { if( m_AirshipExplorationLevelIdList.size() == 0 ) loadIdList( m_AirshipExplorationLevelDat, m_AirshipExplorationLevelIdList ); return m_AirshipExplorationLevelIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationLogIdList() +const std::set< uint32_t >& getAirshipExplorationLogIdList() { if( m_AirshipExplorationLogIdList.size() == 0 ) loadIdList( m_AirshipExplorationLogDat, m_AirshipExplorationLogIdList ); return m_AirshipExplorationLogIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationParamTypeIdList() +const std::set< uint32_t >& getAirshipExplorationParamTypeIdList() { if( m_AirshipExplorationParamTypeIdList.size() == 0 ) loadIdList( m_AirshipExplorationParamTypeDat, m_AirshipExplorationParamTypeIdList ); return m_AirshipExplorationParamTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationPartIdList() +const std::set< uint32_t >& getAirshipExplorationPartIdList() { if( m_AirshipExplorationPartIdList.size() == 0 ) loadIdList( m_AirshipExplorationPartDat, m_AirshipExplorationPartIdList ); return m_AirshipExplorationPartIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAirshipExplorationPointIdList() +const std::set< uint32_t >& getAirshipExplorationPointIdList() { if( m_AirshipExplorationPointIdList.size() == 0 ) loadIdList( m_AirshipExplorationPointDat, m_AirshipExplorationPointIdList ); return m_AirshipExplorationPointIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5IdList() +const std::set< uint32_t >& getAnimaWeapon5IdList() { if( m_AnimaWeapon5IdList.size() == 0 ) loadIdList( m_AnimaWeapon5Dat, m_AnimaWeapon5IdList ); return m_AnimaWeapon5IdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5ParamIdList() +const std::set< uint32_t >& getAnimaWeapon5ParamIdList() { if( m_AnimaWeapon5ParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5ParamDat, m_AnimaWeapon5ParamIdList ); return m_AnimaWeapon5ParamIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5PatternGroupIdList() +const std::set< uint32_t >& getAnimaWeapon5PatternGroupIdList() { if( m_AnimaWeapon5PatternGroupIdList.size() == 0 ) loadIdList( m_AnimaWeapon5PatternGroupDat, m_AnimaWeapon5PatternGroupIdList ); return m_AnimaWeapon5PatternGroupIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5SpiritTalkIdList() +const std::set< uint32_t >& getAnimaWeapon5SpiritTalkIdList() { if( m_AnimaWeapon5SpiritTalkIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkDat, m_AnimaWeapon5SpiritTalkIdList ); return m_AnimaWeapon5SpiritTalkIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5SpiritTalkParamIdList() +const std::set< uint32_t >& getAnimaWeapon5SpiritTalkParamIdList() { if( m_AnimaWeapon5SpiritTalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeapon5SpiritTalkParamDat, m_AnimaWeapon5SpiritTalkParamIdList ); return m_AnimaWeapon5SpiritTalkParamIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeapon5TradeItemIdList() +const std::set< uint32_t >& getAnimaWeapon5TradeItemIdList() { if( m_AnimaWeapon5TradeItemIdList.size() == 0 ) loadIdList( m_AnimaWeapon5TradeItemDat, m_AnimaWeapon5TradeItemIdList ); return m_AnimaWeapon5TradeItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponFUITalkIdList() +const std::set< uint32_t >& getAnimaWeaponFUITalkIdList() { if( m_AnimaWeaponFUITalkIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkDat, m_AnimaWeaponFUITalkIdList ); return m_AnimaWeaponFUITalkIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponFUITalkParamIdList() +const std::set< uint32_t >& getAnimaWeaponFUITalkParamIdList() { if( m_AnimaWeaponFUITalkParamIdList.size() == 0 ) loadIdList( m_AnimaWeaponFUITalkParamDat, m_AnimaWeaponFUITalkParamIdList ); return m_AnimaWeaponFUITalkParamIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponIconIdList() +const std::set< uint32_t >& getAnimaWeaponIconIdList() { if( m_AnimaWeaponIconIdList.size() == 0 ) loadIdList( m_AnimaWeaponIconDat, m_AnimaWeaponIconIdList ); return m_AnimaWeaponIconIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAnimaWeaponItemIdList() +const std::set< uint32_t >& getAnimaWeaponItemIdList() { if( m_AnimaWeaponItemIdList.size() == 0 ) loadIdList( m_AnimaWeaponItemDat, m_AnimaWeaponItemIdList ); return m_AnimaWeaponItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAquariumFishIdList() +const std::set< uint32_t >& getAquariumFishIdList() { if( m_AquariumFishIdList.size() == 0 ) loadIdList( m_AquariumFishDat, m_AquariumFishIdList ); return m_AquariumFishIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAquariumWaterIdList() +const std::set< uint32_t >& getAquariumWaterIdList() { if( m_AquariumWaterIdList.size() == 0 ) loadIdList( m_AquariumWaterDat, m_AquariumWaterIdList ); return m_AquariumWaterIdList; } -const std::set< uint32_t >& ExdDataGenerated::getAttackTypeIdList() +const std::set< uint32_t >& getAttackTypeIdList() { if( m_AttackTypeIdList.size() == 0 ) loadIdList( m_AttackTypeDat, m_AttackTypeIdList ); return m_AttackTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBalloonIdList() +const std::set< uint32_t >& getBalloonIdList() { if( m_BalloonIdList.size() == 0 ) loadIdList( m_BalloonDat, m_BalloonIdList ); return m_BalloonIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBaseParamIdList() +const std::set< uint32_t >& getBaseParamIdList() { if( m_BaseParamIdList.size() == 0 ) loadIdList( m_BaseParamDat, m_BaseParamIdList ); return m_BaseParamIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBattleLeveIdList() +const std::set< uint32_t >& getBattleLeveIdList() { if( m_BattleLeveIdList.size() == 0 ) loadIdList( m_BattleLeveDat, m_BattleLeveIdList ); return m_BattleLeveIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBeastRankBonusIdList() +const std::set< uint32_t >& getBeastRankBonusIdList() { if( m_BeastRankBonusIdList.size() == 0 ) loadIdList( m_BeastRankBonusDat, m_BeastRankBonusIdList ); return m_BeastRankBonusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBeastReputationRankIdList() +const std::set< uint32_t >& getBeastReputationRankIdList() { if( m_BeastReputationRankIdList.size() == 0 ) loadIdList( m_BeastReputationRankDat, m_BeastReputationRankIdList ); return m_BeastReputationRankIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBeastTribeIdList() +const std::set< uint32_t >& getBeastTribeIdList() { if( m_BeastTribeIdList.size() == 0 ) loadIdList( m_BeastTribeDat, m_BeastTribeIdList ); return m_BeastTribeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBehaviorIdList() +const std::set< uint32_t >& getBehaviorIdList() { if( m_BehaviorIdList.size() == 0 ) loadIdList( m_BehaviorDat, m_BehaviorIdList ); return m_BehaviorIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBGMIdList() +const std::set< uint32_t >& getBGMIdList() { if( m_BGMIdList.size() == 0 ) loadIdList( m_BGMDat, m_BGMIdList ); return m_BGMIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBNpcAnnounceIconIdList() +const std::set< uint32_t >& getBNpcAnnounceIconIdList() { if( m_BNpcAnnounceIconIdList.size() == 0 ) loadIdList( m_BNpcAnnounceIconDat, m_BNpcAnnounceIconIdList ); return m_BNpcAnnounceIconIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBNpcBaseIdList() +const std::set< uint32_t >& getBNpcBaseIdList() { if( m_BNpcBaseIdList.size() == 0 ) loadIdList( m_BNpcBaseDat, m_BNpcBaseIdList ); return m_BNpcBaseIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBNpcCustomizeIdList() +const std::set< uint32_t >& getBNpcCustomizeIdList() { if( m_BNpcCustomizeIdList.size() == 0 ) loadIdList( m_BNpcCustomizeDat, m_BNpcCustomizeIdList ); return m_BNpcCustomizeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBNpcNameIdList() +const std::set< uint32_t >& getBNpcNameIdList() { if( m_BNpcNameIdList.size() == 0 ) loadIdList( m_BNpcNameDat, m_BNpcNameIdList ); return m_BNpcNameIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBuddyActionIdList() +const std::set< uint32_t >& getBuddyActionIdList() { if( m_BuddyActionIdList.size() == 0 ) loadIdList( m_BuddyActionDat, m_BuddyActionIdList ); return m_BuddyActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBuddyEquipIdList() +const std::set< uint32_t >& getBuddyEquipIdList() { if( m_BuddyEquipIdList.size() == 0 ) loadIdList( m_BuddyEquipDat, m_BuddyEquipIdList ); return m_BuddyEquipIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBuddyItemIdList() +const std::set< uint32_t >& getBuddyItemIdList() { if( m_BuddyItemIdList.size() == 0 ) loadIdList( m_BuddyItemDat, m_BuddyItemIdList ); return m_BuddyItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBuddyRankIdList() +const std::set< uint32_t >& getBuddyRankIdList() { if( m_BuddyRankIdList.size() == 0 ) loadIdList( m_BuddyRankDat, m_BuddyRankIdList ); return m_BuddyRankIdList; } -const std::set< uint32_t >& ExdDataGenerated::getBuddySkillIdList() +const std::set< uint32_t >& getBuddySkillIdList() { if( m_BuddySkillIdList.size() == 0 ) loadIdList( m_BuddySkillDat, m_BuddySkillIdList ); return m_BuddySkillIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCabinetIdList() +const std::set< uint32_t >& getCabinetIdList() { if( m_CabinetIdList.size() == 0 ) loadIdList( m_CabinetDat, m_CabinetIdList ); return m_CabinetIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCabinetCategoryIdList() +const std::set< uint32_t >& getCabinetCategoryIdList() { if( m_CabinetCategoryIdList.size() == 0 ) loadIdList( m_CabinetCategoryDat, m_CabinetCategoryIdList ); return m_CabinetCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCalendarIdList() +const std::set< uint32_t >& getCalendarIdList() { if( m_CalendarIdList.size() == 0 ) loadIdList( m_CalendarDat, m_CalendarIdList ); return m_CalendarIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChainBonusIdList() +const std::set< uint32_t >& getChainBonusIdList() { if( m_ChainBonusIdList.size() == 0 ) loadIdList( m_ChainBonusDat, m_ChainBonusIdList ); return m_ChainBonusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCharaMakeCustomizeIdList() +const std::set< uint32_t >& getCharaMakeCustomizeIdList() { if( m_CharaMakeCustomizeIdList.size() == 0 ) loadIdList( m_CharaMakeCustomizeDat, m_CharaMakeCustomizeIdList ); return m_CharaMakeCustomizeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCharaMakeTypeIdList() +const std::set< uint32_t >& getCharaMakeTypeIdList() { if( m_CharaMakeTypeIdList.size() == 0 ) loadIdList( m_CharaMakeTypeDat, m_CharaMakeTypeIdList ); return m_CharaMakeTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceIdList() +const std::set< uint32_t >& getChocoboRaceIdList() { if( m_ChocoboRaceIdList.size() == 0 ) loadIdList( m_ChocoboRaceDat, m_ChocoboRaceIdList ); return m_ChocoboRaceIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceAbilityIdList() +const std::set< uint32_t >& getChocoboRaceAbilityIdList() { if( m_ChocoboRaceAbilityIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityDat, m_ChocoboRaceAbilityIdList ); return m_ChocoboRaceAbilityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceAbilityTypeIdList() +const std::set< uint32_t >& getChocoboRaceAbilityTypeIdList() { if( m_ChocoboRaceAbilityTypeIdList.size() == 0 ) loadIdList( m_ChocoboRaceAbilityTypeDat, m_ChocoboRaceAbilityTypeIdList ); return m_ChocoboRaceAbilityTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceItemIdList() +const std::set< uint32_t >& getChocoboRaceItemIdList() { if( m_ChocoboRaceItemIdList.size() == 0 ) loadIdList( m_ChocoboRaceItemDat, m_ChocoboRaceItemIdList ); return m_ChocoboRaceItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceRankIdList() +const std::set< uint32_t >& getChocoboRaceRankIdList() { if( m_ChocoboRaceRankIdList.size() == 0 ) loadIdList( m_ChocoboRaceRankDat, m_ChocoboRaceRankIdList ); return m_ChocoboRaceRankIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceStatusIdList() +const std::set< uint32_t >& getChocoboRaceStatusIdList() { if( m_ChocoboRaceStatusIdList.size() == 0 ) loadIdList( m_ChocoboRaceStatusDat, m_ChocoboRaceStatusIdList ); return m_ChocoboRaceStatusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboRaceTerritoryIdList() +const std::set< uint32_t >& getChocoboRaceTerritoryIdList() { if( m_ChocoboRaceTerritoryIdList.size() == 0 ) loadIdList( m_ChocoboRaceTerritoryDat, m_ChocoboRaceTerritoryIdList ); return m_ChocoboRaceTerritoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getChocoboTaxiStandIdList() +const std::set< uint32_t >& getChocoboTaxiStandIdList() { if( m_ChocoboTaxiStandIdList.size() == 0 ) loadIdList( m_ChocoboTaxiStandDat, m_ChocoboTaxiStandIdList ); return m_ChocoboTaxiStandIdList; } -const std::set< uint32_t >& ExdDataGenerated::getClassJobIdList() +const std::set< uint32_t >& getClassJobIdList() { if( m_ClassJobIdList.size() == 0 ) loadIdList( m_ClassJobDat, m_ClassJobIdList ); return m_ClassJobIdList; } -const std::set< uint32_t >& ExdDataGenerated::getClassJobCategoryIdList() +const std::set< uint32_t >& getClassJobCategoryIdList() { if( m_ClassJobCategoryIdList.size() == 0 ) loadIdList( m_ClassJobCategoryDat, m_ClassJobCategoryIdList ); return m_ClassJobCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanionIdList() +const std::set< uint32_t >& getCompanionIdList() { if( m_CompanionIdList.size() == 0 ) loadIdList( m_CompanionDat, m_CompanionIdList ); return m_CompanionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanionMoveIdList() +const std::set< uint32_t >& getCompanionMoveIdList() { if( m_CompanionMoveIdList.size() == 0 ) loadIdList( m_CompanionMoveDat, m_CompanionMoveIdList ); return m_CompanionMoveIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanionTransientIdList() +const std::set< uint32_t >& getCompanionTransientIdList() { if( m_CompanionTransientIdList.size() == 0 ) loadIdList( m_CompanionTransientDat, m_CompanionTransientIdList ); return m_CompanionTransientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyActionIdList() +const std::set< uint32_t >& getCompanyActionIdList() { if( m_CompanyActionIdList.size() == 0 ) loadIdList( m_CompanyActionDat, m_CompanyActionIdList ); return m_CompanyActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftDraftIdList() +const std::set< uint32_t >& getCompanyCraftDraftIdList() { if( m_CompanyCraftDraftIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftDat, m_CompanyCraftDraftIdList ); return m_CompanyCraftDraftIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftDraftCategoryIdList() +const std::set< uint32_t >& getCompanyCraftDraftCategoryIdList() { if( m_CompanyCraftDraftCategoryIdList.size() == 0 ) loadIdList( m_CompanyCraftDraftCategoryDat, m_CompanyCraftDraftCategoryIdList ); return m_CompanyCraftDraftCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftManufactoryStateIdList() +const std::set< uint32_t >& getCompanyCraftManufactoryStateIdList() { if( m_CompanyCraftManufactoryStateIdList.size() == 0 ) loadIdList( m_CompanyCraftManufactoryStateDat, m_CompanyCraftManufactoryStateIdList ); return m_CompanyCraftManufactoryStateIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftPartIdList() +const std::set< uint32_t >& getCompanyCraftPartIdList() { if( m_CompanyCraftPartIdList.size() == 0 ) loadIdList( m_CompanyCraftPartDat, m_CompanyCraftPartIdList ); return m_CompanyCraftPartIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftProcessIdList() +const std::set< uint32_t >& getCompanyCraftProcessIdList() { if( m_CompanyCraftProcessIdList.size() == 0 ) loadIdList( m_CompanyCraftProcessDat, m_CompanyCraftProcessIdList ); return m_CompanyCraftProcessIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftSequenceIdList() +const std::set< uint32_t >& getCompanyCraftSequenceIdList() { if( m_CompanyCraftSequenceIdList.size() == 0 ) loadIdList( m_CompanyCraftSequenceDat, m_CompanyCraftSequenceIdList ); return m_CompanyCraftSequenceIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftSupplyItemIdList() +const std::set< uint32_t >& getCompanyCraftSupplyItemIdList() { if( m_CompanyCraftSupplyItemIdList.size() == 0 ) loadIdList( m_CompanyCraftSupplyItemDat, m_CompanyCraftSupplyItemIdList ); return m_CompanyCraftSupplyItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompanyCraftTypeIdList() +const std::set< uint32_t >& getCompanyCraftTypeIdList() { if( m_CompanyCraftTypeIdList.size() == 0 ) loadIdList( m_CompanyCraftTypeDat, m_CompanyCraftTypeIdList ); return m_CompanyCraftTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompleteJournalIdList() +const std::set< uint32_t >& getCompleteJournalIdList() { if( m_CompleteJournalIdList.size() == 0 ) loadIdList( m_CompleteJournalDat, m_CompleteJournalIdList ); return m_CompleteJournalIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCompleteJournalCategoryIdList() +const std::set< uint32_t >& getCompleteJournalCategoryIdList() { if( m_CompleteJournalCategoryIdList.size() == 0 ) loadIdList( m_CompleteJournalCategoryDat, m_CompleteJournalCategoryIdList ); return m_CompleteJournalCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentExActionIdList() +const std::set< uint32_t >& getContentExActionIdList() { if( m_ContentExActionIdList.size() == 0 ) loadIdList( m_ContentExActionDat, m_ContentExActionIdList ); return m_ContentExActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentFinderConditionIdList() +const std::set< uint32_t >& getContentFinderConditionIdList() { if( m_ContentFinderConditionIdList.size() == 0 ) loadIdList( m_ContentFinderConditionDat, m_ContentFinderConditionIdList ); return m_ContentFinderConditionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentFinderConditionTransientIdList() +const std::set< uint32_t >& getContentFinderConditionTransientIdList() { if( m_ContentFinderConditionTransientIdList.size() == 0 ) loadIdList( m_ContentFinderConditionTransientDat, m_ContentFinderConditionTransientIdList ); return m_ContentFinderConditionTransientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentMemberTypeIdList() +const std::set< uint32_t >& getContentMemberTypeIdList() { if( m_ContentMemberTypeIdList.size() == 0 ) loadIdList( m_ContentMemberTypeDat, m_ContentMemberTypeIdList ); return m_ContentMemberTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentRouletteIdList() +const std::set< uint32_t >& getContentRouletteIdList() { if( m_ContentRouletteIdList.size() == 0 ) loadIdList( m_ContentRouletteDat, m_ContentRouletteIdList ); return m_ContentRouletteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getContentTypeIdList() +const std::set< uint32_t >& getContentTypeIdList() { if( m_ContentTypeIdList.size() == 0 ) loadIdList( m_ContentTypeDat, m_ContentTypeIdList ); return m_ContentTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCraftActionIdList() +const std::set< uint32_t >& getCraftActionIdList() { if( m_CraftActionIdList.size() == 0 ) loadIdList( m_CraftActionDat, m_CraftActionIdList ); return m_CraftActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCraftLeveIdList() +const std::set< uint32_t >& getCraftLeveIdList() { if( m_CraftLeveIdList.size() == 0 ) loadIdList( m_CraftLeveDat, m_CraftLeveIdList ); return m_CraftLeveIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCraftTypeIdList() +const std::set< uint32_t >& getCraftTypeIdList() { if( m_CraftTypeIdList.size() == 0 ) loadIdList( m_CraftTypeDat, m_CraftTypeIdList ); return m_CraftTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCurrencyIdList() +const std::set< uint32_t >& getCurrencyIdList() { if( m_CurrencyIdList.size() == 0 ) loadIdList( m_CurrencyDat, m_CurrencyIdList ); return m_CurrencyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCustomTalkIdList() +const std::set< uint32_t >& getCustomTalkIdList() { if( m_CustomTalkIdList.size() == 0 ) loadIdList( m_CustomTalkDat, m_CustomTalkIdList ); return m_CustomTalkIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCutsceneIdList() +const std::set< uint32_t >& getCutsceneIdList() { if( m_CutsceneIdList.size() == 0 ) loadIdList( m_CutsceneDat, m_CutsceneIdList ); return m_CutsceneIdList; } -const std::set< uint32_t >& ExdDataGenerated::getCutScreenImageIdList() +const std::set< uint32_t >& getCutScreenImageIdList() { if( m_CutScreenImageIdList.size() == 0 ) loadIdList( m_CutScreenImageDat, m_CutScreenImageIdList ); return m_CutScreenImageIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDailySupplyItemIdList() +const std::set< uint32_t >& getDailySupplyItemIdList() { if( m_DailySupplyItemIdList.size() == 0 ) loadIdList( m_DailySupplyItemDat, m_DailySupplyItemIdList ); return m_DailySupplyItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonBanIdList() +const std::set< uint32_t >& getDeepDungeonBanIdList() { if( m_DeepDungeonBanIdList.size() == 0 ) loadIdList( m_DeepDungeonBanDat, m_DeepDungeonBanIdList ); return m_DeepDungeonBanIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonDangerIdList() +const std::set< uint32_t >& getDeepDungeonDangerIdList() { if( m_DeepDungeonDangerIdList.size() == 0 ) loadIdList( m_DeepDungeonDangerDat, m_DeepDungeonDangerIdList ); return m_DeepDungeonDangerIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonEquipmentIdList() +const std::set< uint32_t >& getDeepDungeonEquipmentIdList() { if( m_DeepDungeonEquipmentIdList.size() == 0 ) loadIdList( m_DeepDungeonEquipmentDat, m_DeepDungeonEquipmentIdList ); return m_DeepDungeonEquipmentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonFloorEffectUIIdList() +const std::set< uint32_t >& getDeepDungeonFloorEffectUIIdList() { if( m_DeepDungeonFloorEffectUIIdList.size() == 0 ) loadIdList( m_DeepDungeonFloorEffectUIDat, m_DeepDungeonFloorEffectUIIdList ); return m_DeepDungeonFloorEffectUIIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonItemIdList() +const std::set< uint32_t >& getDeepDungeonItemIdList() { if( m_DeepDungeonItemIdList.size() == 0 ) loadIdList( m_DeepDungeonItemDat, m_DeepDungeonItemIdList ); return m_DeepDungeonItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeepDungeonStatusIdList() +const std::set< uint32_t >& getDeepDungeonStatusIdList() { if( m_DeepDungeonStatusIdList.size() == 0 ) loadIdList( m_DeepDungeonStatusDat, m_DeepDungeonStatusIdList ); return m_DeepDungeonStatusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDefaultTalkIdList() +const std::set< uint32_t >& getDefaultTalkIdList() { if( m_DefaultTalkIdList.size() == 0 ) loadIdList( m_DefaultTalkDat, m_DefaultTalkIdList ); return m_DefaultTalkIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDeliveryQuestIdList() +const std::set< uint32_t >& getDeliveryQuestIdList() { if( m_DeliveryQuestIdList.size() == 0 ) loadIdList( m_DeliveryQuestDat, m_DeliveryQuestIdList ); return m_DeliveryQuestIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDisposalShopIdList() +const std::set< uint32_t >& getDisposalShopIdList() { if( m_DisposalShopIdList.size() == 0 ) loadIdList( m_DisposalShopDat, m_DisposalShopIdList ); return m_DisposalShopIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDisposalShopFilterTypeIdList() +const std::set< uint32_t >& getDisposalShopFilterTypeIdList() { if( m_DisposalShopFilterTypeIdList.size() == 0 ) loadIdList( m_DisposalShopFilterTypeDat, m_DisposalShopFilterTypeIdList ); return m_DisposalShopFilterTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDisposalShopItemIdList() +const std::set< uint32_t >& getDisposalShopItemIdList() { if( m_DisposalShopItemIdList.size() == 0 ) loadIdList( m_DisposalShopItemDat, m_DisposalShopItemIdList ); return m_DisposalShopItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeIdList() +const std::set< uint32_t >& getDpsChallengeIdList() { if( m_DpsChallengeIdList.size() == 0 ) loadIdList( m_DpsChallengeDat, m_DpsChallengeIdList ); return m_DpsChallengeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeOfficerIdList() +const std::set< uint32_t >& getDpsChallengeOfficerIdList() { if( m_DpsChallengeOfficerIdList.size() == 0 ) loadIdList( m_DpsChallengeOfficerDat, m_DpsChallengeOfficerIdList ); return m_DpsChallengeOfficerIdList; } -const std::set< uint32_t >& ExdDataGenerated::getDpsChallengeTransientIdList() +const std::set< uint32_t >& getDpsChallengeTransientIdList() { if( m_DpsChallengeTransientIdList.size() == 0 ) loadIdList( m_DpsChallengeTransientDat, m_DpsChallengeTransientIdList ); return m_DpsChallengeTransientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEmoteIdList() +const std::set< uint32_t >& getEmoteIdList() { if( m_EmoteIdList.size() == 0 ) loadIdList( m_EmoteDat, m_EmoteIdList ); return m_EmoteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEmoteCategoryIdList() +const std::set< uint32_t >& getEmoteCategoryIdList() { if( m_EmoteCategoryIdList.size() == 0 ) loadIdList( m_EmoteCategoryDat, m_EmoteCategoryIdList ); return m_EmoteCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getENpcBaseIdList() +const std::set< uint32_t >& getENpcBaseIdList() { if( m_ENpcBaseIdList.size() == 0 ) loadIdList( m_ENpcBaseDat, m_ENpcBaseIdList ); return m_ENpcBaseIdList; } -const std::set< uint32_t >& ExdDataGenerated::getENpcResidentIdList() +const std::set< uint32_t >& getENpcResidentIdList() { if( m_ENpcResidentIdList.size() == 0 ) loadIdList( m_ENpcResidentDat, m_ENpcResidentIdList ); return m_ENpcResidentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEObjIdList() +const std::set< uint32_t >& getEObjIdList() { if( m_EObjIdList.size() == 0 ) loadIdList( m_EObjDat, m_EObjIdList ); return m_EObjIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEquipRaceCategoryIdList() +const std::set< uint32_t >& getEquipRaceCategoryIdList() { if( m_EquipRaceCategoryIdList.size() == 0 ) loadIdList( m_EquipRaceCategoryDat, m_EquipRaceCategoryIdList ); return m_EquipRaceCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEquipSlotCategoryIdList() +const std::set< uint32_t >& getEquipSlotCategoryIdList() { if( m_EquipSlotCategoryIdList.size() == 0 ) loadIdList( m_EquipSlotCategoryDat, m_EquipSlotCategoryIdList ); return m_EquipSlotCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEventActionIdList() +const std::set< uint32_t >& getEventActionIdList() { if( m_EventActionIdList.size() == 0 ) loadIdList( m_EventActionDat, m_EventActionIdList ); return m_EventActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEventIconPriorityIdList() +const std::set< uint32_t >& getEventIconPriorityIdList() { if( m_EventIconPriorityIdList.size() == 0 ) loadIdList( m_EventIconPriorityDat, m_EventIconPriorityIdList ); return m_EventIconPriorityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEventIconTypeIdList() +const std::set< uint32_t >& getEventIconTypeIdList() { if( m_EventIconTypeIdList.size() == 0 ) loadIdList( m_EventIconTypeDat, m_EventIconTypeIdList ); return m_EventIconTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEventItemIdList() +const std::set< uint32_t >& getEventItemIdList() { if( m_EventItemIdList.size() == 0 ) loadIdList( m_EventItemDat, m_EventItemIdList ); return m_EventItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getEventItemHelpIdList() +const std::set< uint32_t >& getEventItemHelpIdList() { if( m_EventItemHelpIdList.size() == 0 ) loadIdList( m_EventItemHelpDat, m_EventItemHelpIdList ); return m_EventItemHelpIdList; } -const std::set< uint32_t >& ExdDataGenerated::getExVersionIdList() +const std::set< uint32_t >& getExVersionIdList() { if( m_ExVersionIdList.size() == 0 ) loadIdList( m_ExVersionDat, m_ExVersionIdList ); return m_ExVersionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFateIdList() +const std::set< uint32_t >& getFateIdList() { if( m_FateIdList.size() == 0 ) loadIdList( m_FateDat, m_FateIdList ); return m_FateIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCActivityIdList() +const std::set< uint32_t >& getFCActivityIdList() { if( m_FCActivityIdList.size() == 0 ) loadIdList( m_FCActivityDat, m_FCActivityIdList ); return m_FCActivityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCAuthorityIdList() +const std::set< uint32_t >& getFCAuthorityIdList() { if( m_FCAuthorityIdList.size() == 0 ) loadIdList( m_FCAuthorityDat, m_FCAuthorityIdList ); return m_FCAuthorityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCAuthorityCategoryIdList() +const std::set< uint32_t >& getFCAuthorityCategoryIdList() { if( m_FCAuthorityCategoryIdList.size() == 0 ) loadIdList( m_FCAuthorityCategoryDat, m_FCAuthorityCategoryIdList ); return m_FCAuthorityCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCChestNameIdList() +const std::set< uint32_t >& getFCChestNameIdList() { if( m_FCChestNameIdList.size() == 0 ) loadIdList( m_FCChestNameDat, m_FCChestNameIdList ); return m_FCChestNameIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFccShopIdList() +const std::set< uint32_t >& getFccShopIdList() { if( m_FccShopIdList.size() == 0 ) loadIdList( m_FccShopDat, m_FccShopIdList ); return m_FccShopIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCHierarchyIdList() +const std::set< uint32_t >& getFCHierarchyIdList() { if( m_FCHierarchyIdList.size() == 0 ) loadIdList( m_FCHierarchyDat, m_FCHierarchyIdList ); return m_FCHierarchyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCReputationIdList() +const std::set< uint32_t >& getFCReputationIdList() { if( m_FCReputationIdList.size() == 0 ) loadIdList( m_FCReputationDat, m_FCReputationIdList ); return m_FCReputationIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFCRightsIdList() +const std::set< uint32_t >& getFCRightsIdList() { if( m_FCRightsIdList.size() == 0 ) loadIdList( m_FCRightsDat, m_FCRightsIdList ); return m_FCRightsIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFishingSpotIdList() +const std::set< uint32_t >& getFishingSpotIdList() { if( m_FishingSpotIdList.size() == 0 ) loadIdList( m_FishingSpotDat, m_FishingSpotIdList ); return m_FishingSpotIdList; } -const std::set< uint32_t >& ExdDataGenerated::getFishParameterIdList() +const std::set< uint32_t >& getFishParameterIdList() { if( m_FishParameterIdList.size() == 0 ) loadIdList( m_FishParameterDat, m_FishParameterIdList ); return m_FishParameterIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGardeningSeedIdList() +const std::set< uint32_t >& getGardeningSeedIdList() { if( m_GardeningSeedIdList.size() == 0 ) loadIdList( m_GardeningSeedDat, m_GardeningSeedIdList ); return m_GardeningSeedIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringConditionIdList() +const std::set< uint32_t >& getGatheringConditionIdList() { if( m_GatheringConditionIdList.size() == 0 ) loadIdList( m_GatheringConditionDat, m_GatheringConditionIdList ); return m_GatheringConditionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringExpIdList() +const std::set< uint32_t >& getGatheringExpIdList() { if( m_GatheringExpIdList.size() == 0 ) loadIdList( m_GatheringExpDat, m_GatheringExpIdList ); return m_GatheringExpIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringItemIdList() +const std::set< uint32_t >& getGatheringItemIdList() { if( m_GatheringItemIdList.size() == 0 ) loadIdList( m_GatheringItemDat, m_GatheringItemIdList ); return m_GatheringItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringItemLevelConvertTableIdList() +const std::set< uint32_t >& getGatheringItemLevelConvertTableIdList() { if( m_GatheringItemLevelConvertTableIdList.size() == 0 ) loadIdList( m_GatheringItemLevelConvertTableDat, m_GatheringItemLevelConvertTableIdList ); return m_GatheringItemLevelConvertTableIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringItemPointIdList() +const std::set< uint32_t >& getGatheringItemPointIdList() { if( m_GatheringItemPointIdList.size() == 0 ) loadIdList( m_GatheringItemPointDat, m_GatheringItemPointIdList ); return m_GatheringItemPointIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringNotebookListIdList() +const std::set< uint32_t >& getGatheringNotebookListIdList() { if( m_GatheringNotebookListIdList.size() == 0 ) loadIdList( m_GatheringNotebookListDat, m_GatheringNotebookListIdList ); return m_GatheringNotebookListIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringPointIdList() +const std::set< uint32_t >& getGatheringPointIdList() { if( m_GatheringPointIdList.size() == 0 ) loadIdList( m_GatheringPointDat, m_GatheringPointIdList ); return m_GatheringPointIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBaseIdList() +const std::set< uint32_t >& getGatheringPointBaseIdList() { if( m_GatheringPointBaseIdList.size() == 0 ) loadIdList( m_GatheringPointBaseDat, m_GatheringPointBaseIdList ); return m_GatheringPointBaseIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBonusIdList() +const std::set< uint32_t >& getGatheringPointBonusIdList() { if( m_GatheringPointBonusIdList.size() == 0 ) loadIdList( m_GatheringPointBonusDat, m_GatheringPointBonusIdList ); return m_GatheringPointBonusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringPointBonusTypeIdList() +const std::set< uint32_t >& getGatheringPointBonusTypeIdList() { if( m_GatheringPointBonusTypeIdList.size() == 0 ) loadIdList( m_GatheringPointBonusTypeDat, m_GatheringPointBonusTypeIdList ); return m_GatheringPointBonusTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringPointNameIdList() +const std::set< uint32_t >& getGatheringPointNameIdList() { if( m_GatheringPointNameIdList.size() == 0 ) loadIdList( m_GatheringPointNameDat, m_GatheringPointNameIdList ); return m_GatheringPointNameIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringSubCategoryIdList() +const std::set< uint32_t >& getGatheringSubCategoryIdList() { if( m_GatheringSubCategoryIdList.size() == 0 ) loadIdList( m_GatheringSubCategoryDat, m_GatheringSubCategoryIdList ); return m_GatheringSubCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGatheringTypeIdList() +const std::set< uint32_t >& getGatheringTypeIdList() { if( m_GatheringTypeIdList.size() == 0 ) loadIdList( m_GatheringTypeDat, m_GatheringTypeIdList ); return m_GatheringTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionIdList() +const std::set< uint32_t >& getGcArmyExpeditionIdList() { if( m_GcArmyExpeditionIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionDat, m_GcArmyExpeditionIdList ); return m_GcArmyExpeditionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionMemberBonusIdList() +const std::set< uint32_t >& getGcArmyExpeditionMemberBonusIdList() { if( m_GcArmyExpeditionMemberBonusIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionMemberBonusDat, m_GcArmyExpeditionMemberBonusIdList ); return m_GcArmyExpeditionMemberBonusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGcArmyExpeditionTypeIdList() +const std::set< uint32_t >& getGcArmyExpeditionTypeIdList() { if( m_GcArmyExpeditionTypeIdList.size() == 0 ) loadIdList( m_GcArmyExpeditionTypeDat, m_GcArmyExpeditionTypeIdList ); return m_GcArmyExpeditionTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGcArmyMemberGrowIdList() +const std::set< uint32_t >& getGcArmyMemberGrowIdList() { if( m_GcArmyMemberGrowIdList.size() == 0 ) loadIdList( m_GcArmyMemberGrowDat, m_GcArmyMemberGrowIdList ); return m_GcArmyMemberGrowIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGcArmyTrainingIdList() +const std::set< uint32_t >& getGcArmyTrainingIdList() { if( m_GcArmyTrainingIdList.size() == 0 ) loadIdList( m_GcArmyTrainingDat, m_GcArmyTrainingIdList ); return m_GcArmyTrainingIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCScripShopCategoryIdList() +const std::set< uint32_t >& getGCScripShopCategoryIdList() { if( m_GCScripShopCategoryIdList.size() == 0 ) loadIdList( m_GCScripShopCategoryDat, m_GCScripShopCategoryIdList ); return m_GCScripShopCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCScripShopItemIdList() +const std::set< uint32_t >& getGCScripShopItemIdList() { if( m_GCScripShopItemIdList.size() == 0 ) loadIdList( m_GCScripShopItemDat, m_GCScripShopItemIdList ); return m_GCScripShopItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCShopIdList() +const std::set< uint32_t >& getGCShopIdList() { if( m_GCShopIdList.size() == 0 ) loadIdList( m_GCShopDat, m_GCShopIdList ); return m_GCShopIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCShopItemCategoryIdList() +const std::set< uint32_t >& getGCShopItemCategoryIdList() { if( m_GCShopItemCategoryIdList.size() == 0 ) loadIdList( m_GCShopItemCategoryDat, m_GCShopItemCategoryIdList ); return m_GCShopItemCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCSupplyDutyIdList() +const std::set< uint32_t >& getGCSupplyDutyIdList() { if( m_GCSupplyDutyIdList.size() == 0 ) loadIdList( m_GCSupplyDutyDat, m_GCSupplyDutyIdList ); return m_GCSupplyDutyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGCSupplyDutyRewardIdList() +const std::set< uint32_t >& getGCSupplyDutyRewardIdList() { if( m_GCSupplyDutyRewardIdList.size() == 0 ) loadIdList( m_GCSupplyDutyRewardDat, m_GCSupplyDutyRewardIdList ); return m_GCSupplyDutyRewardIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGeneralActionIdList() +const std::set< uint32_t >& getGeneralActionIdList() { if( m_GeneralActionIdList.size() == 0 ) loadIdList( m_GeneralActionDat, m_GeneralActionIdList ); return m_GeneralActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGilShopIdList() +const std::set< uint32_t >& getGilShopIdList() { if( m_GilShopIdList.size() == 0 ) loadIdList( m_GilShopDat, m_GilShopIdList ); return m_GilShopIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGilShopItemIdList() +const std::set< uint32_t >& getGilShopItemIdList() { if( m_GilShopItemIdList.size() == 0 ) loadIdList( m_GilShopItemDat, m_GilShopItemIdList ); return m_GilShopItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGoldSaucerTextDataIdList() +const std::set< uint32_t >& getGoldSaucerTextDataIdList() { if( m_GoldSaucerTextDataIdList.size() == 0 ) loadIdList( m_GoldSaucerTextDataDat, m_GoldSaucerTextDataIdList ); return m_GoldSaucerTextDataIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGrandCompanyIdList() +const std::set< uint32_t >& getGrandCompanyIdList() { if( m_GrandCompanyIdList.size() == 0 ) loadIdList( m_GrandCompanyDat, m_GrandCompanyIdList ); return m_GrandCompanyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGrandCompanyRankIdList() +const std::set< uint32_t >& getGrandCompanyRankIdList() { if( m_GrandCompanyRankIdList.size() == 0 ) loadIdList( m_GrandCompanyRankDat, m_GrandCompanyRankIdList ); return m_GrandCompanyRankIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGuardianDeityIdList() +const std::set< uint32_t >& getGuardianDeityIdList() { if( m_GuardianDeityIdList.size() == 0 ) loadIdList( m_GuardianDeityDat, m_GuardianDeityIdList ); return m_GuardianDeityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGuildleveAssignmentIdList() +const std::set< uint32_t >& getGuildleveAssignmentIdList() { if( m_GuildleveAssignmentIdList.size() == 0 ) loadIdList( m_GuildleveAssignmentDat, m_GuildleveAssignmentIdList ); return m_GuildleveAssignmentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGuildOrderGuideIdList() +const std::set< uint32_t >& getGuildOrderGuideIdList() { if( m_GuildOrderGuideIdList.size() == 0 ) loadIdList( m_GuildOrderGuideDat, m_GuildOrderGuideIdList ); return m_GuildOrderGuideIdList; } -const std::set< uint32_t >& ExdDataGenerated::getGuildOrderOfficerIdList() +const std::set< uint32_t >& getGuildOrderOfficerIdList() { if( m_GuildOrderOfficerIdList.size() == 0 ) loadIdList( m_GuildOrderOfficerDat, m_GuildOrderOfficerIdList ); return m_GuildOrderOfficerIdList; } -const std::set< uint32_t >& ExdDataGenerated::getHouseRetainerPoseIdList() +const std::set< uint32_t >& getHouseRetainerPoseIdList() { if( m_HouseRetainerPoseIdList.size() == 0 ) loadIdList( m_HouseRetainerPoseDat, m_HouseRetainerPoseIdList ); return m_HouseRetainerPoseIdList; } -const std::set< uint32_t >& ExdDataGenerated::getHousingFurnitureIdList() +const std::set< uint32_t >& getHousingFurnitureIdList() { if( m_HousingFurnitureIdList.size() == 0 ) loadIdList( m_HousingFurnitureDat, m_HousingFurnitureIdList ); return m_HousingFurnitureIdList; } -const std::set< uint32_t >& ExdDataGenerated::getHousingYardObjectIdList() +const std::set< uint32_t >& getHousingYardObjectIdList() { if( m_HousingYardObjectIdList.size() == 0 ) loadIdList( m_HousingYardObjectDat, m_HousingYardObjectIdList ); return m_HousingYardObjectIdList; } -const std::set< uint32_t >& ExdDataGenerated::getInstanceContentIdList() +const std::set< uint32_t >& getInstanceContentIdList() { if( m_InstanceContentIdList.size() == 0 ) loadIdList( m_InstanceContentDat, m_InstanceContentIdList ); return m_InstanceContentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getInstanceContentBuffIdList() +const std::set< uint32_t >& getInstanceContentBuffIdList() { if( m_InstanceContentBuffIdList.size() == 0 ) loadIdList( m_InstanceContentBuffDat, m_InstanceContentBuffIdList ); return m_InstanceContentBuffIdList; } -const std::set< uint32_t >& ExdDataGenerated::getInstanceContentTextDataIdList() +const std::set< uint32_t >& getInstanceContentTextDataIdList() { if( m_InstanceContentTextDataIdList.size() == 0 ) loadIdList( m_InstanceContentTextDataDat, m_InstanceContentTextDataIdList ); return m_InstanceContentTextDataIdList; } -const std::set< uint32_t >& ExdDataGenerated::getInstanceContentTypeIdList() +const std::set< uint32_t >& getInstanceContentTypeIdList() { if( m_InstanceContentTypeIdList.size() == 0 ) loadIdList( m_InstanceContentTypeDat, m_InstanceContentTypeIdList ); return m_InstanceContentTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemIdList() +const std::set< uint32_t >& getItemIdList() { if( m_ItemIdList.size() == 0 ) loadIdList( m_ItemDat, m_ItemIdList ); return m_ItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemActionIdList() +const std::set< uint32_t >& getItemActionIdList() { if( m_ItemActionIdList.size() == 0 ) loadIdList( m_ItemActionDat, m_ItemActionIdList ); return m_ItemActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemFoodIdList() +const std::set< uint32_t >& getItemFoodIdList() { if( m_ItemFoodIdList.size() == 0 ) loadIdList( m_ItemFoodDat, m_ItemFoodIdList ); return m_ItemFoodIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemSearchCategoryIdList() +const std::set< uint32_t >& getItemSearchCategoryIdList() { if( m_ItemSearchCategoryIdList.size() == 0 ) loadIdList( m_ItemSearchCategoryDat, m_ItemSearchCategoryIdList ); return m_ItemSearchCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemSeriesIdList() +const std::set< uint32_t >& getItemSeriesIdList() { if( m_ItemSeriesIdList.size() == 0 ) loadIdList( m_ItemSeriesDat, m_ItemSeriesIdList ); return m_ItemSeriesIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemSpecialBonusIdList() +const std::set< uint32_t >& getItemSpecialBonusIdList() { if( m_ItemSpecialBonusIdList.size() == 0 ) loadIdList( m_ItemSpecialBonusDat, m_ItemSpecialBonusIdList ); return m_ItemSpecialBonusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getItemUICategoryIdList() +const std::set< uint32_t >& getItemUICategoryIdList() { if( m_ItemUICategoryIdList.size() == 0 ) loadIdList( m_ItemUICategoryDat, m_ItemUICategoryIdList ); return m_ItemUICategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getJournalCategoryIdList() +const std::set< uint32_t >& getJournalCategoryIdList() { if( m_JournalCategoryIdList.size() == 0 ) loadIdList( m_JournalCategoryDat, m_JournalCategoryIdList ); return m_JournalCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getJournalGenreIdList() +const std::set< uint32_t >& getJournalGenreIdList() { if( m_JournalGenreIdList.size() == 0 ) loadIdList( m_JournalGenreDat, m_JournalGenreIdList ); return m_JournalGenreIdList; } -const std::set< uint32_t >& ExdDataGenerated::getJournalSectionIdList() +const std::set< uint32_t >& getJournalSectionIdList() { if( m_JournalSectionIdList.size() == 0 ) loadIdList( m_JournalSectionDat, m_JournalSectionIdList ); return m_JournalSectionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveIdList() +const std::set< uint32_t >& getLeveIdList() { if( m_LeveIdList.size() == 0 ) loadIdList( m_LeveDat, m_LeveIdList ); return m_LeveIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveAssignmentTypeIdList() +const std::set< uint32_t >& getLeveAssignmentTypeIdList() { if( m_LeveAssignmentTypeIdList.size() == 0 ) loadIdList( m_LeveAssignmentTypeDat, m_LeveAssignmentTypeIdList ); return m_LeveAssignmentTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveClientIdList() +const std::set< uint32_t >& getLeveClientIdList() { if( m_LeveClientIdList.size() == 0 ) loadIdList( m_LeveClientDat, m_LeveClientIdList ); return m_LeveClientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLevelIdList() +const std::set< uint32_t >& getLevelIdList() { if( m_LevelIdList.size() == 0 ) loadIdList( m_LevelDat, m_LevelIdList ); return m_LevelIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveRewardItemIdList() +const std::set< uint32_t >& getLeveRewardItemIdList() { if( m_LeveRewardItemIdList.size() == 0 ) loadIdList( m_LeveRewardItemDat, m_LeveRewardItemIdList ); return m_LeveRewardItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveRewardItemGroupIdList() +const std::set< uint32_t >& getLeveRewardItemGroupIdList() { if( m_LeveRewardItemGroupIdList.size() == 0 ) loadIdList( m_LeveRewardItemGroupDat, m_LeveRewardItemGroupIdList ); return m_LeveRewardItemGroupIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLeveVfxIdList() +const std::set< uint32_t >& getLeveVfxIdList() { if( m_LeveVfxIdList.size() == 0 ) loadIdList( m_LeveVfxDat, m_LeveVfxIdList ); return m_LeveVfxIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLogFilterIdList() +const std::set< uint32_t >& getLogFilterIdList() { if( m_LogFilterIdList.size() == 0 ) loadIdList( m_LogFilterDat, m_LogFilterIdList ); return m_LogFilterIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLogKindIdList() +const std::set< uint32_t >& getLogKindIdList() { if( m_LogKindIdList.size() == 0 ) loadIdList( m_LogKindDat, m_LogKindIdList ); return m_LogKindIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLogKindCategoryTextIdList() +const std::set< uint32_t >& getLogKindCategoryTextIdList() { if( m_LogKindCategoryTextIdList.size() == 0 ) loadIdList( m_LogKindCategoryTextDat, m_LogKindCategoryTextIdList ); return m_LogKindCategoryTextIdList; } -const std::set< uint32_t >& ExdDataGenerated::getLogMessageIdList() +const std::set< uint32_t >& getLogMessageIdList() { if( m_LogMessageIdList.size() == 0 ) loadIdList( m_LogMessageDat, m_LogMessageIdList ); return m_LogMessageIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMacroIconIdList() +const std::set< uint32_t >& getMacroIconIdList() { if( m_MacroIconIdList.size() == 0 ) loadIdList( m_MacroIconDat, m_MacroIconIdList ); return m_MacroIconIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMacroIconRedirectOldIdList() +const std::set< uint32_t >& getMacroIconRedirectOldIdList() { if( m_MacroIconRedirectOldIdList.size() == 0 ) loadIdList( m_MacroIconRedirectOldDat, m_MacroIconRedirectOldIdList ); return m_MacroIconRedirectOldIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMainCommandIdList() +const std::set< uint32_t >& getMainCommandIdList() { if( m_MainCommandIdList.size() == 0 ) loadIdList( m_MainCommandDat, m_MainCommandIdList ); return m_MainCommandIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMainCommandCategoryIdList() +const std::set< uint32_t >& getMainCommandCategoryIdList() { if( m_MainCommandCategoryIdList.size() == 0 ) loadIdList( m_MainCommandCategoryDat, m_MainCommandCategoryIdList ); return m_MainCommandCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMapIdList() +const std::set< uint32_t >& getMapIdList() { if( m_MapIdList.size() == 0 ) loadIdList( m_MapDat, m_MapIdList ); return m_MapIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMapMarkerIdList() +const std::set< uint32_t >& getMapMarkerIdList() { if( m_MapMarkerIdList.size() == 0 ) loadIdList( m_MapMarkerDat, m_MapMarkerIdList ); return m_MapMarkerIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMapSymbolIdList() +const std::set< uint32_t >& getMapSymbolIdList() { if( m_MapSymbolIdList.size() == 0 ) loadIdList( m_MapSymbolDat, m_MapSymbolIdList ); return m_MapSymbolIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMasterpieceSupplyDutyIdList() +const std::set< uint32_t >& getMasterpieceSupplyDutyIdList() { if( m_MasterpieceSupplyDutyIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyDutyDat, m_MasterpieceSupplyDutyIdList ); return m_MasterpieceSupplyDutyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMasterpieceSupplyMultiplierIdList() +const std::set< uint32_t >& getMasterpieceSupplyMultiplierIdList() { if( m_MasterpieceSupplyMultiplierIdList.size() == 0 ) loadIdList( m_MasterpieceSupplyMultiplierDat, m_MasterpieceSupplyMultiplierIdList ); return m_MasterpieceSupplyMultiplierIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMateriaIdList() +const std::set< uint32_t >& getMateriaIdList() { if( m_MateriaIdList.size() == 0 ) loadIdList( m_MateriaDat, m_MateriaIdList ); return m_MateriaIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMinionRaceIdList() +const std::set< uint32_t >& getMinionRaceIdList() { if( m_MinionRaceIdList.size() == 0 ) loadIdList( m_MinionRaceDat, m_MinionRaceIdList ); return m_MinionRaceIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMinionRulesIdList() +const std::set< uint32_t >& getMinionRulesIdList() { if( m_MinionRulesIdList.size() == 0 ) loadIdList( m_MinionRulesDat, m_MinionRulesIdList ); return m_MinionRulesIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMinionSkillTypeIdList() +const std::set< uint32_t >& getMinionSkillTypeIdList() { if( m_MinionSkillTypeIdList.size() == 0 ) loadIdList( m_MinionSkillTypeDat, m_MinionSkillTypeIdList ); return m_MinionSkillTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMobHuntTargetIdList() +const std::set< uint32_t >& getMobHuntTargetIdList() { if( m_MobHuntTargetIdList.size() == 0 ) loadIdList( m_MobHuntTargetDat, m_MobHuntTargetIdList ); return m_MobHuntTargetIdList; } -const std::set< uint32_t >& ExdDataGenerated::getModelCharaIdList() +const std::set< uint32_t >& getModelCharaIdList() { if( m_ModelCharaIdList.size() == 0 ) loadIdList( m_ModelCharaDat, m_ModelCharaIdList ); return m_ModelCharaIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMonsterNoteIdList() +const std::set< uint32_t >& getMonsterNoteIdList() { if( m_MonsterNoteIdList.size() == 0 ) loadIdList( m_MonsterNoteDat, m_MonsterNoteIdList ); return m_MonsterNoteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMonsterNoteTargetIdList() +const std::set< uint32_t >& getMonsterNoteTargetIdList() { if( m_MonsterNoteTargetIdList.size() == 0 ) loadIdList( m_MonsterNoteTargetDat, m_MonsterNoteTargetIdList ); return m_MonsterNoteTargetIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMountIdList() +const std::set< uint32_t >& getMountIdList() { if( m_MountIdList.size() == 0 ) loadIdList( m_MountDat, m_MountIdList ); return m_MountIdList; } -const std::set< uint32_t >& ExdDataGenerated::getMountActionIdList() +const std::set< uint32_t >& getMountActionIdList() { if( m_MountActionIdList.size() == 0 ) loadIdList( m_MountActionDat, m_MountActionIdList ); return m_MountActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getNpcEquipIdList() +const std::set< uint32_t >& getNpcEquipIdList() { if( m_NpcEquipIdList.size() == 0 ) loadIdList( m_NpcEquipDat, m_NpcEquipIdList ); return m_NpcEquipIdList; } -const std::set< uint32_t >& ExdDataGenerated::getOmenIdList() +const std::set< uint32_t >& getOmenIdList() { if( m_OmenIdList.size() == 0 ) loadIdList( m_OmenDat, m_OmenIdList ); return m_OmenIdList; } -const std::set< uint32_t >& ExdDataGenerated::getOnlineStatusIdList() +const std::set< uint32_t >& getOnlineStatusIdList() { if( m_OnlineStatusIdList.size() == 0 ) loadIdList( m_OnlineStatusDat, m_OnlineStatusIdList ); return m_OnlineStatusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getOrchestrionIdList() +const std::set< uint32_t >& getOrchestrionIdList() { if( m_OrchestrionIdList.size() == 0 ) loadIdList( m_OrchestrionDat, m_OrchestrionIdList ); return m_OrchestrionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getOrchestrionPathIdList() +const std::set< uint32_t >& getOrchestrionPathIdList() { if( m_OrchestrionPathIdList.size() == 0 ) loadIdList( m_OrchestrionPathDat, m_OrchestrionPathIdList ); return m_OrchestrionPathIdList; } -const std::set< uint32_t >& ExdDataGenerated::getParamGrowIdList() +const std::set< uint32_t >& getParamGrowIdList() { if( m_ParamGrowIdList.size() == 0 ) loadIdList( m_ParamGrowDat, m_ParamGrowIdList ); return m_ParamGrowIdList; } -const std::set< uint32_t >& ExdDataGenerated::getPetIdList() +const std::set< uint32_t >& getPetIdList() { if( m_PetIdList.size() == 0 ) loadIdList( m_PetDat, m_PetIdList ); return m_PetIdList; } -const std::set< uint32_t >& ExdDataGenerated::getPetActionIdList() +const std::set< uint32_t >& getPetActionIdList() { if( m_PetActionIdList.size() == 0 ) loadIdList( m_PetActionDat, m_PetActionIdList ); return m_PetActionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getPictureIdList() +const std::set< uint32_t >& getPictureIdList() { if( m_PictureIdList.size() == 0 ) loadIdList( m_PictureDat, m_PictureIdList ); return m_PictureIdList; } -const std::set< uint32_t >& ExdDataGenerated::getPlaceNameIdList() +const std::set< uint32_t >& getPlaceNameIdList() { if( m_PlaceNameIdList.size() == 0 ) loadIdList( m_PlaceNameDat, m_PlaceNameIdList ); return m_PlaceNameIdList; } -const std::set< uint32_t >& ExdDataGenerated::getQuestIdList() +const std::set< uint32_t >& getQuestIdList() { if( m_QuestIdList.size() == 0 ) loadIdList( m_QuestDat, m_QuestIdList ); return m_QuestIdList; } -const std::set< uint32_t >& ExdDataGenerated::getQuestRewardOtherIdList() +const std::set< uint32_t >& getQuestRewardOtherIdList() { if( m_QuestRewardOtherIdList.size() == 0 ) loadIdList( m_QuestRewardOtherDat, m_QuestRewardOtherIdList ); return m_QuestRewardOtherIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRaceIdList() +const std::set< uint32_t >& getRaceIdList() { if( m_RaceIdList.size() == 0 ) loadIdList( m_RaceDat, m_RaceIdList ); return m_RaceIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboItemIdList() +const std::set< uint32_t >& getRacingChocoboItemIdList() { if( m_RacingChocoboItemIdList.size() == 0 ) loadIdList( m_RacingChocoboItemDat, m_RacingChocoboItemIdList ); return m_RacingChocoboItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameIdList() +const std::set< uint32_t >& getRacingChocoboNameIdList() { if( m_RacingChocoboNameIdList.size() == 0 ) loadIdList( m_RacingChocoboNameDat, m_RacingChocoboNameIdList ); return m_RacingChocoboNameIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameCategoryIdList() +const std::set< uint32_t >& getRacingChocoboNameCategoryIdList() { if( m_RacingChocoboNameCategoryIdList.size() == 0 ) loadIdList( m_RacingChocoboNameCategoryDat, m_RacingChocoboNameCategoryIdList ); return m_RacingChocoboNameCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboNameInfoIdList() +const std::set< uint32_t >& getRacingChocoboNameInfoIdList() { if( m_RacingChocoboNameInfoIdList.size() == 0 ) loadIdList( m_RacingChocoboNameInfoDat, m_RacingChocoboNameInfoIdList ); return m_RacingChocoboNameInfoIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRacingChocoboParamIdList() +const std::set< uint32_t >& getRacingChocoboParamIdList() { if( m_RacingChocoboParamIdList.size() == 0 ) loadIdList( m_RacingChocoboParamDat, m_RacingChocoboParamIdList ); return m_RacingChocoboParamIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRecipeIdList() +const std::set< uint32_t >& getRecipeIdList() { if( m_RecipeIdList.size() == 0 ) loadIdList( m_RecipeDat, m_RecipeIdList ); return m_RecipeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRecipeElementIdList() +const std::set< uint32_t >& getRecipeElementIdList() { if( m_RecipeElementIdList.size() == 0 ) loadIdList( m_RecipeElementDat, m_RecipeElementIdList ); return m_RecipeElementIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRecipeLevelTableIdList() +const std::set< uint32_t >& getRecipeLevelTableIdList() { if( m_RecipeLevelTableIdList.size() == 0 ) loadIdList( m_RecipeLevelTableDat, m_RecipeLevelTableIdList ); return m_RecipeLevelTableIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRecipeNotebookListIdList() +const std::set< uint32_t >& getRecipeNotebookListIdList() { if( m_RecipeNotebookListIdList.size() == 0 ) loadIdList( m_RecipeNotebookListDat, m_RecipeNotebookListIdList ); return m_RecipeNotebookListIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRelicIdList() +const std::set< uint32_t >& getRelicIdList() { if( m_RelicIdList.size() == 0 ) loadIdList( m_RelicDat, m_RelicIdList ); return m_RelicIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRelic3IdList() +const std::set< uint32_t >& getRelic3IdList() { if( m_Relic3IdList.size() == 0 ) loadIdList( m_Relic3Dat, m_Relic3IdList ); return m_Relic3IdList; } -const std::set< uint32_t >& ExdDataGenerated::getRelicItemIdList() +const std::set< uint32_t >& getRelicItemIdList() { if( m_RelicItemIdList.size() == 0 ) loadIdList( m_RelicItemDat, m_RelicItemIdList ); return m_RelicItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRelicNoteIdList() +const std::set< uint32_t >& getRelicNoteIdList() { if( m_RelicNoteIdList.size() == 0 ) loadIdList( m_RelicNoteDat, m_RelicNoteIdList ); return m_RelicNoteIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRelicNoteCategoryIdList() +const std::set< uint32_t >& getRelicNoteCategoryIdList() { if( m_RelicNoteCategoryIdList.size() == 0 ) loadIdList( m_RelicNoteCategoryDat, m_RelicNoteCategoryIdList ); return m_RelicNoteCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskIdList() +const std::set< uint32_t >& getRetainerTaskIdList() { if( m_RetainerTaskIdList.size() == 0 ) loadIdList( m_RetainerTaskDat, m_RetainerTaskIdList ); return m_RetainerTaskIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskNormalIdList() +const std::set< uint32_t >& getRetainerTaskNormalIdList() { if( m_RetainerTaskNormalIdList.size() == 0 ) loadIdList( m_RetainerTaskNormalDat, m_RetainerTaskNormalIdList ); return m_RetainerTaskNormalIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskParameterIdList() +const std::set< uint32_t >& getRetainerTaskParameterIdList() { if( m_RetainerTaskParameterIdList.size() == 0 ) loadIdList( m_RetainerTaskParameterDat, m_RetainerTaskParameterIdList ); return m_RetainerTaskParameterIdList; } -const std::set< uint32_t >& ExdDataGenerated::getRetainerTaskRandomIdList() +const std::set< uint32_t >& getRetainerTaskRandomIdList() { if( m_RetainerTaskRandomIdList.size() == 0 ) loadIdList( m_RetainerTaskRandomDat, m_RetainerTaskRandomIdList ); return m_RetainerTaskRandomIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSalvageIdList() +const std::set< uint32_t >& getSalvageIdList() { if( m_SalvageIdList.size() == 0 ) loadIdList( m_SalvageDat, m_SalvageIdList ); return m_SalvageIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSatisfactionNpcIdList() +const std::set< uint32_t >& getSatisfactionNpcIdList() { if( m_SatisfactionNpcIdList.size() == 0 ) loadIdList( m_SatisfactionNpcDat, m_SatisfactionNpcIdList ); return m_SatisfactionNpcIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSatisfactionSupplyIdList() +const std::set< uint32_t >& getSatisfactionSupplyIdList() { if( m_SatisfactionSupplyIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyDat, m_SatisfactionSupplyIdList ); return m_SatisfactionSupplyIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSatisfactionSupplyRewardIdList() +const std::set< uint32_t >& getSatisfactionSupplyRewardIdList() { if( m_SatisfactionSupplyRewardIdList.size() == 0 ) loadIdList( m_SatisfactionSupplyRewardDat, m_SatisfactionSupplyRewardIdList ); return m_SatisfactionSupplyRewardIdList; } -const std::set< uint32_t >& ExdDataGenerated::getScreenImageIdList() +const std::set< uint32_t >& getScreenImageIdList() { if( m_ScreenImageIdList.size() == 0 ) loadIdList( m_ScreenImageDat, m_ScreenImageIdList ); return m_ScreenImageIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSecretRecipeBookIdList() +const std::set< uint32_t >& getSecretRecipeBookIdList() { if( m_SecretRecipeBookIdList.size() == 0 ) loadIdList( m_SecretRecipeBookDat, m_SecretRecipeBookIdList ); return m_SecretRecipeBookIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSpearfishingItemIdList() +const std::set< uint32_t >& getSpearfishingItemIdList() { if( m_SpearfishingItemIdList.size() == 0 ) loadIdList( m_SpearfishingItemDat, m_SpearfishingItemIdList ); return m_SpearfishingItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSpearfishingNotebookIdList() +const std::set< uint32_t >& getSpearfishingNotebookIdList() { if( m_SpearfishingNotebookIdList.size() == 0 ) loadIdList( m_SpearfishingNotebookDat, m_SpearfishingNotebookIdList ); return m_SpearfishingNotebookIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSpecialShopIdList() +const std::set< uint32_t >& getSpecialShopIdList() { if( m_SpecialShopIdList.size() == 0 ) loadIdList( m_SpecialShopDat, m_SpecialShopIdList ); return m_SpecialShopIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSpecialShopItemCategoryIdList() +const std::set< uint32_t >& getSpecialShopItemCategoryIdList() { if( m_SpecialShopItemCategoryIdList.size() == 0 ) loadIdList( m_SpecialShopItemCategoryDat, m_SpecialShopItemCategoryIdList ); return m_SpecialShopItemCategoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getStainIdList() +const std::set< uint32_t >& getStainIdList() { if( m_StainIdList.size() == 0 ) loadIdList( m_StainDat, m_StainIdList ); return m_StainIdList; } -const std::set< uint32_t >& ExdDataGenerated::getStatusIdList() +const std::set< uint32_t >& getStatusIdList() { if( m_StatusIdList.size() == 0 ) loadIdList( m_StatusDat, m_StatusIdList ); return m_StatusIdList; } -const std::set< uint32_t >& ExdDataGenerated::getStoryIdList() +const std::set< uint32_t >& getStoryIdList() { if( m_StoryIdList.size() == 0 ) loadIdList( m_StoryDat, m_StoryIdList ); return m_StoryIdList; } -const std::set< uint32_t >& ExdDataGenerated::getSwitchTalkIdList() +const std::set< uint32_t >& getSwitchTalkIdList() { if( m_SwitchTalkIdList.size() == 0 ) loadIdList( m_SwitchTalkDat, m_SwitchTalkIdList ); return m_SwitchTalkIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTerritoryTypeIdList() +const std::set< uint32_t >& getTerritoryTypeIdList() { if( m_TerritoryTypeIdList.size() == 0 ) loadIdList( m_TerritoryTypeDat, m_TerritoryTypeIdList ); return m_TerritoryTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTextCommandIdList() +const std::set< uint32_t >& getTextCommandIdList() { if( m_TextCommandIdList.size() == 0 ) loadIdList( m_TextCommandDat, m_TextCommandIdList ); return m_TextCommandIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTitleIdList() +const std::set< uint32_t >& getTitleIdList() { if( m_TitleIdList.size() == 0 ) loadIdList( m_TitleDat, m_TitleIdList ); return m_TitleIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTomestonesIdList() +const std::set< uint32_t >& getTomestonesIdList() { if( m_TomestonesIdList.size() == 0 ) loadIdList( m_TomestonesDat, m_TomestonesIdList ); return m_TomestonesIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTomestonesItemIdList() +const std::set< uint32_t >& getTomestonesItemIdList() { if( m_TomestonesItemIdList.size() == 0 ) loadIdList( m_TomestonesItemDat, m_TomestonesItemIdList ); return m_TomestonesItemIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTopicSelectIdList() +const std::set< uint32_t >& getTopicSelectIdList() { if( m_TopicSelectIdList.size() == 0 ) loadIdList( m_TopicSelectDat, m_TopicSelectIdList ); return m_TopicSelectIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTownIdList() +const std::set< uint32_t >& getTownIdList() { if( m_TownIdList.size() == 0 ) loadIdList( m_TownDat, m_TownIdList ); return m_TownIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTraitIdList() +const std::set< uint32_t >& getTraitIdList() { if( m_TraitIdList.size() == 0 ) loadIdList( m_TraitDat, m_TraitIdList ); return m_TraitIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTraitRecastIdList() +const std::set< uint32_t >& getTraitRecastIdList() { if( m_TraitRecastIdList.size() == 0 ) loadIdList( m_TraitRecastDat, m_TraitRecastIdList ); return m_TraitRecastIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTraitTransientIdList() +const std::set< uint32_t >& getTraitTransientIdList() { if( m_TraitTransientIdList.size() == 0 ) loadIdList( m_TraitTransientDat, m_TraitTransientIdList ); return m_TraitTransientIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTribeIdList() +const std::set< uint32_t >& getTribeIdList() { if( m_TribeIdList.size() == 0 ) loadIdList( m_TribeDat, m_TribeIdList ); return m_TribeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadIdList() +const std::set< uint32_t >& getTripleTriadIdList() { if( m_TripleTriadIdList.size() == 0 ) loadIdList( m_TripleTriadDat, m_TripleTriadIdList ); return m_TripleTriadIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardIdList() +const std::set< uint32_t >& getTripleTriadCardIdList() { if( m_TripleTriadCardIdList.size() == 0 ) loadIdList( m_TripleTriadCardDat, m_TripleTriadCardIdList ); return m_TripleTriadCardIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardRarityIdList() +const std::set< uint32_t >& getTripleTriadCardRarityIdList() { if( m_TripleTriadCardRarityIdList.size() == 0 ) loadIdList( m_TripleTriadCardRarityDat, m_TripleTriadCardRarityIdList ); return m_TripleTriadCardRarityIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardResidentIdList() +const std::set< uint32_t >& getTripleTriadCardResidentIdList() { if( m_TripleTriadCardResidentIdList.size() == 0 ) loadIdList( m_TripleTriadCardResidentDat, m_TripleTriadCardResidentIdList ); return m_TripleTriadCardResidentIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCardTypeIdList() +const std::set< uint32_t >& getTripleTriadCardTypeIdList() { if( m_TripleTriadCardTypeIdList.size() == 0 ) loadIdList( m_TripleTriadCardTypeDat, m_TripleTriadCardTypeIdList ); return m_TripleTriadCardTypeIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadCompetitionIdList() +const std::set< uint32_t >& getTripleTriadCompetitionIdList() { if( m_TripleTriadCompetitionIdList.size() == 0 ) loadIdList( m_TripleTriadCompetitionDat, m_TripleTriadCompetitionIdList ); return m_TripleTriadCompetitionIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTripleTriadRuleIdList() +const std::set< uint32_t >& getTripleTriadRuleIdList() { if( m_TripleTriadRuleIdList.size() == 0 ) loadIdList( m_TripleTriadRuleDat, m_TripleTriadRuleIdList ); return m_TripleTriadRuleIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTutorialIdList() +const std::set< uint32_t >& getTutorialIdList() { if( m_TutorialIdList.size() == 0 ) loadIdList( m_TutorialDat, m_TutorialIdList ); return m_TutorialIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTutorialDPSIdList() +const std::set< uint32_t >& getTutorialDPSIdList() { if( m_TutorialDPSIdList.size() == 0 ) loadIdList( m_TutorialDPSDat, m_TutorialDPSIdList ); return m_TutorialDPSIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTutorialHealerIdList() +const std::set< uint32_t >& getTutorialHealerIdList() { if( m_TutorialHealerIdList.size() == 0 ) loadIdList( m_TutorialHealerDat, m_TutorialHealerIdList ); return m_TutorialHealerIdList; } -const std::set< uint32_t >& ExdDataGenerated::getTutorialTankIdList() +const std::set< uint32_t >& getTutorialTankIdList() { if( m_TutorialTankIdList.size() == 0 ) loadIdList( m_TutorialTankDat, m_TutorialTankIdList ); return m_TutorialTankIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWarpIdList() +const std::set< uint32_t >& getWarpIdList() { if( m_WarpIdList.size() == 0 ) loadIdList( m_WarpDat, m_WarpIdList ); return m_WarpIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeatherIdList() +const std::set< uint32_t >& getWeatherIdList() { if( m_WeatherIdList.size() == 0 ) loadIdList( m_WeatherDat, m_WeatherIdList ); return m_WeatherIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeatherGroupIdList() +const std::set< uint32_t >& getWeatherGroupIdList() { if( m_WeatherGroupIdList.size() == 0 ) loadIdList( m_WeatherGroupDat, m_WeatherGroupIdList ); return m_WeatherGroupIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeatherRateIdList() +const std::set< uint32_t >& getWeatherRateIdList() { if( m_WeatherRateIdList.size() == 0 ) loadIdList( m_WeatherRateDat, m_WeatherRateIdList ); return m_WeatherRateIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoOrderDataIdList() +const std::set< uint32_t >& getWeeklyBingoOrderDataIdList() { if( m_WeeklyBingoOrderDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoOrderDataDat, m_WeeklyBingoOrderDataIdList ); return m_WeeklyBingoOrderDataIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoRewardDataIdList() +const std::set< uint32_t >& getWeeklyBingoRewardDataIdList() { if( m_WeeklyBingoRewardDataIdList.size() == 0 ) loadIdList( m_WeeklyBingoRewardDataDat, m_WeeklyBingoRewardDataIdList ); return m_WeeklyBingoRewardDataIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWeeklyBingoTextIdList() +const std::set< uint32_t >& getWeeklyBingoTextIdList() { if( m_WeeklyBingoTextIdList.size() == 0 ) loadIdList( m_WeeklyBingoTextDat, m_WeeklyBingoTextIdList ); return m_WeeklyBingoTextIdList; } -const std::set< uint32_t >& ExdDataGenerated::getWorldDCGroupTypeIdList() +const std::set< uint32_t >& getWorldDCGroupTypeIdList() { if( m_WorldDCGroupTypeIdList.size() == 0 ) loadIdList( m_WorldDCGroupTypeDat, m_WorldDCGroupTypeIdList ); From 3c890148f20282360f5e134e07d5029fc41a5261 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 28 Jan 2018 14:02:51 +1100 Subject: [PATCH 22/45] scripts include ScriptObject.h sanely now --- scripts/native/CmnDef/CmnDefCutSceneReplay.cpp | 2 +- scripts/native/CmnDef/CmnDefInnBed.cpp | 2 +- scripts/native/CmnDef/CmnDefLinkShell.cpp | 2 +- scripts/native/CmnDef/HouFurOrchestrion.cpp | 2 +- scripts/native/action/ActionSprint3.cpp | 2 +- scripts/native/aetheryte/Aethernet.cpp | 2 +- scripts/native/aetheryte/Aetheryte.cpp | 2 +- scripts/native/opening/OpeningGridania.cpp | 2 +- scripts/native/opening/OpeningLimsa.cpp | 2 +- scripts/native/opening/OpeningUldah.cpp | 2 +- scripts/native/quest/ManFst001.cpp | 2 +- scripts/native/quest/ManFst002.cpp | 2 +- scripts/native/quest/ManFst003.cpp | 2 +- scripts/native/quest/ManSea001.cpp | 2 +- scripts/native/quest/ManSea002.cpp | 2 +- scripts/native/quest/ManWil001.cpp | 2 +- scripts/native/quest/ManWil002.cpp | 2 +- scripts/native/quest/subquest/gridania/SubFst001.cpp | 2 +- scripts/native/quest/subquest/gridania/SubFst002.cpp | 2 +- scripts/native/quest/subquest/gridania/SubFst010.cpp | 2 +- scripts/native/quest/subquest/gridania/SubFst013.cpp | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp b/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp index 39bf4300..31fde89b 100644 --- a/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp +++ b/scripts/native/CmnDef/CmnDefCutSceneReplay.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class CmnDefCutSceneReplay : public EventScript { diff --git a/scripts/native/CmnDef/CmnDefInnBed.cpp b/scripts/native/CmnDef/CmnDefInnBed.cpp index ac8a0a68..36ccd739 100644 --- a/scripts/native/CmnDef/CmnDefInnBed.cpp +++ b/scripts/native/CmnDef/CmnDefInnBed.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class CmnDefInnBed : public EventScript { diff --git a/scripts/native/CmnDef/CmnDefLinkShell.cpp b/scripts/native/CmnDef/CmnDefLinkShell.cpp index f0df71f9..16aa593b 100644 --- a/scripts/native/CmnDef/CmnDefLinkShell.cpp +++ b/scripts/native/CmnDef/CmnDefLinkShell.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include #define ACTION_CREATE 2 #define ACTION_RENAME 3 diff --git a/scripts/native/CmnDef/HouFurOrchestrion.cpp b/scripts/native/CmnDef/HouFurOrchestrion.cpp index 9e47c554..51273ed5 100644 --- a/scripts/native/CmnDef/HouFurOrchestrion.cpp +++ b/scripts/native/CmnDef/HouFurOrchestrion.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class HouFurOrchestrion : public EventScript { diff --git a/scripts/native/action/ActionSprint3.cpp b/scripts/native/action/ActionSprint3.cpp index 076bbf5f..82bbfc37 100644 --- a/scripts/native/action/ActionSprint3.cpp +++ b/scripts/native/action/ActionSprint3.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class ActionSprint3 : public ActionScript { diff --git a/scripts/native/aetheryte/Aethernet.cpp b/scripts/native/aetheryte/Aethernet.cpp index 9a3ccd8f..e0cda163 100644 --- a/scripts/native/aetheryte/Aethernet.cpp +++ b/scripts/native/aetheryte/Aethernet.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include #define ACTION_ATTUNE 0x13 diff --git a/scripts/native/aetheryte/Aetheryte.cpp b/scripts/native/aetheryte/Aetheryte.cpp index 51ba6cb1..9f838d13 100644 --- a/scripts/native/aetheryte/Aetheryte.cpp +++ b/scripts/native/aetheryte/Aetheryte.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include #define ACTION_ATTUNE 0x13 #define ACTION_TELEPORT 0x4 diff --git a/scripts/native/opening/OpeningGridania.cpp b/scripts/native/opening/OpeningGridania.cpp index 9f6d6f0a..1541561c 100644 --- a/scripts/native/opening/OpeningGridania.cpp +++ b/scripts/native/opening/OpeningGridania.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class OpeningGridania : public EventScript { diff --git a/scripts/native/opening/OpeningLimsa.cpp b/scripts/native/opening/OpeningLimsa.cpp index a40ea482..f30a2aed 100644 --- a/scripts/native/opening/OpeningLimsa.cpp +++ b/scripts/native/opening/OpeningLimsa.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Opening Script: OpeningLimsaLominsa // Quest Name: OpeningLimsaLominsa diff --git a/scripts/native/opening/OpeningUldah.cpp b/scripts/native/opening/OpeningUldah.cpp index fdd1c5d2..c780782e 100644 --- a/scripts/native/opening/OpeningUldah.cpp +++ b/scripts/native/opening/OpeningUldah.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class OpeningUldah : public EventScript { diff --git a/scripts/native/quest/ManFst001.cpp b/scripts/native/quest/ManFst001.cpp index b73581ac..df85953a 100644 --- a/scripts/native/quest/ManFst001.cpp +++ b/scripts/native/quest/ManFst001.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManFst001_00039 // Quest Name: Coming to Gridania diff --git a/scripts/native/quest/ManFst002.cpp b/scripts/native/quest/ManFst002.cpp index 707150cb..1943f599 100644 --- a/scripts/native/quest/ManFst002.cpp +++ b/scripts/native/quest/ManFst002.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManFst002_00124 // Quest Name: Close to Home diff --git a/scripts/native/quest/ManFst003.cpp b/scripts/native/quest/ManFst003.cpp index c8cd4da6..00ecbb90 100644 --- a/scripts/native/quest/ManFst003.cpp +++ b/scripts/native/quest/ManFst003.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManFst003_00123 // Quest Name: Close to Home diff --git a/scripts/native/quest/ManSea001.cpp b/scripts/native/quest/ManSea001.cpp index aee4da80..5921e09d 100644 --- a/scripts/native/quest/ManSea001.cpp +++ b/scripts/native/quest/ManSea001.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include class ManSea001 : public EventScript { diff --git a/scripts/native/quest/ManSea002.cpp b/scripts/native/quest/ManSea002.cpp index 57d7dda7..f2fab3a3 100644 --- a/scripts/native/quest/ManSea002.cpp +++ b/scripts/native/quest/ManSea002.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManSea002_00108 // Quest Name: Close to Home diff --git a/scripts/native/quest/ManWil001.cpp b/scripts/native/quest/ManWil001.cpp index ee04e2aa..9be159d7 100644 --- a/scripts/native/quest/ManWil001.cpp +++ b/scripts/native/quest/ManWil001.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManWil001_00594 // Quest Name: Coming to Ul'dah diff --git a/scripts/native/quest/ManWil002.cpp b/scripts/native/quest/ManWil002.cpp index 9f160f72..e51e1a8b 100644 --- a/scripts/native/quest/ManWil002.cpp +++ b/scripts/native/quest/ManWil002.cpp @@ -1,4 +1,4 @@ -#include "../ScriptObject.h" +#include // Quest Script: ManWil002_00568 // Quest Name: Close to Home diff --git a/scripts/native/quest/subquest/gridania/SubFst001.cpp b/scripts/native/quest/subquest/gridania/SubFst001.cpp index 2aedc7f8..55da6d99 100644 --- a/scripts/native/quest/subquest/gridania/SubFst001.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst001.cpp @@ -1,4 +1,4 @@ -#include "../../../ScriptObject.h" +#include // Quest Script: SubFst001_00024 // Quest Name: Coarse Correspondence diff --git a/scripts/native/quest/subquest/gridania/SubFst002.cpp b/scripts/native/quest/subquest/gridania/SubFst002.cpp index 2e32fa23..d2cff2e4 100644 --- a/scripts/native/quest/subquest/gridania/SubFst002.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst002.cpp @@ -1,4 +1,4 @@ -#include "../../../ScriptObject.h" +#include // Quest Script: SubFst002_00025 // Quest Name: Quarrels with Squirrels diff --git a/scripts/native/quest/subquest/gridania/SubFst010.cpp b/scripts/native/quest/subquest/gridania/SubFst010.cpp index e3e03582..cbabe1b3 100644 --- a/scripts/native/quest/subquest/gridania/SubFst010.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst010.cpp @@ -1,4 +1,4 @@ -#include "../../../ScriptObject.h" +#include // Quest Script: SubFst010_00001 // Quest Name: A Good Adventurer Is Hard to Find diff --git a/scripts/native/quest/subquest/gridania/SubFst013.cpp b/scripts/native/quest/subquest/gridania/SubFst013.cpp index 7bf4f6da..45f8824f 100644 --- a/scripts/native/quest/subquest/gridania/SubFst013.cpp +++ b/scripts/native/quest/subquest/gridania/SubFst013.cpp @@ -1,4 +1,4 @@ -#include "../../../ScriptObject.h" +#include // Quest Script: SubFst013_00040 // Quest Name: For Friendship From afd439c64f7ff339b3f02f1dcea284075903b948 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 28 Jan 2018 18:48:56 +1100 Subject: [PATCH 23/45] shouts now have correct behaviour --- .../Network/Handlers/PacketHandlers.cpp | 2 +- src/servers/sapphire_zone/Zone/Zone.cpp | 13 +++++++++++++ src/servers/sapphire_zone/Zone/Zone.h | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp index 31495441..bd08e64a 100644 --- a/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp +++ b/src/servers/sapphire_zone/Network/Handlers/PacketHandlers.cpp @@ -516,7 +516,7 @@ void Core::Network::GameConnection::chatHandler( const Packets::GamePacket& inPa } case ChatType::Shout: { - player.getCurrentZone()->queueOutPacketForRange( player, 6000, chatPacket ); + player.getCurrentZone()->queueOutPacket( chatPacket ); break; } default: diff --git a/src/servers/sapphire_zone/Zone/Zone.cpp b/src/servers/sapphire_zone/Zone/Zone.cpp index 1b8cb402..9bda0d64 100644 --- a/src/servers/sapphire_zone/Zone/Zone.cpp +++ b/src/servers/sapphire_zone/Zone/Zone.cpp @@ -362,6 +362,19 @@ void Zone::queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, } } +void Zone::queueOutPacket( Network::Packets::GamePacketPtr pPacketEntry ) +{ + for( auto it = m_playerMap.begin(); it != m_playerMap.end(); ++it ) + { + auto pSession = g_serverZone.getSession( ( *it ).second->getId() ); + if( pSession ) + { + pPacketEntry->setValAt< uint32_t >( 0x08, ( *it ).second->getId() ); + pSession->getZoneConnection()->queueOutPacket( pPacketEntry ); + } + } +} + uint32_t Zone::getTerritoryId() { return m_territoryId; diff --git a/src/servers/sapphire_zone/Zone/Zone.h b/src/servers/sapphire_zone/Zone/Zone.h index c2caa2e3..2837b6ca 100644 --- a/src/servers/sapphire_zone/Zone/Zone.h +++ b/src/servers/sapphire_zone/Zone/Zone.h @@ -86,6 +86,8 @@ public: void queueOutPacketForRange( Entity::Player& sourcePlayer, uint32_t range, Network::Packets::GamePacketPtr pPacketEntry ); + void queueOutPacket( Network::Packets::GamePacketPtr pPacketEntry ); + virtual uint32_t getTerritoryId(); Common::RegionType getType() const; From 99300d746ab55e63002c55755a49ecf0d969f382 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 28 Jan 2018 18:49:29 +1100 Subject: [PATCH 24/45] make the output of territorymgr nicer on startup :ok_hand: --- src/servers/sapphire_zone/Zone/TerritoryMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp index 1c9c3b59..488f1642 100644 --- a/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp +++ b/src/servers/sapphire_zone/Zone/TerritoryMgr.cpp @@ -113,7 +113,8 @@ bool Core::TerritoryMgr::createDefaultTerritories() "\t" + std::to_string( guid ) + "\t" + std::to_string( territoryInfo->territoryIntendedUse ) + "\t" + territoryInfo->name + - "\t" + pPlaceName->name ); + ( territoryInfo->name.length() > 4 ? "\t" : "\t\t" ) + + pPlaceName->name ); ZonePtr pZone( new Zone( territoryId, guid, territoryInfo->name, pPlaceName->name, false ) ); pZone->init(); From dde0a30fa32f494a2fb770f42014c012139d4baf Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 28 Jan 2018 18:52:53 +1100 Subject: [PATCH 25/45] switch debugcommandhandler for scripted implementation --- scripts/native/CMakeLists.txt | 7 +- scripts/native/ScriptLoader.cpp.in | 4 +- scripts/native/debugcommands/Add.cpp | 102 +++ scripts/native/debugcommands/Get.cpp | 31 + scripts/native/debugcommands/Help.cpp | 23 + .../native/debugcommands/InjectChatPacket.cpp | 21 + scripts/native/debugcommands/InjectPacket.cpp | 20 + scripts/native/debugcommands/Nudge.cpp | 56 ++ scripts/native/debugcommands/PreInclude.h | 7 + scripts/native/debugcommands/Replay.cpp | 29 + scripts/native/debugcommands/Script.cpp | 86 +++ scripts/native/debugcommands/ServerInfo.cpp | 17 + scripts/native/debugcommands/Set.cpp | 148 ++++ .../sapphire_zone/DebugCommand/DebugCommand.h | 64 -- .../DebugCommand/DebugCommandHandler.cpp | 657 ------------------ .../DebugCommand/DebugCommandHandler.h | 52 -- .../sapphire_zone/Network/GameConnection.cpp | 2 - .../Network/Handlers/ActionHandler.cpp | 2 - .../Network/Handlers/GMCommandHandlers.cpp | 13 +- .../Network/Handlers/InventoryHandler.cpp | 2 - .../Network/Handlers/PacketHandlers.cpp | 6 +- .../Network/Handlers/SkillHandler.cpp | 2 - .../sapphire_zone/Script/NativeScriptApi.h | 96 ++- .../Script/NativeScriptManager.cpp | 27 + .../Script/NativeScriptManager.h | 15 +- .../sapphire_zone/Script/ScriptManager.cpp | 92 ++- .../sapphire_zone/Script/ScriptManager.h | 4 + src/servers/sapphire_zone/ServerZone.cpp | 3 +- 28 files changed, 770 insertions(+), 818 deletions(-) create mode 100644 scripts/native/debugcommands/Add.cpp create mode 100644 scripts/native/debugcommands/Get.cpp create mode 100644 scripts/native/debugcommands/Help.cpp create mode 100644 scripts/native/debugcommands/InjectChatPacket.cpp create mode 100644 scripts/native/debugcommands/InjectPacket.cpp create mode 100644 scripts/native/debugcommands/Nudge.cpp create mode 100644 scripts/native/debugcommands/PreInclude.h create mode 100644 scripts/native/debugcommands/Replay.cpp create mode 100644 scripts/native/debugcommands/Script.cpp create mode 100644 scripts/native/debugcommands/ServerInfo.cpp create mode 100644 scripts/native/debugcommands/Set.cpp delete mode 100644 src/servers/sapphire_zone/DebugCommand/DebugCommand.h delete mode 100644 src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.cpp delete mode 100644 src/servers/sapphire_zone/DebugCommand/DebugCommandHandler.h diff --git a/scripts/native/CMakeLists.txt b/scripts/native/CMakeLists.txt index aeaa0094..6107d58f 100644 --- a/scripts/native/CMakeLists.txt +++ b/scripts/native/CMakeLists.txt @@ -39,7 +39,7 @@ foreach(_scriptDir ${children}) endforeach() add_library("script_${_name}" MODULE "${SCRIPT_FILES}" "${SCRIPT_INCLUDE_FILES}" "${_scriptDir}/ScriptLoader.cpp") - target_link_libraries("script_${_name}" sapphire_zone) + target_link_libraries("script_${_name}" sapphire_zone common xivdat ${Boost_LIBRARIES}) if(MSVC) set_target_properties("script_${_name}" PROPERTIES @@ -53,6 +53,10 @@ foreach(_scriptDir ${children}) ) endif() + if(EXISTS "${_scriptDir}/PreInclude.h") + set(PreScriptIncludes "#include \"${_scriptDir}/PreInclude.h\"") + endif() + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp") add_custom_command(TARGET "script_${_name}" POST_BUILD @@ -63,5 +67,6 @@ foreach(_scriptDir ${children}) unset(ScriptIncludes) unset(ScriptNames) + unset(PreScriptIncludes) endif() endforeach() diff --git a/scripts/native/ScriptLoader.cpp.in b/scripts/native/ScriptLoader.cpp.in index 633ca309..c5cbc42b 100644 --- a/scripts/native/ScriptLoader.cpp.in +++ b/scripts/native/ScriptLoader.cpp.in @@ -1,7 +1,5 @@ -#include - class ScriptObject; - +@PreScriptIncludes@ @ScriptIncludes@ const ScriptObject* ptrs[] = diff --git a/scripts/native/debugcommands/Add.cpp b/scripts/native/debugcommands/Add.cpp new file mode 100644 index 00000000..41031f7a --- /dev/null +++ b/scripts/native/debugcommands/Add.cpp @@ -0,0 +1,102 @@ +#include +#include +#include +#include +#include + +class Add : public DebugCommandScript +{ +public: + Add() : DebugCommandScript( "add", "Executes ADD command", 1 ) + { } + + virtual void run( Entity::Player& player, const std::string& data, const std::string &subCommand, const std::string ¶ms ) + { + if( subCommand == "status" ) + { + int32_t id; + int32_t duration; + uint16_t param; + + sscanf( params.c_str(), "%d %d %hu", &id, &duration, ¶m ); + + StatusEffect::StatusEffectPtr effect( new StatusEffect::StatusEffect( id, player.getAsPlayer(), player.getAsPlayer(), duration, 3000 ) ); + effect->setParam( param ); + + player.addStatusEffect( effect ); + } + else if( subCommand == "title" ) + { + uint32_t titleId; + sscanf( params.c_str(), "%u", &titleId ); + + player.addTitle( titleId ); + player.sendNotice( "Added title (ID: " + std::to_string( titleId ) + ")" ); + } + else if( subCommand == "spawn" ) + { + int32_t model, name; + + sscanf( params.c_str(), "%d %d", &model, &name ); + + Entity::BattleNpcPtr pBNpc( new Entity::BattleNpc( model, name, player.getPos() ) ); + + auto pZone = player.getCurrentZone(); + pBNpc->setCurrentZone( pZone ); + pZone->pushActor( pBNpc ); + + } + else if( subCommand == "op" ) + { + // temporary research packet + int32_t opcode; + sscanf( params.c_str(), "%x", &opcode ); + Network::Packets::GamePacketPtr pPe( new Network::Packets::GamePacket( opcode, 0x30, player.getId(), player.getId() ) ); + player.queuePacket( pPe ); + } + else if( subCommand == "actrl" ) + { + + // temporary research packet + + int32_t opcode; + int32_t param1; + int32_t param2; + int32_t param3; + int32_t param4; + int32_t param5; + int32_t param6; + int32_t playerId; + + sscanf( params.c_str(), "%x %x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, &playerId ); + + player.sendNotice( "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); + + Network::Packets::ZoneChannelPacket< Network::Packets::Server::FFXIVIpcActorControl143 > actorControl( playerId, player.getId() ); + actorControl.data().category = opcode; + actorControl.data().param1 = param1; + actorControl.data().param2 = param2; + actorControl.data().param3 = param3; + actorControl.data().param4 = param4; + actorControl.data().param5 = param5; + actorControl.data().param6 = param6; + player.queuePacket( actorControl ); + + + /*sscanf(params.c_str(), "%x %x %x %x %x %x %x", &opcode, ¶m1, ¶m2, ¶m3, ¶m4, ¶m5, ¶m6, &playerId); + + Network::Packets::Server::ServerNoticePacket noticePacket( player, "Injecting ACTOR_CONTROL " + std::to_string( opcode ) ); + + player.queuePacket( noticePacket ); + + Network::Packets::Server::ActorControlPacket143 controlPacket( player, opcode, + param1, param2, param3, param4, param5, param6, playerId ); + player.queuePacket( controlPacket );*/ + + } + else + { + player.sendUrgent( subCommand + " is not a valid ADD command." ); + } + } +}; \ No newline at end of file diff --git a/scripts/native/debugcommands/Get.cpp b/scripts/native/debugcommands/Get.cpp new file mode 100644 index 00000000..f20a3abe --- /dev/null +++ b/scripts/native/debugcommands/Get.cpp @@ -0,0 +1,31 @@ +#include + +#include + +class Get : public DebugCommandScript +{ +public: + Get() : DebugCommandScript( "get", "Executes GET commands", 1 ) + { } + + virtual void run( Entity::Player& player, const std::string& data, const std::string& subCommand, const std::string& params ) + { + if( ( subCommand == "pos" ) ) + { + + int16_t map_id = m_objects->m_exd->m_zoneInfoMap[player.getCurrentZone()->getTerritoryId()].map_id; + + player.sendNotice( "Pos:\n" + + std::to_string( player.getPos().x ) + "\n" + + std::to_string( player.getPos().y ) + "\n" + + std::to_string( player.getPos().z ) + "\n" + + std::to_string( player.getRotation() ) + "\nMapId: " + + std::to_string( map_id ) + "\nZoneID: " + + std::to_string(player.getCurrentZone()->getTerritoryId() ) + "\n" ); + } + else + { + player.sendUrgent( subCommand + " is not a valid GET command." ); + } + } +}; \ No newline at end of file diff --git a/scripts/native/debugcommands/Help.cpp b/scripts/native/debugcommands/Help.cpp new file mode 100644 index 00000000..f7ec3947 --- /dev/null +++ b/scripts/native/debugcommands/Help.cpp @@ -0,0 +1,23 @@ +#include + +#include