diff options
author | MadCamel <madcamel@gmail.com> | 2009-03-16 19:40:12 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-16 13:50:30 -0600 |
commit | d450f9fd7b5d4fd71d4f7e244ef9d0786d0f745a (patch) | |
tree | 207f03c028ea16500032bde862d9ade38d317d06 /src/map/pc.c | |
parent | 1f073198ce4a175191da2815c00cca11e81735d8 (diff) | |
download | tmwa-d450f9fd7b5d4fd71d4f7e244ef9d0786d0f745a.tar.gz tmwa-d450f9fd7b5d4fd71d4f7e244ef9d0786d0f745a.tar.bz2 tmwa-d450f9fd7b5d4fd71d4f7e244ef9d0786d0f745a.tar.xz tmwa-d450f9fd7b5d4fd71d4f7e244ef9d0786d0f745a.zip |
Now possible to divorce when partner is offline
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index b900bd0..8dfdf47 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6687,18 +6687,19 @@ int pc_divorce(struct map_session_data *sd) if(sd == NULL || !pc_ismarried(sd)) return -1; - if( (p_sd=map_nick2sd(map_charid2nick(sd->status.partner_id))) !=NULL){ + // If both are on map server we don't need to bother the char server + if( (p_sd=map_nick2sd(map_charid2nick(sd->status.partner_id))) !=NULL) { if(p_sd->status.partner_id != sd->status.char_id || sd->status.partner_id != p_sd->status.char_id){ printf("pc_divorce: Illegal partner_id sd=%d p_sd=%d\n",sd->status.partner_id,p_sd->status.partner_id); return -1; } - sd->status.partner_id=0; p_sd->status.partner_id=0; - - }else{ - printf("pc_divorce: p_sd nullpo\n"); - return -1; + sd->status.partner_id=0; + map_scriptcont(sd, sd->npc_id); } + else + chrif_send_divorce(sd->status.char_id); + return 0; } |