mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 21:43:35 +00:00
Merge pull request #386 from EmosewaMC/passportflagnotbeingset
Added joined a faction flag
This commit is contained in:
commit
e248b74ee6
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1042,6 +1042,9 @@ void HandlePacket(Packet* packet) {
|
||||
EntityManager::Instance()->ConstructAllEntities(packet->systemAddress);
|
||||
|
||||
player->GetComponent<CharacterComponent>()->SetLastRocketConfig(u"");
|
||||
|
||||
c->SetRetroactiveFlags();
|
||||
|
||||
player->GetCharacter()->SetTargetScene("");
|
||||
|
||||
// Fix the destroyable component
|
||||
|
Loading…
Reference in New Issue
Block a user