47 lines
731 B
C++
47 lines
731 B
C++
|
|
#pragma once
|
|
|
|
//#include <string>
|
|
//#include <vector>
|
|
#include <toolkit/khash.h>
|
|
|
|
struct QuestLink;
|
|
|
|
struct QuestLinkEx
|
|
{
|
|
QuestLinkEx() : questCode(0) {}
|
|
~QuestLinkEx()
|
|
{
|
|
startNpcId.clear();
|
|
progressNpcId.clear();
|
|
endNpcId.clear();
|
|
}
|
|
int questCode;
|
|
std::vector<int> startNpcId;
|
|
std::vector<int> progressNpcId;
|
|
std::vector<int> endNpcId;
|
|
};
|
|
|
|
class SQuestLinkDB
|
|
{
|
|
public:
|
|
SQuestLinkDB();
|
|
~SQuestLinkDB();
|
|
|
|
QuestLinkEx * GetQuestLinkData( int nQuestCode );
|
|
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
void convert(QuestLink const* questLink, QuestLinkEx* ex);
|
|
|
|
KHash< QuestLinkEx*, hashPr_mod_int> m_hashQuestLink;
|
|
|
|
private:
|
|
|
|
public:
|
|
static SQuestLinkDB* m_pThis;
|
|
};
|
|
|
|
SQuestLinkDB & GetQuestLinkDB(); |