Skip to content

Commit

Permalink
Fixed WeekendRates source
Browse files Browse the repository at this point in the history
  • Loading branch information
Michidu committed Aug 5, 2018
1 parent 81b9df1 commit 2a9b22c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions WeekendRates/WeekendRates/WeekendRatesCommands.h
Expand Up @@ -4,8 +4,8 @@

inline void ReloadConfig(AShooterPlayerController* player, FString* message, int mode)
{
if (!player || !player->PlayerStateField()() || !player->GetPlayerCharacter() ||
!player->GetPlayerCharacter()->bIsServerAdminField()())
if (!player || !player->PlayerStateField() || !player->GetPlayerCharacter() ||
!player->GetPlayerCharacter()->bIsServerAdminField())
return;

InitConfig();
Expand Down
32 changes: 16 additions & 16 deletions WeekendRates/WeekendRates/WeekendRatesHooks.h
Expand Up @@ -29,7 +29,7 @@ inline bool RatesEnabledManually, HasStarted = false;

inline void ToggleWeekendRates(AShooterPlayerController* player, FString* message, int mode)
{
if (!player->GetPlayerCharacter() || !player->GetPlayerCharacter()->bIsServerAdminField()() || WeekendRatesEnabled)
if (!player->GetPlayerCharacter() || !player->GetPlayerCharacter()->bIsServerAdminField() || WeekendRatesEnabled)
return;

RatesEnabledManually = !RatesEnabledManually;
Expand All @@ -48,79 +48,79 @@ inline void EnableRates()
{
AShooterGameMode* GameMode = ArkApi::GetApiUtils().GetShooterGameMode();

OldValues[0] = GameMode->XPMultiplierField()();
OldValues[0] = GameMode->XPMultiplierField();
const float XPMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["XPMultiplier"]);
if (XPMultiplier != 0)
GameMode->XPMultiplierField() = XPMultiplier;

OldValues[1] = GameMode->TamingSpeedMultiplierField()();
OldValues[1] = GameMode->TamingSpeedMultiplierField();
const float TamingSpeedMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["TamingSpeedMultiplier"]);
if (TamingSpeedMultiplier != 0)
GameMode->TamingSpeedMultiplierField() = TamingSpeedMultiplier;

OldValues[2] = GameMode->HarvestAmountMultiplierField()();
OldValues[2] = GameMode->HarvestAmountMultiplierField();
const float HarvestAmountMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["HarvestAmountMultiplier"]);
if (HarvestAmountMultiplier != 0)
GameMode->HarvestAmountMultiplierField() = HarvestAmountMultiplier;

OldValues[3] = GameMode->HarvestHealthMultiplierField()();
OldValues[3] = GameMode->HarvestHealthMultiplierField();
const float HarvestHealthMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["HarvestHealthMultiplier"]);
if (HarvestHealthMultiplier != 0)
GameMode->HarvestHealthMultiplierField() = HarvestHealthMultiplier;

OldValues[4] = GameMode->CraftXPMultiplierField()();
OldValues[4] = GameMode->CraftXPMultiplierField();
const float CraftXPMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["CraftXPMultiplier"]);
if (CraftXPMultiplier != 0)
GameMode->CraftXPMultiplierField() = CraftXPMultiplier;

OldValues[5] = GameMode->FishingLootQualityMultiplierField()();
OldValues[5] = GameMode->FishingLootQualityMultiplierField();
const float FishingLootQuality = static_cast<float>(WeekendConfig["WeekendRates"]["FishingLootQualityMultiplier"]);
if (FishingLootQuality != 0)
GameMode->FishingLootQualityMultiplierField() = FishingLootQuality;

OldValues[6] = GameMode->BabyMatureSpeedMultiplierField()();
OldValues[6] = GameMode->BabyMatureSpeedMultiplierField();
const float BabyMatureSpeed = static_cast<float>(WeekendConfig["WeekendRates"]["BabyMatureSpeedMultiplier"]);
if (BabyMatureSpeed != 0)
GameMode->BabyMatureSpeedMultiplierField() = BabyMatureSpeed;

OldValues[7] = GameMode->MateBoostEffectMultiplierField()();
OldValues[7] = GameMode->MateBoostEffectMultiplierField();
const float MateBoostEffect = static_cast<float>(WeekendConfig["WeekendRates"]["MateBoostEffectMultiplier"]);
if (MateBoostEffect != 0)
GameMode->MateBoostEffectMultiplierField() = MateBoostEffect;

OldValues[8] = GameMode->MatingIntervalMultiplierField()();
OldValues[8] = GameMode->MatingIntervalMultiplierField();
const float MatingIntervalMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["MatingIntervalMultiplier"]);
if (MatingIntervalMultiplier != 0)
GameMode->MatingIntervalMultiplierField() = MatingIntervalMultiplier;

OldValues[9] = GameMode->MatingSpeedMultiplierField()();
OldValues[9] = GameMode->MatingSpeedMultiplierField();
const float MatingSpeedMultiplier = static_cast<float>(WeekendConfig["WeekendRates"]["MatingSpeedMultiplier"]);
if (MatingSpeedMultiplier != 0)
GameMode->MatingSpeedMultiplierField() = MatingSpeedMultiplier;

OldValues[10] = GameMode->EggHatchSpeedMultiplierField()();
OldValues[10] = GameMode->EggHatchSpeedMultiplierField();
const float EggHatchSpeed = static_cast<float>(WeekendConfig["WeekendRates"]["EggHatchSpeedMultiplier"]);
if (EggHatchSpeed != 0)
GameMode->EggHatchSpeedMultiplierField() = EggHatchSpeed;

OldValues[11] = GameMode->LayEggIntervalMultiplierField()();
OldValues[11] = GameMode->LayEggIntervalMultiplierField();
const float LayEggInterval = static_cast<float>(WeekendConfig["WeekendRates"]["LayEggIntervalMultiplier"]);
if (LayEggInterval != 0)
GameMode->LayEggIntervalMultiplierField() = LayEggInterval;

OldValues[12] = GameMode->ResourcesRespawnPeriodMultiplierField()();
OldValues[12] = GameMode->ResourcesRespawnPeriodMultiplierField();
const float ResourcesRespawnPeriod = static_cast<float>(WeekendConfig["WeekendRates"][
"ResourcesRespawnPeriodMultiplier"]);
if (ResourcesRespawnPeriod != 0)
GameMode->ResourcesRespawnPeriodMultiplierField() = ResourcesRespawnPeriod;

OldValues[13] = GameMode->SupplyCrateLootQualityMultiplierField()();
OldValues[13] = GameMode->SupplyCrateLootQualityMultiplierField();
const float SupplyCrateLootQuality = static_cast<float>(WeekendConfig["WeekendRates"][
"SupplyCrateLootQualityMultiplier"]);
if (SupplyCrateLootQuality != 0)
GameMode->SupplyCrateLootQualityMultiplierField() = SupplyCrateLootQuality;

OldValues[14] = GameMode->StructureResistanceMultiplierField()();
OldValues[14] = GameMode->StructureResistanceMultiplierField();
const float StructureResistance = static_cast<float>(WeekendConfig["WeekendRates"].value(
"StructureResistanceMultiplier", 0));
if (StructureResistance != 0)
Expand Down
Binary file removed WeekendRates/x64/Release/WeekendRates 1.3.zip
Binary file not shown.

0 comments on commit 2a9b22c

Please sign in to comment.