Fix: Add QUEST_CANCEL packet to manage state reset upon client quest dialog cancelation
This commit is contained in:
@@ -2056,6 +2056,12 @@ void CInputMain::QuestConfirm(LPCHARACTER ch, const void* c_pData)
|
||||
}
|
||||
}
|
||||
|
||||
void CInputMain::QuestCancel(LPCHARACTER ch)
|
||||
{
|
||||
sys_log(0, "QuestCancel from %s pid %u", ch->GetName(), ch->GetPlayerID());
|
||||
quest::CQuestManager::Instance().Cancel(ch->GetPlayerID());
|
||||
}
|
||||
|
||||
void CInputMain::Target(LPCHARACTER ch, const char * pcData)
|
||||
{
|
||||
TPacketCGTarget * p = (TPacketCGTarget *) pcData;
|
||||
@@ -3272,6 +3278,10 @@ int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
|
||||
QuestConfirm(ch, c_pData);
|
||||
break;
|
||||
|
||||
case HEADER_CG_QUEST_CANCEL:
|
||||
QuestCancel(ch);
|
||||
break;
|
||||
|
||||
case HEADER_CG_TARGET:
|
||||
Target(ch, c_pData);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user