Add speedbase readling and writing to the level prograssion component and impli proper character versions for fixes (#856)

* Add speed base readling and writing
to the level prograssion component
Add retroactive fix to the  world transfer
TODO: see about versioning charxml fixes to make them not run every time

* version all current changes

* cleanup speed behavior
add calculate for future use in scripts
make < 1 speed multiplier possible
tested wormholer and it plays anims correctly

* cap the lower end of the speed multiplier
until the ending the behavior on hit properly works

* address feedback
add emun for character version
make set ignore multipliers consistent in speed behavior
switch case for char version upgrades

* remove the ability to stack speed boosts

* update value on level ups
This commit is contained in:
Aaron Kimbrell
2022-12-19 13:45:50 -06:00
committed by GitHub
parent f311685dda
commit 157a05239e
9 changed files with 166 additions and 69 deletions

View File

@@ -56,6 +56,7 @@
#include "Player.h"
#include "PropertyManagementComponent.h"
#include "AssetManager.h"
#include "LevelProgressionComponent.h"
#include "eBlueprintSaveResponseType.h"
#include "ZCompression.h"
@@ -993,9 +994,29 @@ void HandlePacket(Packet* packet) {
player->GetComponent<CharacterComponent>()->RocketUnEquip(player);
}
c->SetRetroactiveFlags();
// Do charxml fixes here
auto* levelComponent = player->GetComponent<LevelProgressionComponent>();
if (!levelComponent) return;
player->RetroactiveVaultSize();
auto version = levelComponent->GetCharacterVersion();
switch(version) {
case eCharacterVersion::RELEASE:
// TODO: Implement, super low priority
case eCharacterVersion::LIVE:
Game::logger->Log("WorldServer", "Updating Character Flags");
c->SetRetroactiveFlags();
levelComponent->SetCharacterVersion(eCharacterVersion::PLAYER_FACTION_FLAGS);
case eCharacterVersion::PLAYER_FACTION_FLAGS:
Game::logger->Log("WorldServer", "Updating Vault Size");
player->RetroactiveVaultSize();
levelComponent->SetCharacterVersion(eCharacterVersion::VAULT_SIZE);
case eCharacterVersion::VAULT_SIZE:
Game::logger->Log("WorldServer", "Updaing Speedbase");
levelComponent->SetRetroactiveBaseSpeed();
levelComponent->SetCharacterVersion(eCharacterVersion::UP_TO_DATE);
case eCharacterVersion::UP_TO_DATE:
break;
}
player->GetCharacter()->SetTargetScene("");