📄 questfunction.h
字号:
};
class CQuestInMap
{
typedef list<CScriptTimer> TIMERLIST;
typedef list<CScriptTimer>::iterator TIMERITER;
typedef list<CScriptCounter> COUNTERLIST;
typedef list<CScriptCounter>::iterator COUNTERITER;
typedef list<table_quest_in_map> TB_QUESTINMAP;
typedef list<table_quest_info_bystep> TB_QUESTINFO;
typedef list<table_requital_list > TB_REQUITALLIST;
typedef list<table_requital_list >::iterator REQUITALLISTITER;
//<! BBD 040329
typedef list<table_requital_Item > TB_REQUITALITEM;
typedef list<table_requital_Item >::iterator REQUITALITEMITER;
//> BBD 040329
typedef list<CSpellMove>::iterator SPELLITER;
//bosstimer包访
typedef map<int, CBossTimer*> MAP_BOSSTIMER;
typedef map<int, CBossTimer*>::iterator ITOR_BOSS;
typedef map<int, CBossTimer*>::value_type PAIR_BOSS;
friend class CScriptTimer;
public:
CQuestInMap();
~CQuestInMap();
protected:
//table
TB_QUESTINMAP m_tQuestInMap;
TB_QUESTINFO m_tQuestInfo;
public:
// 021014 //林巩涝仿栏肺 甘捞悼矫 荤侩
list<CSpellMove> m_szClientSpell; //蜡历啊 模 林巩篮 SendChatData肺 逞绢客 ::CheckSpellMapMoveArea俊辑 历厘等促.
int CheckSpell( const int cn, const char* szSpell); //蜡历啊 模 林巩苞 胶农赋飘 林巩苞 厚背茄促.
SPELLITER FindSpellUser( const int cn ); //蜡历 茫扁
void DeleteSpellUser( const int cn ); //蜡历 磷捞扁..
string GetSpellWord( const int cn ); //蜡历狼 林巩 茫扁
void IniteAllTable(){ m_tQuestInMap.clear();m_tQuestInfo.clear();}; //葛电 抛捞喉 瘤快扁
int LoadQuestInfoByStep(); //quest_info_byStep 抛捞喉 load
int LoadQuestInMap(); //quest_in_map 抛捞喉 load
//SetTable
void SetQuestInMap( table_quest_in_map &tp ){ m_tQuestInMap.push_back( tp );};
void SetQuestInfoByMap( table_quest_info_bystep &tp){ m_tQuestInfo.push_back( tp );};
//沥焊甫 啊廉柯促.
list<int> GetQuestInMap( int iMapnumber); //秦寸 甘俊 乐绰 涅胶飘甫 逞败霖促.
list<int> GetRoundUser( const int cn ); //秦寸 cn林困狼 荤恩甸阑 府胶飘甫 啊廉柯促.い
int GetQuestInfo( int iQuestNum, int iStep ); //涅胶飘锅龋尔 胶跑蔼栏肺 沥焊甫 舅酒辰促.
//菩哦阑 焊辰促
void SendQuestInfo( t_quest_in_map *tp, int cn);
void SendShowQuestInfo( t_quest_in_map *tp, int cn );
//script窃荐
void ShowStateMsg( const int& cn, const char* szMsg, const int& R, const int& G, const int& B ); //皋矫瘤甫 瘤沥祸栏肺 免仿茄促.
void ShowStateMsg( const int& cn, const int& iMsgNum, const int& R, const int& G, const int& B ); //固荤侩
//BossTimerCheck
MAP_BOSSTIMER m_mBossTimer;
int m_iBossEntree; //穿啊 甸绢吭绰瘤 舅绊 酵促搁 唱吝俊 list肺 官层辑 cn阑 持绰促.
DWORD StartBossTimer( const int& iCn, const int& iBoss, const int& iX, const int& iY, const DWORD& dwTimer, const int iEntree, const int nFlag); //boss鸥捞赣甫 积己茄促. 焊胶档 积己茄促.
bool DeleteBossTimer(int nKey); //boss鸥捞赣甫 磷牢促.
void DeleteBossNpc(int nKey); //Boss甫 碍力肺 磷牢促.
void RunBossTimer(); //boss鸥捞赣甫 倒赴促.
DWORD GetCurrentBossTimer(int nKey); //泅犁 巢酒乐绰 矫埃捞 府畔等促.
int GetBossTimerEntree(int nKey); //泅犁 规俊 甸绢啊 乐绰 蜡历荐啊 府畔等促.
void DecreaseBossTimerUser(const int nKey, const int nCn);
void CheckBossTimerBoss( const int nKey); //泅犁 焊胶规俊 巢篮荤恩捞 0捞搁 焊胶逢 磷捞绊 规阑 摧绰促.
//Timer俊 包访等 郴侩
list<CScriptTimer> m_cTimer;
void RunQuestTimer(); //涅胶飘,矫唱府坷俊 包访等 葛电 鸥捞赣甫 倒赴促.
bool StartScriptTimer(const int iServerID, const char* szName, const DWORD &dwTimer, const DWORD &dwSync, const char* mapfile, const int& x, const int& y); //胶农赋飘 窃荐 檬扁拳
void RunScriptTimer(); //very_long_term俊辑 盖朝 档绰 逞
void EndScriptTimer( const int iID );
bool DeleteScriptTimer( const int iServerID, const char *szName ); //秦寸 捞抚苞 id牢 鸥捞赣甫 辆丰
void DeleteScriptTimer(); //鸥捞赣啊 场抄 巴阑 辆丰 矫挪促.
bool CheckID2Name( const int& iID, const char* szName ); //酒第尔 捞抚捞 泅 府胶飘尔 老摹窍瘤 臼绰促.
void RevcScriptTimerPacket( t_script_timer *timer, int iType, int cn ); //script timer俊 包访等 葛电 菩哦阑 罐绰促.
list<CScriptTimer>::iterator FindUserInScriptTimer( const int& iId, const char* name); //秦寸 蜡历啊 胶农赋飘 鸥捞赣甫 荤侩窍绊 乐绰啊?
//Counter俊 包访等 郴侩.
list<CScriptCounter> m_cCounter;
bool StartScriptCounter( const int iServerID, const char* szName, const int iNum, const int iType, const int iMuch, const int iFlag);
void RunScriptCounter( const int cn, const char* szName, int iNum, int iType);
void EndScriptCounter( const int iServerId, const char* szName);
bool CheckScriptCounter( const int& iServerId, const char* szName, const int iNum, const int iType, const int iCounter );
void DeleteScriptCounter(); //墨款磐啊 场捞 抄巴篮...瘤匡鳖??
bool DeleteScriptCounter( const int iServerId, const char* szName);
void AddScriptCounter(const int iServerId, const char* szName); //秦寸 蜡历狼 墨款磐甫 刘啊窍绊 弊 蜡历俊霸 菩哦 焊辰促.
void RevcScriptCounterSync( t_script_counter *counter, int cn ); //030108 努扼捞攫飘 墨款磐狼 箭磊甫 罐绰促.
list<CScriptCounter>::iterator FindUserInScriptCounter( const int& iId, const char* name, const int iType); //秦寸 蜡历啊 秦寸鸥涝狼 墨款磐甫 角青窍绊 乐绰啊?
//Npc甫 磷捞哥 罐霸 登绰 焊惑 requital_list俊 历厘登绢 乐绰 蔼阑 霖促.
CRequital *m_cRequital;
int LoadRequitalTable(); //抛捞喉 肺靛秦辑 蔼甸 持扁
void DeleteRequeitalTable(); //昏力
void GiveRequitalAfterKillNpc( const CHARLIST *a, const CHARLIST *d); //磷看促.
void RequitalRoundUser( const int& cn, table_requital_list& table); //磷牢巴 辟贸俊甸俊霸 秦琶霖促.
void RequitalKillUser( int cn, table_requital_list &table ); //磷牢逞父 秦琶霖促.
void GiveRequitalByCn( const int cn , table_requital_list& table); //cn俊霸 秦琶阑 霖促.
list<table_requital_list>::iterator FindRequitalNpc( const int iNpcIndex); //秦寸 npc啊 抛捞喉俊 粮力窍绰啊?
//spellmapmove 俺沥魄
void SendSpellMapMove( const int&cn, const char* szSpell, const char* szMap, const int& x, const int& y);
void SendSpellMapMove_Suc(const char* szMap, const int& cn);
void SendSpellMapMove_Fail(const int& cn);
void RecvSpellMapMove( const t_script_spellmapmove *spell, const int& cn );
//<! BBD 040329
int LoadRequitalItemTable();
bool Requital_About_SealStone( const int cn, int nSardAmount, int nLeafAmount, int nRef_index);
//> BBD 040329
};
template <class T>
class CTable
{
private:
list<T> m_tTable;
char m_szTableName[32];
char m_szOrderType[32];
//int m_iFildeSize;
vector<t_field_type> m_tFieldType;
/*
#define SQL_UNKNOWN_TYPE 0
#define SQL_CHAR 1
#define SQL_NUMERIC 2
#define SQL_DECIMAL 3
#define SQL_INTEGER 4
#define SQL_SMALLINT 5
#define SQL_FLOAT 6
#define SQL_REAL 7
#define SQL_DOUBLE 8
*/
public:
CTable(){};
~CTable(){};
void InitTable(const char* szTableName, const char* szOrder, const int iFieldNum);
void InsertFieldType(t_field_type type){ m_FieldType.push_back(type); };
//int GetFieldType(){ m_FieldType.pop_front();};
int LoadTable();
void SetTable( const T t){ m_tTable.push_back(t); };
T GetTable() { return m_tTable.pop_back();};
};
class CRequital //秦琶林扁 努贰胶
{
typedef list<table_requital_list > TB_REQUITALLIST;
typedef list<table_requital_list >::iterator REQUITALLISTITER;
//<! BBD 040329
typedef list<table_requital_Item > TB_REQUITALITEM;
typedef list<table_requital_Item >::iterator REQUITALITEMITER;
//> BBD 040329
protected:
TB_REQUITALLIST m_tRequital;
TB_REQUITALITEM m_tRequitalItem; // BBD 040329
public:
CRequital(){};
~CRequital(){};
void InitTable(){};
int LoadRequitalTable();
void SetRequitalTable( table_requital_list &table){ m_tRequital.push_back( table); };
void GiveRequital2User( const int cn, table_requital_list t); //cn俊霸 秦琶阑 霖促.
//<! BBD 040329
int LoadRequitalItemTable();
void SetRequitalItemTable( table_requital_Item &table){ m_tRequitalItem.push_back( table); };
REQUITALITEMITER GetRequital_ItemIttr( const int index);
//> BBD 040329
REQUITALLISTITER GetRequital_KillNpc( const int index); //npc甫 磷看阑锭 林绰 秦琶狼 辆幅
};
extern CQuestInMap g_QuestInMap;
#endif //_QUEST_IN_MAP_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -