Bugfix Quest System for Pendant Quest
This commit is contained in:
parent
5682929e82
commit
0d7e8c5187
BIN
Content/Assets/Characters/Merchant/AMerchant.uasset
(Stored with Git LFS)
BIN
Content/Assets/Characters/Merchant/AMerchant.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Quests/Quest_SistersPendant.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Quests/Quest_SistersPendant.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Quests/Quest_SistersPendant_PT2.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Quests/Quest_SistersPendant_PT2.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Dialogue/SM_Merchant_Blueprint.uasset
(Stored with Git LFS)
BIN
Content/Dialogue/SM_Merchant_Blueprint.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
@ -60,8 +60,9 @@ void UDialogueNPC::NextDialogue()
|
|||||||
NextArrow->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
NextArrow->SetVisibility(ESlateVisibility::SelfHitTestInvisible);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (CurrentDialogueStringPath[FMath::Clamp(DialogueIndex + 1, 0, CurrentDialogueStringPath.Num() - 1)].Mid(0, 2) == "##")
|
if (CurrentDialogueStringPath[FMath::Clamp(DialogueIndex + 1, 0, CurrentDialogueStringPath.Num() - 1)].Mid(0, 2) == "--")
|
||||||
{
|
{
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("DialogueIndex: %d"), UKismetStringLibrary::Conv_StringToInt(CurrentDialogueStringPath[DialogueIndex].RightChop(3)));
|
||||||
Cast<UQuestSystem>(GetWorld()->GetFirstPlayerController()->GetPawn()->GetComponentByClass(UQuestSystem::StaticClass()))->AddQuest(Quests[UKismetStringLibrary::Conv_StringToInt(CurrentDialogueStringPath[DialogueIndex].RightChop(3))]);
|
Cast<UQuestSystem>(GetWorld()->GetFirstPlayerController()->GetPawn()->GetComponentByClass(UQuestSystem::StaticClass()))->AddQuest(Quests[UKismetStringLibrary::Conv_StringToInt(CurrentDialogueStringPath[DialogueIndex].RightChop(3))]);
|
||||||
DialogueIndex++;
|
DialogueIndex++;
|
||||||
}
|
}
|
||||||
@ -142,6 +143,9 @@ void UDialogueNPC::TickComponent(float DeltaTime, ELevelTick TickType, FActorCom
|
|||||||
void UDialogueNPC::StartDialogue()
|
void UDialogueNPC::StartDialogue()
|
||||||
{
|
{
|
||||||
Quests.Empty();
|
Quests.Empty();
|
||||||
|
BlueprintFunctions.Empty();
|
||||||
|
ItemIndexes.Empty();
|
||||||
|
QuestFlags.Empty();
|
||||||
FOutputDeviceNull AR;
|
FOutputDeviceNull AR;
|
||||||
const FString Command = FString::Printf(TEXT("SetRootDialoguePath"));
|
const FString Command = FString::Printf(TEXT("SetRootDialoguePath"));
|
||||||
GetOwner()->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
GetOwner()->CallFunctionByNameWithArguments(*Command, AR, nullptr, true);
|
||||||
@ -216,7 +220,7 @@ void UDialogueNPC::AddChoices(UDialoguePath* ParentPath, FText ChoiceText1, FTex
|
|||||||
|
|
||||||
UDialoguePath* UDialogueNPC::AddQuest(UDialoguePath* DialoguePath, UQuest* Quest)
|
UDialoguePath* UDialogueNPC::AddQuest(UDialoguePath* DialoguePath, UQuest* Quest)
|
||||||
{
|
{
|
||||||
DialoguePath->Dialogue.Add(FText::FromString("## " + Quests.Num()).ToString());
|
DialoguePath->Dialogue.Add(FText::FromString("-- " + FString::FromInt(Quests.Num())).ToString());
|
||||||
Quests.Add(Quests.Num(), Quest);
|
Quests.Add(Quests.Num(), Quest);
|
||||||
return DialoguePath;
|
return DialoguePath;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user