mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-17 06:35:28 +01:00
DG Scripts bug fixes (#44)
* Increase ID space DG Scripts uses tiny idspace that results in wacky bugs when the mud is running too long. * Overhaul script ids All references to GET_ID(ch/obj) were removed and replaced by char_script_id() and obj_script_id(), which don’t assign ids until they are needed. The ch->id and obj->id variable names were changed to script_id to prevent accidental errors for future programmers. This change greatly increases how long the mud can run before it runs out of ID space. * Fix extraction count This prevents an error log where it has over-counted the extractions pending. It now behaves correctly when the same mob is %purge%’d or extract_char()’d twice.
This commit is contained in:
parent
d7a50664ea
commit
41da68bdb0
14 changed files with 182 additions and 125 deletions
|
|
@ -537,7 +537,8 @@ do \
|
|||
/** Unique ID of ch. */
|
||||
#define GET_IDNUM(ch) ((ch)->char_specials.saved.idnum)
|
||||
/** Returns contents of id field from x. */
|
||||
#define GET_ID(x) ((x)->id)
|
||||
/** Warning: GET_ID is deprecated and you should use char_script_id, obj_script_id, room_script_id */
|
||||
/** #define GET_ID(x) ((x)->id) */
|
||||
/** Weight carried by ch. */
|
||||
#define IS_CARRYING_W(ch) ((ch)->char_specials.carry_weight)
|
||||
/** Number of items carried by ch. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue