diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Choice.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Choice.cpp index dfa4d2a86..25327ecea 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Choice.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Choice.cpp @@ -83,10 +83,11 @@ void CDialogue_Choice::Text(_wstring pText) m_pText = pText; } -void CDialogue_Choice::Type(_int Index, _int Type) +void CDialogue_Choice::Type(_int Index, _int Type, _int QeustID) { m_ChoiceInfo.iChoice = Index; m_ChoiceInfo.iType = Type; + m_ChoiceInfo.QuestID = QeustID; } void CDialogue_Choice::Reset() diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp index 263b7e7aa..5aca71f9d 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Font.cpp @@ -89,15 +89,11 @@ void CDialogue_Font::Update(_float fTimeDelta) break; case ENUM_CLASS(NPCTEXTTYPE::BROOM): - m_bRace = true; - m_pInfoInstance->Event_CallBack(TEXT("RACEREADY"), &m_bRace); - ReSet(); + MapMove(); break; case ENUM_CLASS(NPCTEXTTYPE::BATTLE): - m_bBattle = true; - m_pInfoInstance->Event_CallBack(TEXT("BATTLE"), &m_bBattle); - ReSet(); + MapMove(); break; default: @@ -436,7 +432,45 @@ void CDialogue_Font::ReSet() m_DialoguInfo.push_back((*it)); it = m_pCurrentDialogue.erase(it); } - m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &m_bChoiceText); + if (m_pNpc->Get_NpcID() == 4) + { + m_pInfoInstance->Event_CallBack(TEXT("Change")); + m_pNpc->Set_Flow(m_pNpc->Get_Flow() + 1, 0.f); + m_bCurrentInteract = false; + m_bNpcInteract = false; + } + else + { + NPCINTERACT Interact{}; + Interact.bInteract = false; + Interact.fAlpha = 1.f; + m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact); + m_pNpc->Set_Flow(m_pNpc->Get_Flow() + 1, Interact.fAlpha); + } +} + +void CDialogue_Font::MapMove() +{ + m_pNpc->Set_NextID(m_iTextID); + m_pInfoInstance->Event_CallBack(TEXT("CHOICERESET")); + m_bChoiceText = false; + m_bCurrentChoiceText = false; + m_bRace = false; + m_bBattle = false; + vector<_int> Dummy; + m_NextLevel.swap(Dummy); + for (auto it = m_pCurrentDialogue.begin(); it != m_pCurrentDialogue.end();) + { + (*it)->Set_Hover(false); + (*it)->Visible(false); + m_DialoguInfo.push_back((*it)); + it = m_pCurrentDialogue.erase(it); + } + NPCINTERACT Interact{}; + Interact.bInteract = false; + Interact.fAlpha = 1.5f; + m_pInfoInstance->Event_CallBack(TEXT("NpcInteract"), &Interact); + m_pNpc->Set_Flow(m_pNpc->Get_Flow() + 1, Interact.fAlpha); } void CDialogue_Font::Quest_Complete() @@ -449,11 +483,6 @@ void CDialogue_Font::NextText() m_pCurrentDialogue[0]->Visible(false); m_DialoguInfo.push_back(m_pCurrentDialogue[0]); m_pCurrentDialogue.erase(m_pCurrentDialogue.begin()); - if (m_bChoiceText == true) - { - ReSet(); - } - NpcDialogue(); } diff --git a/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp b/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp index 0aca02259..e4be87e31 100644 --- a/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Dialogue_Panel.cpp @@ -75,7 +75,7 @@ void CDialogue_Panel::Setting_Choice(DIALOGUECHOICEINFO Choice) pChoice->Visible(true); pChoice->Set_Hover(true); pChoice->Text(Choice.pText); - pChoice->Type(m_iChoiceCount, Choice.eType); + pChoice->Type(m_iChoiceCount, Choice.eType, Choice.QuestID); m_CurrentChoices.push_back(pChoice); } @@ -138,6 +138,7 @@ void CDialogue_Panel::ReSet_Choice() void CDialogue_Panel::Change_Map() { + m_pInfoInstance->Load_DADA_INT(); m_pGameInstance->Setting_Volumetirc( 3.f, @@ -212,11 +213,6 @@ void CDialogue_Panel::Change_Map() void CDialogue_Panel::Priority_Update(_float fTimeDelta) { - if (m_pGameInstance->Key_Down(DIK_J)) - { - Change_Map(); - } - if (!__super::Chack_Visible()) { return; @@ -237,20 +233,24 @@ void CDialogue_Panel::Update(_float fTimeDelta) m_fTime += fTimeDelta; } - if (m_fTime >= 1.f) + if (m_fTime >= 1.5f) { - if(m_bBroomRace == true) + if (m_bBroomRace == true) { m_bBroomRace = false; m_pInfoInstance->Event_CallBack(TEXT("BROOMRACENPCINTERACT")); } - else if (m_bBttle == true) + } + + if (m_fTime >= 0.8f) + { + if (m_bBttle == true) { m_bBttle = false; Change_Map(); } } - + __super::Update(fTimeDelta); } diff --git a/Jusin154_Team3D/Client/Private/Quest_Data.cpp b/Jusin154_Team3D/Client/Private/Quest_Data.cpp index d4aff28b1..8f1df5b56 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Data.cpp @@ -152,6 +152,8 @@ _int CQuest_Data::Get_Count(_int Index) _int CQuest_Data::Set_AcceptQuest(_int Index) { + if (Index == -1) + return -1; if (QuestInfos[Index].iAcceptState == ENUM_CLASS(QUESTSTATE::ACCEPTED)) { return 1; diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index 020c5c0ce..59f683047 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -86,7 +86,7 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pSpell_Canvas)->Visible(false); static_cast(m_pQuest_Canvas)->Visible(false); static_cast(m_pSpellLearn_Canvas)->Visible(false); - static_cast(m_pDialogue_Canvas)->Visible(false); + static_cast(m_pDialogue_Canvas)->Visible(true); static_cast(m_pInteraction_Key)->Set_Visible(true); static_cast(m_pBroom_TargetGate)->Set_Visible(false); if (m_bRace == false) @@ -330,11 +330,6 @@ void CUI_Manager::Update(_float fTimeDelta) } } - if (m_bBattle == true) - { - if (m_fAlpha >= 1.f) - Change_Map(); - } if (m_pGameInstance->Key_Down(DIK_M) && m_pGameInstance->Key_Pressing(DIK_L)) Set_Enviroment(); diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Choice.h b/Jusin154_Team3D/Client/Public/Dialogue_Choice.h index 9747e83d1..bac253377 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Choice.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Choice.h @@ -36,7 +36,7 @@ class CDialogue_Choice final : public CElementObject void Mouse_Hover(); void Up(); void Text(_wstring pText); - void Type(_int Index, _int Type); + void Type(_int Index, _int Type, _int QeustID); void Reset(); private: diff --git a/Jusin154_Team3D/Client/Public/Dialogue_Font.h b/Jusin154_Team3D/Client/Public/Dialogue_Font.h index d5bdc5da4..751bfd68f 100644 --- a/Jusin154_Team3D/Client/Public/Dialogue_Font.h +++ b/Jusin154_Team3D/Client/Public/Dialogue_Font.h @@ -63,7 +63,7 @@ class CDialogue_Font final : public CGameObject void SpellLearn(); void Quest(); void ReSet(); - + void MapMove(); void Quest_Complete(); private: CInfoInstance* m_pInfoInstance = { nullptr }; @@ -96,7 +96,6 @@ class CDialogue_Font final : public CGameObject _bool m_bBattle = { false }; _float m_fTime{}; - public: static CDialogue_Font* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Interaction_Key.h b/Jusin154_Team3D/Client/Public/Interaction_Key.h index e73e6389e..f22a87d23 100644 --- a/Jusin154_Team3D/Client/Public/Interaction_Key.h +++ b/Jusin154_Team3D/Client/Public/Interaction_Key.h @@ -38,6 +38,7 @@ class CInteraction_Key final : public CGameObject _bool m_bActive = { false }; _bool m_bAtteckTrigger = { false }; + _bool m_bCurrentTarget = { false }; _float3 m_fSize{}; _float m_fAlpha{}; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Elf.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Elf.xml index 78e433b1e..5d1d95661 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Elf.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/AnimList/Elf.xml @@ -3,7 +3,7 @@ - + @@ -16,8 +16,8 @@ - - + + @@ -25,31 +25,35 @@ - + - - + + + + + + - + - + - + - + - + \ No newline at end of file diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/ElfPos/ElfPos.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/ElfPos/ElfPos.xml index 39e955e5a..f8d6527fb 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/ElfPos/ElfPos.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/ElfPos/ElfPos.xml @@ -24,16 +24,15 @@ - - + - + @@ -54,13 +53,13 @@ - + - + @@ -78,9 +77,13 @@ + + + + + + - - diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml index a9833238c..8217edf7b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Stat/Stat.xml @@ -1,5 +1,5 @@  - +