Fixed undeclared variables on charserv compiling. how careless i am.....

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13961 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Inkfish 2009-07-25 21:09:25 +00:00
parent ea229fd7e0
commit 153c9f5c5c
2 changed files with 4 additions and 24 deletions

View File

@ -16,25 +16,5 @@ CREATE TABLE IF NOT EXISTS `questlog` (
PRIMARY KEY USING BTREE (`char_id`,`quest_id`)
) 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`;

View File

@ -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));