From fe6d559697e2aa6834aa5b2bd2ef31d701cfcf8d Mon Sep 17 00:00:00 2001 From: HappyTanuki Date: Tue, 10 Oct 2023 23:59:57 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EC=8A=A4=ED=8A=B8=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content/Character/Lb/BP_Lb.uasset | 4 ++-- Content/Maps/DevMap.umap | 2 +- .../PlayerGeneric/DefaultPlayerController.cpp | 22 +++++++++---------- Source/Promether/PrometherEnum.h | 6 ++++- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Content/Character/Lb/BP_Lb.uasset b/Content/Character/Lb/BP_Lb.uasset index 857598b..1418d02 100644 --- a/Content/Character/Lb/BP_Lb.uasset +++ b/Content/Character/Lb/BP_Lb.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af8ae252c9b8cd47cafe54310152a948f91a319908354e647ac01ff55eda5742 -size 191286 +oid sha256:a1a85727e67bcf386aefe203a239fe15a2715da7498c43d19da5c02ed20ed9db +size 191159 diff --git a/Content/Maps/DevMap.umap b/Content/Maps/DevMap.umap index a24a0e4..ca710ed 100644 --- a/Content/Maps/DevMap.umap +++ b/Content/Maps/DevMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f46b903c2ef351cfb9a072b4eaba94a919ffce5ca3af282703d387f15a4e5b2e +oid sha256:e2f707b55fdf84bad9d63f0e665ec79a1bb0a76bffda43d7908d8db6b26ee688 size 115131 diff --git a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp index 7bebdfe..78a29f8 100644 --- a/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp +++ b/Source/Promether/PlayerGeneric/DefaultPlayerController.cpp @@ -246,8 +246,8 @@ void ADefaultPlayerController::SetupInputComponent() void ADefaultPlayerController::Skill1() { - //if (!(GetPlayerState()->Stats.Mana >= 100)) - // return; + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill1Cost])) + return; FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -265,6 +265,9 @@ void ADefaultPlayerController::Skill1() void ADefaultPlayerController::Skill2() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill2Cost])) + return; + FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -281,6 +284,9 @@ void ADefaultPlayerController::Skill2() void ADefaultPlayerController::Skill3() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill3Cost])) + return; + FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -297,6 +303,9 @@ void ADefaultPlayerController::Skill3() void ADefaultPlayerController::Skill4Triggered() { + if (!(GetPlayerState()->Stats[(uint8)EStats::Mana] >= GetPlayerState()->Stats[(uint8)EStats::Skill4Cost])) + return; + FVector Location = GetPawn()->GetActorLocation(); Location.Z = 0; @@ -313,15 +322,6 @@ void ADefaultPlayerController::Skill4Triggered() void ADefaultPlayerController::Skill4Completed() { - FVector Location = GetPawn()->GetActorLocation(); - Location.Z = 0; - - Server_StopMove(); - Multicast_StopMove(); - - Multicast_SetRotation(GetMouseHitLocation()); - Server_SetRotation(GetMouseHitLocation()); - UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed")); GetPlayerState()->SetState(ECharacterState::Attack); GetPlayerState()->SetAttackType(CooldownType::Skill4Comlpleted); diff --git a/Source/Promether/PrometherEnum.h b/Source/Promether/PrometherEnum.h index a2bdd20..e2d31e4 100644 --- a/Source/Promether/PrometherEnum.h +++ b/Source/Promether/PrometherEnum.h @@ -96,7 +96,7 @@ enum class EStats : uint8 { Health, HPRegeneration, - HealAndShieldpower, + HealAndShieldpower, Armor, MagicResistance, Tenacity, @@ -127,5 +127,9 @@ enum class EStats : uint8 HealthRegenerationGrowth, ManaGrowth, ManaRegenerationGrowth, + Skill1Cost, + Skill2Cost, + Skill3Cost, + Skill4Cost, SIZE }; \ No newline at end of file