Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ArkHomes/ArkHomes/ArkHomes.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions ArkShop/ArkShop/Private/Store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,12 @@ namespace ArkShop::Store
const int min_level = item_entry.value("MinLevel", 1);
const int max_level = item_entry.value("MaxLevel", 999);

auto* primal_character = static_cast<APrimalCharacter*>(player_controller->CharacterField());
auto* primal_character = player_controller->LastControlledPlayerCharacterField().Get();
if (!primal_character)
return false;
UPrimalCharacterStatusComponent* char_component = primal_character->MyCharacterStatusComponentField();

const int level = char_component->BaseCharacterLevelField() + char_component->ExtraCharacterLevelField();
const int level = char_component->GetCharacterLevel();
if (level < min_level || level > max_level)
{
ArkApi::GetApiUtils().SendChatMessage(player_controller, GetText("Sender"),
Expand Down