summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/int_quest.c2
-rw-r--r--src/map/clif.c14
2 files changed, 13 insertions, 3 deletions
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index cf93db51e..7b3d746dd 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -182,7 +182,7 @@ bool mapif_quest_update(int char_id, struct quest qd)
int i;
StrBuf->Init(&buf);
- StrBuf->Printf(&buf, "UPDATE `%s` SET `state`='%u'", quest_db, qd.state);
+ StrBuf->Printf(&buf, "UPDATE `%s` SET `state`='%u', `time`='%u'", quest_db, qd.state, qd.time);
for (i = 0; i < MAX_QUEST_OBJECTIVES; i++) {
StrBuf->Printf(&buf, ", `count%d`='%d'", i+1, qd.count[i]);
}
diff --git a/src/map/clif.c b/src/map/clif.c
index e4ff1644b..09e8bbb6b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7107,21 +7107,31 @@ void clif_devotion(struct block_list *src, struct map_session_data *tsd)
if( src->type == BL_MER )
{
struct mercenary_data *md = BL_CAST(BL_MER,src);
+ int skill_lvl;
if( md && md->master && md->devotion_flag )
WBUFL(buf,6) = md->master->bl.id;
- WBUFW(buf,26) = skill->get_range2(src, ML_DEVOTION, mercenary->checkskill(md, ML_DEVOTION));
+ skill_lvl = mercenary->checkskill(md, ML_DEVOTION);
+ if (skill_lvl > 0)
+ WBUFW(buf, 26) = skill->get_range2(src, ML_DEVOTION, skill_lvl);
+ else
+ WBUFW(buf, 26) = 0;
}
else
{
int i;
struct map_session_data *sd = BL_CAST(BL_PC,src);
+ int skill_lvl;
if( sd == NULL )
return;
for( i = 0; i < MAX_PC_DEVOTION; i++ )
WBUFL(buf,6+4*i) = sd->devotion[i];
- WBUFW(buf,26) = skill->get_range2(src, CR_DEVOTION, pc->checkskill(sd, CR_DEVOTION));
+ skill_lvl = pc->checkskill(sd, CR_DEVOTION);
+ if (skill_lvl > 0)
+ WBUFW(buf, 26) = skill->get_range2(src, CR_DEVOTION, skill_lvl);
+ else
+ WBUFW(buf, 26) = 0;
}
if( tsd )