mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
Moved retroactive flag check to Character.cpp
This commit is contained in:
parent
a9389fcabf
commit
850ae40f05
@ -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
|
||||
|
@ -1042,11 +1042,8 @@ void HandlePacket(Packet* packet) {
|
||||
EntityManager::Instance()->ConstructAllEntities(packet->systemAddress);
|
||||
|
||||
player->GetComponent<CharacterComponent>()->SetLastRocketConfig(u"");
|
||||
// Retroactive check for if player has joined a faction to set their 'joined a faction' flag to true.
|
||||
if (c->GetPlayerFlag(ePlayerFlags::VENTURE_FACTION) || c->GetPlayerFlag(ePlayerFlags::ASSEMBLY_FACTION) ||
|
||||
c->GetPlayerFlag(ePlayerFlags::PARADOX_FACTION) || c->GetPlayerFlag(ePlayerFlags::SENTINEL_FACTION)) {
|
||||
c->SetPlayerFlag(ePlayerFlags::JOINED_A_FACTION, true);
|
||||
}
|
||||
|
||||
c->SetRetroactiveFlags();
|
||||
|
||||
player->GetCharacter()->SetTargetScene("");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user