diff options
author | shennetsind <ind@henn.et> | 2013-09-16 12:31:37 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-09-16 12:31:37 -0300 |
commit | 8fb81341feedb5d00175d83e816f4d2ec2d4eb36 (patch) | |
tree | 367f9ad9d60537832c6afdfa674ab94aa011207d /src/map/clif.c | |
parent | 7f933ea6cb66e4deb2dc53c7aa3a96d82cb2884d (diff) | |
download | hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.gz hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.bz2 hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.tar.xz hercules-8fb81341feedb5d00175d83e816f4d2ec2d4eb36.zip |
HPM: Quest.c Interface
Fully Integrated
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 5fe08438e..da8af5543 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -15514,15 +15514,15 @@ void clif_quest_send_mission(struct map_session_data * sd) for( i = 0; i < sd->avail_quests; i++ ) { WFIFOL(fd, i*104+8) = sd->quest_log[i].quest_id; - WFIFOL(fd, i*104+12) = sd->quest_log[i].time - quest_db[sd->quest_index[i]].time; + WFIFOL(fd, i*104+12) = sd->quest_log[i].time - quest->db[sd->quest_index[i]].time; WFIFOL(fd, i*104+16) = sd->quest_log[i].time; - WFIFOW(fd, i*104+20) = quest_db[sd->quest_index[i]].num_objectives; + WFIFOW(fd, i*104+20) = quest->db[sd->quest_index[i]].num_objectives; - for( j = 0 ; j < quest_db[sd->quest_index[i]].num_objectives; j++ ) + for( j = 0 ; j < quest->db[sd->quest_index[i]].num_objectives; j++ ) { - WFIFOL(fd, i*104+22+j*30) = quest_db[sd->quest_index[i]].mob[j]; + WFIFOL(fd, i*104+22+j*30) = quest->db[sd->quest_index[i]].mob[j]; WFIFOW(fd, i*104+26+j*30) = sd->quest_log[i].count[j]; - monster = mob->db(quest_db[sd->quest_index[i]].mob[j]); + monster = mob->db(quest->db[sd->quest_index[i]].mob[j]); memcpy(WFIFOP(fd, i*104+28+j*30), monster?monster->jname:"NULL", NAME_LENGTH); } } @@ -15543,14 +15543,14 @@ void clif_quest_add(struct map_session_data * sd, struct quest * qd, int index) WFIFOW(fd, 0) = 0x2b3; WFIFOL(fd, 2) = qd->quest_id; WFIFOB(fd, 6) = qd->state; - WFIFOB(fd, 7) = qd->time - quest_db[index].time; + WFIFOB(fd, 7) = qd->time - quest->db[index].time; WFIFOL(fd, 11) = qd->time; - WFIFOW(fd, 15) = quest_db[index].num_objectives; + WFIFOW(fd, 15) = quest->db[index].num_objectives; - for( i = 0; i < quest_db[index].num_objectives; i++ ) { - WFIFOL(fd, i*30+17) = quest_db[index].mob[i]; + for( i = 0; i < quest->db[index].num_objectives; i++ ) { + WFIFOL(fd, i*30+17) = quest->db[index].mob[i]; WFIFOW(fd, i*30+21) = qd->count[i]; - monster = mob->db(quest_db[index].mob[i]); + monster = mob->db(quest->db[index].mob[i]); memcpy(WFIFOP(fd, i*30+23), monster?monster->jname:"NULL", NAME_LENGTH); } @@ -15577,17 +15577,17 @@ void clif_quest_update_objective(struct map_session_data * sd, struct quest * qd { int fd = sd->fd; int i; - int len = quest_db[index].num_objectives*12+6; + int len = quest->db[index].num_objectives*12+6; WFIFOHEAD(fd, len); WFIFOW(fd, 0) = 0x2b5; WFIFOW(fd, 2) = len; - WFIFOW(fd, 4) = quest_db[index].num_objectives; + WFIFOW(fd, 4) = quest->db[index].num_objectives; - for( i = 0; i < quest_db[index].num_objectives; i++ ) { + for( i = 0; i < quest->db[index].num_objectives; i++ ) { WFIFOL(fd, i*12+6) = qd->quest_id; - WFIFOL(fd, i*12+10) = quest_db[index].mob[i]; - WFIFOW(fd, i*12+14) = quest_db[index].count[i]; + WFIFOL(fd, i*12+10) = quest->db[index].mob[i]; + WFIFOW(fd, i*12+14) = quest->db[index].count[i]; WFIFOW(fd, i*12+16) = qd->count[i]; } @@ -15599,7 +15599,7 @@ void clif_quest_update_objective(struct map_session_data * sd, struct quest * qd /// 02b6 <quest id>.L <active>.B void clif_parse_questStateAck(int fd, struct map_session_data * sd) { - quest_update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE); + quest->update_status(sd, RFIFOL(fd,2), RFIFOB(fd,6)?Q_ACTIVE:Q_INACTIVE); } |