summaryrefslogtreecommitdiff
path: root/src/map/quest.h
blob: 16870d381e27b722426bcc467b72d72bf8c12de3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#ifndef _QUEST_H_
#define _QUEST_H_

typedef enum quest_check_type { HAVEQUEST, PLAYTIME, HUNTING } quest_check_type;

struct s_quest_db {
	int id;
	unsigned int time;
	int mob[MAX_QUEST_OBJECTIVES];
	int count[MAX_QUEST_OBJECTIVES];
	//char name[NAME_LENGTH];
};
struct s_quest_db quest_db[MAX_QUEST_DB];

int quest_pc_login(TBL_PC * sd);

int quest_add(TBL_PC * sd, int quest_id);
int quest_add_ack(int char_id, int quest_id, int success);

int quest_delete(TBL_PC * sd, int quest_id);
int quest_delete_ack(int char_id, int quest_id, int success);

void quest_update_objective(TBL_PC * sd, int mob);
int quest_update_status(TBL_PC * sd, int quest_id, int status);
int quest_save(TBL_PC * sd);
int quest_save_ack(int char_id, int quest_id, int success);

int quest_check_quest(TBL_PC * sd, int quest_id, quest_check_type type);

int quest_search_db(int quest_id);

void do_init_quest();

#endif