summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-26 06:01:10 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-26 06:01:10 +0000
commite9a090774cb956ebb122698374be2a5360dd8b00 (patch)
tree62ed879dcb9e50038240a5ef8897808abf26c510 /src
parentf9c3a2a80b9981a3102661928f5c2469e47d360c (diff)
downloadhercules-e9a090774cb956ebb122698374be2a5360dd8b00.tar.gz
hercules-e9a090774cb956ebb122698374be2a5360dd8b00.tar.bz2
hercules-e9a090774cb956ebb122698374be2a5360dd8b00.tar.xz
hercules-e9a090774cb956ebb122698374be2a5360dd8b00.zip
* Some updates of Quest Log system
- renamed table 'questlog' to 'quest' to avoid misunderstanding - updated main.sql - fixed the server can't load more than 16 quests - removed the MAX_QUEST limit. tests show the client can handle more than 100 quests. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13963 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/char.c2
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/quest.c13
-rw-r--r--src/map/quest.h9
4 files changed, 12 insertions, 14 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index fe9025935..9d699cbb5 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -58,7 +58,7 @@ char mail_db[256] = "mail"; // MAIL SYSTEM
char auction_db[256] = "auction"; // Auctions System
char friend_db[256] = "friends";
char hotkey_db[256] = "hotkey";
-char quest_db[256] = "questlog";
+char quest_db[256] = "quest";
//If your code editor is having problems syntax highlighting this file, uncomment this and RECOMMENT IT BEFORE COMPILING
//#undef TXT_SQL_CONVERT
diff --git a/src/map/intif.c b/src/map/intif.c
index d077aa881..06f93f52e 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1348,7 +1348,7 @@ int intif_parse_questlog(int fd)
if(!sd)
return -1;
- sd->avail_quests = sd->num_quests = (RFIFOB(fd, 2)-8)/sizeof(struct quest);
+ sd->avail_quests = sd->num_quests = (RFIFOW(fd, 2)-8)/sizeof(struct quest);
memset(&sd->quest_log, 0, sizeof(sd->quest_log));
diff --git a/src/map/quest.c b/src/map/quest.c
index ccde85a07..f146ca325 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -33,7 +33,14 @@
#include <stdarg.h>
#include <time.h>
-#define MAX_QUEST 25
+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];
//Send quest info on login
int quest_pc_login(TBL_PC * sd)
@@ -64,9 +71,9 @@ int quest_add(TBL_PC * sd, int quest_id)
return -1;
}
- if( sd->num_quests >= MAX_QUEST_DB || sd->avail_quests >= MAX_QUEST )
+ if( sd->num_quests >= MAX_QUEST_DB )
{
- ShowError("quest_add: your quest log is full.(max quests: %d, max incompleted quests: %d)\n", MAX_QUEST_DB, MAX_QUEST);
+ ShowError("quest_add: your quest log is full.(max quests: %d)\n", MAX_QUEST_DB);
return 1;
}
diff --git a/src/map/quest.h b/src/map/quest.h
index 16870d381..ff351796c 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -6,15 +6,6 @@
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);