mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
[Dec 28 2008] - Rumble
Fixed bad usage of num_of_saving_throws and moved define to structs.h. (thanks Vatiken) Added trigedit variables questdone and quest. (thanks Jamdog)
This commit is contained in:
parent
dd7c413b1f
commit
3d6783a56f
6 changed files with 35 additions and 5 deletions
|
@ -35,6 +35,9 @@ export (QQ's a zone into a tarball)t
|
|||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||
(lots of major bugfixes too)
|
||||
|
||||
[Dec 28 2008] - Rumble
|
||||
Fixed bad usage of num_of_saving_throws and moved define to structs.h. (thanks Vatiken)
|
||||
Added trigedit variables questdone and quest. (thanks Jamdog)
|
||||
[Dec 23 2008] - Rumble
|
||||
Fix for drink containers improperly showing empty due to unlimited container addition. (thanks Parnassus)
|
||||
Fix for qedit crash when trying to list non-existent next quest. (thanks Tails)
|
||||
|
|
2
src/db.c
2
src/db.c
|
@ -1495,7 +1495,7 @@ static void parse_simple_mob(FILE *mob_f, int i, int nr)
|
|||
|
||||
/* These are now save applies; base save numbers for MOBs are now from the
|
||||
* warrior save table. */
|
||||
for (j = 0; j < 5; j++)
|
||||
for (j = 0; j < NUM_OF_SAVING_THROWS; j++)
|
||||
GET_SAVE(mob_proto + i, j) = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "spells.h"
|
||||
#include "oasis.h"
|
||||
#include "class.h"
|
||||
|
||||
#include "quest.h"
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
|
@ -859,6 +859,33 @@ void find_replacement(void *go, struct script_data *sc, trig_data *trig,
|
|||
}
|
||||
snprintf(str, slen, "%d", GET_QUESTPOINTS(c));
|
||||
}
|
||||
else if (!str_cmp(field, "quest"))
|
||||
{
|
||||
if (IS_NPC(c))
|
||||
strcpy(str, "0");
|
||||
else {
|
||||
if ((GET_QUEST(c) != NOTHING) && (real_quest(GET_QUEST(c)) == NOTHING))
|
||||
snprintf(str, slen, "%d", GET_QUEST(c));
|
||||
else
|
||||
strcpy(str, "0");
|
||||
}
|
||||
}
|
||||
else if (!str_cmp(field, "questdone"))
|
||||
{
|
||||
if (IS_NPC(c))
|
||||
strcpy(str, "0");
|
||||
else {
|
||||
if (subfield && *subfield) {
|
||||
int q_num = atoi(subfield);
|
||||
if (is_complete(c, q_num))
|
||||
strcpy(str, "1");
|
||||
else
|
||||
strcpy(str, "0");
|
||||
}
|
||||
else
|
||||
strcpy(str, "0");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
if (!str_cmp(field, "room")) { /* in NOWHERE, return the void */
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "interpreter.h"
|
||||
#include "genolc.h" /* for strip_cr */
|
||||
#include "config.h" /* for pclean_criteria[] */
|
||||
#include "spells.h" /* for NUM_OF_SAVING_THROWS */
|
||||
#include "dg_scripts.h" /* To enable saving of player variables to disk */
|
||||
#include "quest.h"
|
||||
|
||||
|
|
|
@ -149,8 +149,6 @@
|
|||
#define SAVING_PETRI 2
|
||||
#define SAVING_BREATH 3
|
||||
#define SAVING_SPELL 4
|
||||
/* Equals the total number of SAVING_* defines */
|
||||
#define NUM_OF_SAVING_THROWS 5
|
||||
|
||||
#define TAR_IGNORE (1 << 0)
|
||||
#define TAR_CHAR_ROOM (1 << 1)
|
||||
|
|
|
@ -427,6 +427,9 @@
|
|||
/** Total number of applies */
|
||||
#define NUM_APPLIES 25
|
||||
|
||||
/* Equals the total number of SAVING_* defines in spells.h */
|
||||
#define NUM_OF_SAVING_THROWS 5
|
||||
|
||||
/* Container flags - value[1] */
|
||||
#define CONT_CLOSEABLE (1 << 0) /**< Container can be closed */
|
||||
#define CONT_PICKPROOF (1 << 1) /**< Container is pickproof */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue