mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-22 10:10:13 +01:00
Bug fixes to quests system (checks for prev and next quests) - thanks drefs
This commit is contained in:
parent
8f001492ce
commit
bed412f47e
3 changed files with 16 additions and 2 deletions
|
|
@ -34,6 +34,8 @@ OLC copy and delete options.
|
||||||
export (QQ's a zone into a tarball)t
|
export (QQ's a zone into a tarball)t
|
||||||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||||
(lots of major bugfixes too)
|
(lots of major bugfixes too)
|
||||||
|
[May 13 2009] - Jamdog
|
||||||
|
Bug-Fix: quest join check for previous quest completion, and validation checks for prev and next quests in qedit. (thanks drefs)
|
||||||
[Apr 13 2009] - Jamdog
|
[Apr 13 2009] - Jamdog
|
||||||
Bug-Fix: Shopping for multiple items caused an occasional crash due to NULL variable - now fixed (I hope)
|
Bug-Fix: Shopping for multiple items caused an occasional crash due to NULL variable - now fixed (I hope)
|
||||||
[Apr 12 2009] - Jamdog
|
[Apr 12 2009] - Jamdog
|
||||||
|
|
|
||||||
12
src/qedit.c
12
src/qedit.c
|
|
@ -693,9 +693,21 @@ void qedit_parse(struct descriptor_data *d, char *arg)
|
||||||
OLC_QUEST(d)->target = number;
|
OLC_QUEST(d)->target = number;
|
||||||
break;
|
break;
|
||||||
case QEDIT_NEXTQUEST:
|
case QEDIT_NEXTQUEST:
|
||||||
|
if ((number = atoi(arg)) != -1) {
|
||||||
|
if (real_quest(number) == NOTHING) {
|
||||||
|
write_to_output(d, "That is not a valid quest, try again (-1 for none) : ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
OLC_QUEST(d)->next_quest = (number == -1 ? NOTHING : atoi(arg));
|
OLC_QUEST(d)->next_quest = (number == -1 ? NOTHING : atoi(arg));
|
||||||
break;
|
break;
|
||||||
case QEDIT_PREVQUEST:
|
case QEDIT_PREVQUEST:
|
||||||
|
if ((number = atoi(arg)) != -1) {
|
||||||
|
if (real_quest(number) == NOTHING) {
|
||||||
|
write_to_output(d, "That is not a valid quest, try again (-1 for none) : ");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
OLC_QUEST(d)->prev_quest = (number == -1 ? NOTHING : atoi(arg));
|
OLC_QUEST(d)->prev_quest = (number == -1 ? NOTHING : atoi(arg));
|
||||||
break;
|
break;
|
||||||
case QEDIT_GOLD:
|
case QEDIT_GOLD:
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ void quest_join(struct char_data *ch, struct char_data *qm, char argument[MAX_IN
|
||||||
else if (is_complete(ch, vnum))
|
else if (is_complete(ch, vnum))
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"%s You have already completed that quest!", GET_NAME(ch));
|
"%s You have already completed that quest!", GET_NAME(ch));
|
||||||
else if ((QST_PREV(rnum) != NOTHING) && !is_complete(ch, vnum))
|
else if ((QST_PREV(rnum) != NOTHING) && !is_complete(ch, QST_PREV(rnum)))
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"%s That quest is not available to you yet!", GET_NAME(ch));
|
"%s That quest is not available to you yet!", GET_NAME(ch));
|
||||||
else if ((QST_PREREQ(rnum) != NOTHING) &&
|
else if ((QST_PREREQ(rnum) != NOTHING) &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue