diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 22:45:33 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 22:45:33 +0000 |
commit | 71892967a5849e95d7ea964f1f46242d9222d54a (patch) | |
tree | f80c0d15d40e679631f5ae7ab7cd10dbf9347678 /src/char_sql/char.c | |
parent | 63601a1a0618861f8b987797a04e7e7c8e20bc7a (diff) | |
download | hercules-71892967a5849e95d7ea964f1f46242d9222d54a.tar.gz hercules-71892967a5849e95d7ea964f1f46242d9222d54a.tar.bz2 hercules-71892967a5849e95d7ea964f1f46242d9222d54a.tar.xz hercules-71892967a5849e95d7ea964f1f46242d9222d54a.zip |
Removing a friend will also remove you from your friends friendlist, bugreport:2977
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15119 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r-- | src/char_sql/char.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index ed6940228..9c3d5492d 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2758,6 +2758,22 @@ int parse_frommap(int fd) } break; + case 0x2b07: // Remove RFIFOL(fd,6) (friend_id) from RFIFOL(fd,2) (char_id) friend list [Ind] + if (RFIFOREST(fd) < 6) + return 0; + { + int char_id, friend_id; + char_id = RFIFOL(fd,2); + friend_id = RFIFOL(fd,6); + if( SQL_ERROR == Sql_Query(sql_handle, "DELETE FROM `%s` WHERE `char_id`='%d' AND `friend_id`='%d' LIMIT 1", + friend_db, char_id, friend_id) ) { + Sql_ShowDebug(sql_handle); + break; + } + RFIFOSKIP(fd,10); + } + break; + case 0x2b08: // char name request if (RFIFOREST(fd) < 6) return 0; |