mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-18 13:38:07 +01:00
Allocated Lists merged into one functions for extra expandability
This commit is contained in:
parent
fa8a1e23b7
commit
5847a57d7f
6 changed files with 18 additions and 22 deletions
12
src/db.c
12
src/db.c
|
|
@ -2322,8 +2322,7 @@ struct char_data *create_char(void)
|
|||
CREATE(ch, struct char_data, 1);
|
||||
clear_char(ch);
|
||||
|
||||
/* Allocate mobile event list */
|
||||
ch->events = create_list();
|
||||
new_mobile_data(ch);
|
||||
|
||||
ch->next = character_list;
|
||||
character_list = ch;
|
||||
|
|
@ -2335,6 +2334,12 @@ struct char_data *create_char(void)
|
|||
return (ch);
|
||||
}
|
||||
|
||||
void new_mobile_data(struct char_data *ch)
|
||||
{
|
||||
ch->events = create_list();
|
||||
}
|
||||
|
||||
|
||||
/* create a new mobile from a prototype */
|
||||
struct char_data *read_mobile(mob_vnum nr, int type) /* and mob_rnum */
|
||||
{
|
||||
|
|
@ -2356,8 +2361,7 @@ struct char_data *read_mobile(mob_vnum nr, int type) /* and mob_rnum */
|
|||
mob->next = character_list;
|
||||
character_list = mob;
|
||||
|
||||
/* Allocate mobile event list */
|
||||
mob->events = create_list();
|
||||
new_mobile_data(mob);
|
||||
|
||||
if (!mob->points.max_hit) {
|
||||
mob->points.max_hit = dice(mob->points.hit, mob->points.mana) +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue