From b8e18bab09688cd73415f7ceb72a738a4528529b Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 6 Apr 2009 14:54:28 -0600 Subject: Fix to allow divorce is weird situations Like when only the requesting parter is part of the marriage. --- src/char/char.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index f7cb491..677d4b3 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1406,6 +1406,14 @@ int char_divorce(struct mmo_charstatus *cs) { char_dat[i].partner_id = 0; return 0; } + // The other char doesn't have us as their partner, so just clear our partner + // Don't worry about this, as the map server should verify itself that the other doesn't have us as a partner, and so won't mess with their marriage + else if (char_dat[i].char_id == cs->partner_id) { + WBUFL(buf,6) = cs->partner_id; + mapif_sendall(buf,10); + cs->partner_id = 0; + return 0; + } } WBUFL(buf,6) = 0; // partner id 0 means failure -- cgit v1.2.3-60-g2f50