summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-06 14:58:19 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-06 14:58:19 -0600
commit36a2e1945e4c27e438a1bce6e286691a60ed7adf (patch)
treec994dc0835b93c1d6ad2c048642708268ee40901 /src/char
parentb8e18bab09688cd73415f7ceb72a738a4528529b (diff)
downloadtmwa-36a2e1945e4c27e438a1bce6e286691a60ed7adf.tar.gz
tmwa-36a2e1945e4c27e438a1bce6e286691a60ed7adf.tar.bz2
tmwa-36a2e1945e4c27e438a1bce6e286691a60ed7adf.tar.xz
tmwa-36a2e1945e4c27e438a1bce6e286691a60ed7adf.zip
Fix divorce in other situations
Like when one char is divorced and the marriage isn't cleared
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 677d4b3..82a1723 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1393,7 +1393,13 @@ int char_divorce(struct mmo_charstatus *cs) {
return 0;
if (cs->partner_id <= 0)
+ {
+ WBUFW(buf,0) = 0x2b12;
+ WBUFL(buf,2) = cs->char_id;
+ WBUFL(buf,6) = 0; // partner id 0 means failure
+ mapif_sendall(buf,10);
return 0;
+ }
WBUFW(buf,0) = 0x2b12;
WBUFL(buf,2) = cs->char_id;
@@ -1416,7 +1422,9 @@ int char_divorce(struct mmo_charstatus *cs) {
}
}
- WBUFL(buf,6) = 0; // partner id 0 means failure
+ // Our partner wasn't found, so just clear our marriage
+ WBUFL(buf,6) = cs->partner_id;
+ cs->partner_id = 0;
mapif_sendall(buf,10);
return 0;