diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-25 21:09:25 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-25 21:09:25 +0000 |
commit | 3222178785b9f2f6fe6ac41283cb47bf07ab44ad (patch) | |
tree | 5121c663f814df3fdf7c22b4d104a74a273b4c7e | |
parent | 9a4741d3d470218debd83850ca597fc565cd01bd (diff) | |
download | hercules-3222178785b9f2f6fe6ac41283cb47bf07ab44ad.tar.gz hercules-3222178785b9f2f6fe6ac41283cb47bf07ab44ad.tar.bz2 hercules-3222178785b9f2f6fe6ac41283cb47bf07ab44ad.tar.xz hercules-3222178785b9f2f6fe6ac41283cb47bf07ab44ad.zip |
Fixed undeclared variables on charserv compiling. how careless i am.....
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13961 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | sql-files/upgrade_svn_questlog.sql | 20 | ||||
-rw-r--r-- | src/char_sql/int_quest.c | 8 |
2 files changed, 4 insertions, 24 deletions
diff --git a/sql-files/upgrade_svn_questlog.sql b/sql-files/upgrade_svn_questlog.sql index 2e1985988..c7a42960f 100644 --- a/sql-files/upgrade_svn_questlog.sql +++ b/sql-files/upgrade_svn_questlog.sql @@ -17,24 +17,4 @@ CREATE TABLE IF NOT EXISTS `questlog` ( ) ENGINE=MyISAM;
DROP TABLE `quest_objective`;
-DROP TABLE `quest`;
---
--- Table structure for table `questlog`
---
-
-CREATE TABLE IF NOT EXISTS `questlog` (
- `char_id` int(11) unsigned NOT NULL default '0',
- `quest_id` int(10) unsigned NOT NULL,
- `state` enum('2','1','0') NOT NULL default '0',
- `time` int(11) unsigned NOT NULL default '0',
- `mob1` mediumint(9) unsigned NOT NULL default '0',
- `count1` mediumint(8) unsigned NOT NULL default '0',
- `mob2` mediumint(9) unsigned NOT NULL default '0',
- `count2` mediumint(8) unsigned NOT NULL default '0',
- `mob3` mediumint(9) unsigned NOT NULL default '0',
- `count3` mediumint(8) unsigned NOT NULL default '0',
- PRIMARY KEY USING BTREE (`char_id`,`quest_id`)
-) ENGINE=MyISAM;
-
-DROP TABLE `quest_objective`;
DROP TABLE `quest`;
\ No newline at end of file diff --git a/src/char_sql/int_quest.c b/src/char_sql/int_quest.c index 5c59a5ba0..98c0f28fa 100644 --- a/src/char_sql/int_quest.c +++ b/src/char_sql/int_quest.c @@ -33,7 +33,7 @@ int mapif_quests_fromsql(int char_id, struct quest questlog[]) memset(&tmp_quest, 0, sizeof(struct quest)); - if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `quest_id`, `state`, `time`, `mob1`, `count1`, `mob2`, `count2`, `mob3`, `count3` FROM `%s` WHERE `char_id`=? LIMIT %d", quest_db, MAX_QUEST) + if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `quest_id`, `state`, `time`, `mob1`, `count1`, `mob2`, `count2`, `mob3`, `count3` FROM `%s` WHERE `char_id`=? LIMIT %d", quest_db, MAX_QUEST_DB) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) || SQL_ERROR == SqlStmt_BindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, 0, NULL, NULL) @@ -47,7 +47,7 @@ int mapif_quests_fromsql(int char_id, struct quest questlog[]) || SQL_ERROR == SqlStmt_BindColumn(stmt, 8, SQLDT_INT, &tmp_quest.count[2], 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); - for( i = 0; i < MAX_QUEST && SQL_SUCCESS == SqlStmt_NextRow(stmt); ++i ) + for( i = 0; i < MAX_QUEST_DB && SQL_SUCCESS == SqlStmt_NextRow(stmt); ++i ) { memcpy(&questlog[i], &tmp_quest, sizeof(tmp_quest)); questlog[i].num_objectives = (!questlog[i].mob[0] ? 0 : !questlog[i].mob[1] ? 1 : !questlog[i].mob[2] ? 2 : 3); @@ -151,9 +151,9 @@ int mapif_parse_quest_update(int fd) //Send questlog to map server int mapif_send_quests(int fd, int char_id) { - struct quest tmp_questlog[MAX_QUEST]; + struct quest tmp_questlog[MAX_QUEST_DB]; int num_quests, i, num_complete = 0; - int complete[MAX_QUEST]; + int complete[MAX_QUEST_DB]; memset(tmp_questlog, 0, sizeof(tmp_questlog)); memset(complete, 0, sizeof(complete)); |