Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
78 lines
2.9 KiB
C++
78 lines
2.9 KiB
C++
#include "stdafx.h"
|
|
#include "ParseQuest.h"
|
|
#include "GMMemory.h"
|
|
|
|
|
|
unsigned long ParsePacket::HandleCharStartQuest(PktBase* lpPktBase, unsigned long *dwCharID_Out,
|
|
unsigned long *dwNPCID_Out, unsigned short *wQuestID_Out)
|
|
{
|
|
PktStartQuest* lpPktStartQuest = static_cast<PktStartQuest*>(lpPktBase);
|
|
|
|
*dwCharID_Out = lpPktStartQuest->m_dwCharID;
|
|
*dwNPCID_Out = lpPktStartQuest->m_dwNPCID;
|
|
*wQuestID_Out = lpPktStartQuest->m_wQuestID;
|
|
|
|
return lpPktStartQuest->GetError();
|
|
}
|
|
|
|
|
|
unsigned long ParsePacket::HandleCharCancelQuest(PktBase* lpPktBase, unsigned long *dwCharID_Out,
|
|
unsigned short *wQuestID_Out)
|
|
{
|
|
PktCancelQuest* lpPktCancelQuest = static_cast<PktCancelQuest*>(lpPktBase);
|
|
|
|
*dwCharID_Out = lpPktCancelQuest->m_dwCharID;
|
|
*wQuestID_Out = lpPktCancelQuest->m_wQuestID;
|
|
|
|
return lpPktCancelQuest->GetError();
|
|
}
|
|
|
|
|
|
unsigned long ParsePacket::HandleCharOperateTrigger(PktBase* lpPktBase, unsigned long *dwCharID_Out,
|
|
unsigned short *wQuestID_Out, unsigned char *cPhase_Out,
|
|
unsigned char *cTrigger_Out,unsigned char *cCount_Out)
|
|
{
|
|
PktOperateTrigger* lpPktOT = static_cast<PktOperateTrigger*>(lpPktBase);
|
|
|
|
*dwCharID_Out = lpPktOT->m_dwCharID;
|
|
*wQuestID_Out = lpPktOT->m_wQuestID;
|
|
*cPhase_Out = lpPktOT->m_cPhase;
|
|
*cTrigger_Out = lpPktOT->m_cTrigger;
|
|
*cCount_Out = lpPktOT->m_cCount;
|
|
|
|
return lpPktOT->GetError();
|
|
}
|
|
|
|
|
|
unsigned long ParsePacket::HandleCharQuestInfo(PktBase* lpPktBase, unsigned long *dwCharID_Out,
|
|
unsigned short *wExecutingQuestNum_Out,
|
|
PktQuestDB::ExecutingQuest **lppExecutingQuest_Out,
|
|
unsigned short *wHistoryQuestNum_Out,
|
|
unsigned short **lppHistoryQuest_Out)
|
|
{
|
|
PktQuestDB* lpPktQuestDB = static_cast<PktQuestDB*>(lpPktBase);
|
|
|
|
*dwCharID_Out = lpPktQuestDB->m_dwCID;
|
|
*wExecutingQuestNum_Out = lpPktQuestDB->m_wExecuteQuestSize / sizeof(PktQuestDB::ExecutingQuest);
|
|
*wHistoryQuestNum_Out = lpPktQuestDB->m_wHistoryQuestSize / sizeof(unsigned short);
|
|
|
|
*lppExecutingQuest_Out = reinterpret_cast<PktQuestDB::ExecutingQuest *>(lpPktQuestDB + 1);
|
|
*lppHistoryQuest_Out = reinterpret_cast<unsigned short*>(
|
|
reinterpret_cast<char*>(lpPktQuestDB + 1) + lpPktQuestDB->m_wExecuteQuestSize);
|
|
|
|
return lpPktQuestDB->GetError();
|
|
}
|
|
|
|
|
|
unsigned long ParsePacket::HandleCharEndQuest(PktBase* lpPktBase, unsigned long *dwCharID_Out,
|
|
unsigned short *wQuestID_Out, bool *bSave_Out)
|
|
{
|
|
PktEndQuest* lpPktEQ = static_cast<PktEndQuest*>(lpPktBase);
|
|
|
|
*dwCharID_Out = lpPktEQ->m_dwCharID;
|
|
*wQuestID_Out = lpPktEQ->m_wQuestID;
|
|
*bSave_Out = lpPktEQ->m_bSave;
|
|
|
|
return lpPktEQ->GetError();
|
|
}
|