some small additions to the event and list system, and some retractions of previously changed code.

This commit is contained in:
Vatiken 2012-02-19 22:02:25 +00:00
parent 650be85257
commit ad3bb8bc64
11 changed files with 193 additions and 59 deletions

View file

@ -1008,6 +1008,8 @@ ACMD(do_stat)
CREATE(victim, struct char_data, 1);
clear_char(victim);
CREATE(victim->player_specials, struct player_special_data, 1);
/* Allocate mobile event list */
victim->events = create_list();
if (load_char(buf2, victim) >= 0) {
char_to_room(victim, 0);
if (GET_LEVEL(victim) > GET_LEVEL(ch))
@ -2047,6 +2049,8 @@ ACMD(do_last)
CREATE(vict, struct char_data, 1);
clear_char(vict);
CREATE(vict->player_specials, struct player_special_data, 1);
/* Allocate mobile event list */
vict->events = create_list();
if (load_char(name, vict) < 0) {
send_to_char(ch, "There is no such player.\r\n");
free_char(vict);
@ -2567,6 +2571,8 @@ ACMD(do_show)
CREATE(vict, struct char_data, 1);
clear_char(vict);
CREATE(vict->player_specials, struct player_special_data, 1);
/* Allocate mobile event list */
vict->events = create_list();
if (load_char(value, vict) < 0) {
send_to_char(ch, "There is no such player.\r\n");
free_char(vict);
@ -3347,6 +3353,8 @@ ACMD(do_set)
CREATE(cbuf, struct char_data, 1);
clear_char(cbuf);
CREATE(cbuf->player_specials, struct player_special_data, 1);
/* Allocate mobile event list */
cbuf->events = create_list();
if ((player_i = load_char(name, cbuf)) > -1) {
if (GET_LEVEL(cbuf) > GET_LEVEL(ch)) {
free_char(cbuf);
@ -4613,6 +4621,8 @@ bool change_player_name(struct char_data *ch, struct char_data *vict, char *new_
CREATE(temp_ch, struct char_data, 1);
clear_char(temp_ch);
CREATE(temp_ch->player_specials, struct player_special_data, 1);
/* Allocate mobile event list */
temp_ch->events = create_list();
if ((plr_i = load_char(new_name, temp_ch)) > -1) {
free_char(temp_ch);
send_to_char(ch, "Sorry, the new name already exists.\r\n");