mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
minor changes for the map implementation
This commit is contained in:
parent
e8c7c83197
commit
55247a41f6
5 changed files with 11 additions and 13 deletions
|
@ -931,7 +931,6 @@ namespace Sapphire::Network::Packets::Server
|
||||||
uint32_t unknown9;
|
uint32_t unknown9;
|
||||||
uint32_t unknown10;
|
uint32_t unknown10;
|
||||||
uint32_t festivalId;
|
uint32_t festivalId;
|
||||||
uint32_t unknown11;
|
|
||||||
uint32_t unknown12[3];
|
uint32_t unknown12[3];
|
||||||
uint32_t additionalFestivalId;
|
uint32_t additionalFestivalId;
|
||||||
uint32_t unknown13[3];
|
uint32_t unknown13[3];
|
||||||
|
|
|
@ -731,7 +731,7 @@ void Sapphire::Entity::Player::learnSong( uint8_t songId, uint32_t itemId )
|
||||||
queuePacket( makeActorControlSelf( getId(), ToggleOrchestrionUnlock, songId, 1, itemId ) );
|
queuePacket( makeActorControlSelf( getId(), ToggleOrchestrionUnlock, songId, 1, itemId ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::Entity::Player::isActionLearned( uint16_t actionId ) const
|
bool Sapphire::Entity::Player::isActionLearned( uint32_t actionId ) const
|
||||||
{
|
{
|
||||||
uint16_t index;
|
uint16_t index;
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
|
@ -1287,7 +1287,7 @@ const uint8_t* Sapphire::Entity::Player::getMountGuideBitmask() const
|
||||||
return m_mountGuide;
|
return m_mountGuide;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool Sapphire::Entity::Player::hasMount( int16_t mountId ) const
|
const bool Sapphire::Entity::Player::hasMount( uint32_t mountId ) const
|
||||||
{
|
{
|
||||||
auto& exdData = Common::Service< Data::ExdDataGenerated >::ref();
|
auto& exdData = Common::Service< Data::ExdDataGenerated >::ref();
|
||||||
auto mount = exdData.get< Data::Mount >( mountId );
|
auto mount = exdData.get< Data::Mount >( mountId );
|
||||||
|
|
|
@ -646,7 +646,7 @@ namespace Sapphire::Entity
|
||||||
void learnSong( uint8_t songId, uint32_t itemId );
|
void learnSong( uint8_t songId, uint32_t itemId );
|
||||||
|
|
||||||
/*! check if an action is already unlocked in the bitmask. */
|
/*! check if an action is already unlocked in the bitmask. */
|
||||||
bool isActionLearned( uint16_t actionId ) const;
|
bool isActionLearned( uint32_t actionId ) const;
|
||||||
|
|
||||||
/*! return a const pointer to the unlock bitmask array */
|
/*! return a const pointer to the unlock bitmask array */
|
||||||
const uint8_t* getUnlockBitmask() const;
|
const uint8_t* getUnlockBitmask() const;
|
||||||
|
@ -657,7 +657,7 @@ namespace Sapphire::Entity
|
||||||
/*! return a const pointer to the mount guide bitmask array */
|
/*! return a const pointer to the mount guide bitmask array */
|
||||||
const uint8_t* getMountGuideBitmask() const;
|
const uint8_t* getMountGuideBitmask() const;
|
||||||
|
|
||||||
const bool hasMount( int16_t mountId ) const;
|
const bool hasMount( uint32_t mountId ) const;
|
||||||
|
|
||||||
bool checkAction() override;
|
bool checkAction() override;
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,7 @@ Sapphire::World::Manager::MapMgr::MapMgr()
|
||||||
for( int32_t i = 0; i <= Common::CLASSJOB_TOTAL; i++ )
|
for( int32_t i = 0; i <= Common::CLASSJOB_TOTAL; i++ )
|
||||||
questData.classJobRequirements[ 1 ].classJobCategoryMask.set( i, ( &classJobsCategory->aDV )[ i ] );
|
questData.classJobRequirements[ 1 ].classJobCategoryMask.set( i, ( &classJobsCategory->aDV )[ i ] );
|
||||||
|
|
||||||
questData.column18 = exdData.getField< uint8_t >( quest.second, 18 );
|
questData.classJobUnlockFlag = exdData.getField< uint8_t >( quest.second, 18 );
|
||||||
|
|
||||||
questData.classJobUnlock = exdData.getField< uint8_t >( quest.second, 19 );
|
questData.classJobUnlock = exdData.getField< uint8_t >( quest.second, 19 );
|
||||||
|
|
||||||
questData.requiredGC = exdData.getField< uint8_t >( quest.second, 20 );
|
questData.requiredGC = exdData.getField< uint8_t >( quest.second, 20 );
|
||||||
|
@ -331,10 +330,10 @@ bool Sapphire::World::Manager::MapMgr::isQuestAvailable( Entity::Player& player,
|
||||||
|
|
||||||
if( quest.classJobUnlock )
|
if( quest.classJobUnlock )
|
||||||
{
|
{
|
||||||
if( quest.column18 == 3 )
|
if( quest.classJobUnlockFlag == 3 )
|
||||||
if( static_cast< uint8_t >( player.getClass() ) != quest.classJobUnlock )
|
if( static_cast< uint8_t >( player.getClass() ) != quest.classJobUnlock )
|
||||||
return false;
|
return false;
|
||||||
else if( quest.column18 == 4 )
|
else if( quest.classJobUnlockFlag == 4 )
|
||||||
if ( static_cast< uint8_t >( player.getClass() ) == quest.classJobUnlock )
|
if ( static_cast< uint8_t >( player.getClass() ) == quest.classJobUnlock )
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
|
@ -359,7 +358,7 @@ bool Sapphire::World::Manager::MapMgr::isQuestAvailable( Entity::Player& player,
|
||||||
|
|
||||||
if( eventData.first == 65968 ) // Quest: A Legend for a Legend
|
if( eventData.first == 65968 ) // Quest: A Legend for a Legend
|
||||||
{
|
{
|
||||||
uint16_t requiredMounts[] = { 28, 29, 30, 31, 40, 43 };
|
uint32_t requiredMounts[] = { 28, 29, 30, 31, 40, 43 };
|
||||||
|
|
||||||
for( int32_t i = 0; i < 6; i++ )
|
for( int32_t i = 0; i < 6; i++ )
|
||||||
{
|
{
|
||||||
|
@ -369,7 +368,7 @@ bool Sapphire::World::Manager::MapMgr::isQuestAvailable( Entity::Player& player,
|
||||||
}
|
}
|
||||||
else if( eventData.first == 67086 ) // Quest: Fiery Wings, Fiery Hearts
|
else if( eventData.first == 67086 ) // Quest: Fiery Wings, Fiery Hearts
|
||||||
{
|
{
|
||||||
uint16_t requiredMounts[] = { 75, 76, 77, 78, 90, 98, 104 };
|
uint32_t requiredMounts[] = { 75, 76, 77, 78, 90, 98, 104 };
|
||||||
|
|
||||||
for( int32_t i = 0; i < 6; i++ )
|
for( int32_t i = 0; i < 6; i++ )
|
||||||
{
|
{
|
||||||
|
@ -379,7 +378,7 @@ bool Sapphire::World::Manager::MapMgr::isQuestAvailable( Entity::Player& player,
|
||||||
}
|
}
|
||||||
else if( eventData.first == 68736 ) // Quest: A Lone Wolf No More
|
else if( eventData.first == 68736 ) // Quest: A Lone Wolf No More
|
||||||
{
|
{
|
||||||
uint16_t requiredMounts[] = { 115, 116, 133, 144, 158, 172, 182 };
|
uint32_t requiredMounts[] = { 115, 116, 133, 144, 158, 172, 182 };
|
||||||
|
|
||||||
for( int32_t i = 0; i < 6; i++ )
|
for( int32_t i = 0; i < 6; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace Sapphire::World::Manager
|
||||||
uint16_t classJobLevel;
|
uint16_t classJobLevel;
|
||||||
} classJobRequirements[2];
|
} classJobRequirements[2];
|
||||||
|
|
||||||
uint8_t column18;
|
uint8_t classJobUnlockFlag;
|
||||||
uint8_t classJobUnlock;
|
uint8_t classJobUnlock;
|
||||||
|
|
||||||
uint8_t requiredGC;
|
uint8_t requiredGC;
|
||||||
|
|
Loading…
Add table
Reference in a new issue