Make sure vict is valid_dg_target in do_mteleport (#48)

Also, trigger world enter trigger for the newly moved target, not the caller.
This commit is contained in:
Thomas Arp 2018-04-07 17:13:27 +02:00 committed by wyld-sw
parent 168f6df908
commit b57e3d1ad7

View file

@ -618,7 +618,7 @@ ACMD(do_mteleport)
if (valid_dg_target(vict, DG_ALLOW_GODS)) {
char_from_room(vict);
char_to_room(vict, target);
enter_wtrigger(&world[IN_ROOM(ch)], ch, -1);
enter_wtrigger(&world[IN_ROOM(vict)], vict, -1);
}
}
} else {
@ -632,10 +632,10 @@ ACMD(do_mteleport)
return;
}
if (valid_dg_target(ch, DG_ALLOW_GODS)) {
if (valid_dg_target(vict, DG_ALLOW_GODS)) {
char_from_room(vict);
char_to_room(vict, target);
enter_wtrigger(&world[IN_ROOM(ch)], ch, -1);
enter_wtrigger(&world[IN_ROOM(vict)], vict, -1);
}
}
}