summaryrefslogtreecommitdiff
path: root/src/map/quest.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-25 00:29:15 +0200
committerHaru <haru@dotalux.com>2013-09-25 00:29:15 +0200
commit44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7 (patch)
tree1c1e300503d99ecbe8b41355daa716858aaece5d /src/map/quest.c
parentb9c8f57b92d2935db971a38e144529682712dc82 (diff)
downloadhercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.gz
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.bz2
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.xz
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.zip
Renamed more forgotten variables during interface conversions
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/quest.c')
-rw-r--r--src/map/quest.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/map/quest.c b/src/map/quest.c
index 9055b61fe..881037081 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -189,29 +189,28 @@ int quest_delete(TBL_PC * sd, int quest_id)
return 0;
}
-int quest_update_objective_sub(struct block_list *bl, va_list ap)
-{
+int quest_update_objective_sub(struct block_list *bl, va_list ap) {
struct map_session_data * sd;
- int mob, party;
+ int mob_id, party_id;
nullpo_ret(bl);
nullpo_ret(sd = (struct map_session_data *)bl);
- party = va_arg(ap,int);
- mob = va_arg(ap,int);
+ party_id = va_arg(ap,int);
+ mob_id = va_arg(ap,int);
if( !sd->avail_quests )
return 0;
- if( sd->status.party_id != party )
+ if( sd->status.party_id != party_id )
return 0;
- quest->update_objective(sd, mob);
+ quest->update_objective(sd, mob_id);
return 1;
}
-void quest_update_objective(TBL_PC * sd, int mob) {
+void quest_update_objective(TBL_PC * sd, int mob_id) {
int i,j;
for( i = 0; i < sd->avail_quests; i++ ) {
@@ -219,7 +218,7 @@ void quest_update_objective(TBL_PC * sd, int mob) {
continue;
for( j = 0; j < MAX_QUEST_OBJECTIVES; j++ )
- if( quest->db[sd->quest_index[i]].mob[j] == mob && sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j] ) {
+ if( quest->db[sd->quest_index[i]].mob[j] == mob_id && sd->quest_log[i].count[j] < quest->db[sd->quest_index[i]].count[j] ) {
sd->quest_log[i].count[j]++;
sd->save_quest = true;
clif->quest_update_objective(sd,&sd->quest_log[i],sd->quest_index[i]);