1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 22:37:45 +00:00

Merge pull request #247 from GokuWeedLord/develop

hierachyId dump + scripts structure cleanup
This commit is contained in:
Mordred 2018-02-08 15:30:28 +01:00 committed by GitHub
commit 1f40bcf91b
13 changed files with 13 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#include "../ScriptObject.h" #include <ScriptObject.h>
class OpeningGridania : public EventScript class OpeningGridania : public EventScript
{ {

View file

@ -1,4 +1,4 @@
#include "../ScriptObject.h" #include <ScriptObject.h>
// Opening Script: OpeningLimsaLominsa // Opening Script: OpeningLimsaLominsa
// Quest Name: OpeningLimsaLominsa // Quest Name: OpeningLimsaLominsa

View file

@ -1,4 +1,4 @@
#include "../ScriptObject.h" #include <ScriptObject.h>
class OpeningUldah : public EventScript class OpeningUldah : public EventScript
{ {

View file

@ -102,6 +102,7 @@ void Core::InstanceContent::onUpdate( uint32_t currTime )
} }
m_state = DutyInProgress; m_state = DutyInProgress;
m_instanceExpireTime = Util::getTimeSeconds() + ( m_instanceContentInfo->timeLimitmin * 60u );
break; break;
} }

View file

@ -46,6 +46,8 @@ private:
uint32_t m_instanceContentId; uint32_t m_instanceContentId;
InstanceContentState m_state; InstanceContentState m_state;
int64_t m_instanceExpireTime;
}; };
} }

View file

@ -174,7 +174,8 @@ public:
struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER struct LGB_EOBJ_HEADER : public LGB_ENTRY_HEADER
{ {
uint32_t eobjId; uint32_t eobjId;
uint8_t unknown1[0x10]; uint32_t levelHierachyId;
uint8_t unknown1[0xC];
}; };
class LGB_EOBJ_ENTRY : public LGB_ENTRY class LGB_EOBJ_ENTRY : public LGB_ENTRY

View file

@ -238,6 +238,7 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj )
uint32_t unknown = 0, unknown2 = 0; uint32_t unknown = 0, unknown2 = 0;
std::string name; std::string name;
std::string typeStr; std::string typeStr;
uint32_t eobjlevelHierachyId = 0;
if( pObj->getType() == LgbEntryType::EventObject ) if( pObj->getType() == LgbEntryType::EventObject )
{ {
@ -246,6 +247,7 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj )
unknown = pEobj->header.unknown; unknown = pEobj->header.unknown;
name = eobjNameMap[id]; name = eobjNameMap[id];
typeStr = eobjStr; typeStr = eobjStr;
eobjlevelHierachyId = pEobj->header.levelHierachyId;
} }
else if( pObj->getType() == LgbEntryType::MapRange ) else if( pObj->getType() == LgbEntryType::MapRange )
{ {
@ -257,8 +259,9 @@ void writeEobjEntry( std::ofstream& out, LGB_ENTRY* pObj )
} }
std::string outStr( std::string outStr(
std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " + std::to_string( unknown ) + ", " + std::to_string( unknown2 ) + ", " + std::to_string( id ) + ", " + typeStr + "\"" + name + "\", " +
std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) + "\n" std::to_string( pObj->header.translation.x ) + ", " + std::to_string( pObj->header.translation.y ) + ", " + std::to_string( pObj->header.translation.z ) +
", " + std::to_string( eobjlevelHierachyId ) + "\n"
); );
out.write( outStr.c_str(), outStr.size() ); out.write( outStr.c_str(), outStr.size() );
} }