mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-08 11:47:45 +00:00
Merge pull request #733 from Taezen/develop
Remove completed quest properly
This commit is contained in:
commit
991e0551c3
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 )
|
||||
{
|
||||
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 )
|
||||
|
@ -1040,6 +1045,7 @@ void Sapphire::Entity::Player::removeQuestsCompleted( uint32_t questId )
|
|||
|
||||
uint8_t value = 0x80 >> bitIndex;
|
||||
|
||||
if( m_questCompleteFlags[ index ] & value )
|
||||
m_questCompleteFlags[ index ] ^= value;
|
||||
|
||||
Common::Service< World::Manager::MapMgr >::ref().updateQuests( *this );
|
||||
|
|
Loading…
Add table
Reference in a new issue