From 0bc322efc087ab0c7b53709e5e20ac76aee761de Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 4 Nov 2014 22:28:16 -0800 Subject: Perform divorces asynchronously to avoid crashes --- src/map/pc.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/map/pc.cpp') diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 1e7d295..70c9087 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -4709,15 +4709,12 @@ int pc_divorce(dumb_ptr sd) } p_sd->status.partner_id = CharId(); sd->status.partner_id = CharId(); - - if (sd->npc_flags.divorce) - { - sd->npc_flags.divorce = 0; - map_scriptcont(sd, sd->npc_id); - } } else + { + sd->status.partner_id = CharId(); chrif_send_divorce(sd->status_key.char_id); + } return 0; } -- cgit v1.2.3-70-g09d2