mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
remove completed quest properly
This commit is contained in:
parent
fee9ed6b05
commit
52d83465a1
1 changed files with 8 additions and 2 deletions
|
@ -34,7 +34,12 @@ void Sapphire::Entity::Player::finishQuest( uint16_t questId )
|
||||||
void Sapphire::Entity::Player::unfinishQuest( uint16_t questId )
|
void Sapphire::Entity::Player::unfinishQuest( uint16_t questId )
|
||||||
{
|
{
|
||||||
removeQuestsCompleted( questId );
|
removeQuestsCompleted( questId );
|
||||||
sendQuestInfo();
|
|
||||||
|
auto questFinishPacket = makeZonePacket< FFXIVIpcQuestFinish >( getId() );
|
||||||
|
questFinishPacket->data().questId = questId;
|
||||||
|
questFinishPacket->data().flag1 = 0;
|
||||||
|
questFinishPacket->data().flag2 = 1;
|
||||||
|
queuePacket( questFinishPacket );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::Entity::Player::removeQuest( uint16_t questId )
|
void Sapphire::Entity::Player::removeQuest( uint16_t questId )
|
||||||
|
@ -1040,7 +1045,8 @@ void Sapphire::Entity::Player::removeQuestsCompleted( uint32_t questId )
|
||||||
|
|
||||||
uint8_t value = 0x80 >> bitIndex;
|
uint8_t value = 0x80 >> bitIndex;
|
||||||
|
|
||||||
m_questCompleteFlags[ index ] ^= value;
|
if( m_questCompleteFlags[ index ] & value )
|
||||||
|
m_questCompleteFlags[ index ] ^= value;
|
||||||
|
|
||||||
Common::Service< World::Manager::MapMgr >::ref().updateQuests( *this );
|
Common::Service< World::Manager::MapMgr >::ref().updateQuests( *this );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue