1 Star 0 Fork 0

Ailwyn / Game-Server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mission.h 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
thuvvik 提交于 2011-08-02 23:16 . Initial commit
/*
*/
typedef struct _missionCondition_t
{
int conditionCode;
int conditionValue;
struct _missionCondition_t *next; // if there is more than one condition
}missionCondition_t; // the condition(s) that must be true so the quest can be accepted
typedef struct _missionObjective_t
{
int temp;
//int conditionCode;
//int conditionValue;
//struct _missionCondition_t *next; // if there is more than one condition
}missionObjective_t; // the objective(s) that must be true so the quest can be completed
typedef struct
{
int missionId;
unsigned long long npcDispenserEntityId; // the NPC that offers the mission
unsigned long long npcCollectorEntityId; // the NPC that the mission can be completed at
missionCondition_t *firstCondition; // NULL if no conditions, else points to the first condition
int objectiveCount;
missionObjective_t *objectiveList;
}mission_t;
typedef struct _missionList_t
{
int missionCount;
mission_t **missionReferences;
//struct _missionList_t *next;
}missionList_t; // a list of missions related to a single NPC
#define MISSION_STATE_MASK 0xF
#define MISSION_STATE_NOTACCEPTED 0
#define MISSION_STATE_ACTIVE 1 // mission running, still have to do objectives
#define MISSION_STATE_DONE 2 // mission objectives done, must talk to NPC
#define MISSION_STATE_COMPLETED 3 // mission completed, no more in mission log
void mission_init();
void mission_initForClient(mapChannelClient_t *client);
void mission_initForChannel(mapChannel_t *mapChannel);
missionList_t *mission_generateMissionListForNPC(npc_t *npc);
bool mission_completeableAvailableForClient(missionList_t *missionList, mapChannelClient_t *client, npc_t *npc, mission_t **outMissionList, int *outLimit);
bool mission_newAvailableForClient(missionList_t *missionList, mapChannelClient_t *client, npc_t *npc, mission_t **outMissionList, int *outLimit);
void mission_acceptForClient(mapChannelClient_t *client, mission_t *mission);
C++
1
https://gitee.com/xx_001/Game-Server.git
git@gitee.com:xx_001/Game-Server.git
xx_001
Game-Server
Game-Server
master

搜索帮助