diff --git a/dGame/Character.cpp b/dGame/Character.cpp index 4383ee46..d396382c 100644 --- a/dGame/Character.cpp +++ b/dGame/Character.cpp @@ -451,6 +451,13 @@ bool Character::GetPlayerFlag(const uint32_t flagId) const { return false; //by def, return false. } +void Character::SetRetroactiveFlags() { + // Retroactive check for if player has joined a faction to set their 'joined a faction' flag to true. + if (GetPlayerFlag(ePlayerFlags::VENTURE_FACTION) || GetPlayerFlag(ePlayerFlags::ASSEMBLY_FACTION) || GetPlayerFlag(ePlayerFlags::PARADOX_FACTION) || GetPlayerFlag(ePlayerFlags::SENTINEL_FACTION)) { + SetPlayerFlag(ePlayerFlags::JOINED_A_FACTION, true); + } +} + void Character::SaveXmlRespawnCheckpoints() { //Export our respawn points: diff --git a/dGame/Character.h b/dGame/Character.h index 61017ccb..9678eb3d 100644 --- a/dGame/Character.h +++ b/dGame/Character.h @@ -413,6 +413,12 @@ public: */ void SendMuteNotice() const; + /** + * Sets any flags that are meant to have been set that may not have been set due to them being + * missing in a previous patch. + */ + void SetRetroactiveFlags(); + /** * Get the equipped items for this character, only used for character creation * @return the equipped items for this character on world load diff --git a/dScripts/NsGetFactionMissionServer.cpp b/dScripts/NsGetFactionMissionServer.cpp index 99f2f838..d4d03243 100644 --- a/dScripts/NsGetFactionMissionServer.cpp +++ b/dScripts/NsGetFactionMissionServer.cpp @@ -44,6 +44,7 @@ void NsGetFactionMissionServer::OnRespondToMission(Entity* self, int missionID, } if (flagID != -1) { + player->GetCharacter()->SetPlayerFlag(ePlayerFlags::JOINED_A_FACTION, true); player->GetCharacter()->SetPlayerFlag(flagID, true); } diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index 2a6cbaa5..53abfd7a 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -1042,6 +1042,9 @@ void HandlePacket(Packet* packet) { EntityManager::Instance()->ConstructAllEntities(packet->systemAddress); player->GetComponent()->SetLastRocketConfig(u""); + + c->SetRetroactiveFlags(); + player->GetCharacter()->SetTargetScene(""); // Fix the destroyable component