diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-11 01:50:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-11 04:28:43 +0300 |
commit | e27ab1c594b8ab927708a769c8ee3d58f51a89a3 (patch) | |
tree | ba038da1c40a368aad9f3d77d4554b99efa918cf /src/net/eathena | |
parent | ce34b402281f75cb1e9d214c925382fdc522455b (diff) | |
download | plus-e27ab1c594b8ab927708a769c8ee3d58f51a89a3.tar.gz plus-e27ab1c594b8ab927708a769c8ee3d58f51a89a3.tar.bz2 plus-e27ab1c594b8ab927708a769c8ee3d58f51a89a3.tar.xz plus-e27ab1c594b8ab927708a769c8ee3d58f51a89a3.zip |
Add clandb support.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/clanrecv.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/clanrecv.cpp b/src/net/eathena/clanrecv.cpp index 1eebb1581..a46cf4f57 100644 --- a/src/net/eathena/clanrecv.cpp +++ b/src/net/eathena/clanrecv.cpp @@ -34,6 +34,10 @@ #include "utils/checkutils.h" #include "utils/delete2.h" +#include "resources/claninfo.h" + +#include "resources/db/clandb.h" + #include "debug.h" namespace EAthena @@ -58,6 +62,16 @@ void ClanRecv::processClanInfo(Net::MessageIn &msg) localClan.antagonistClans.push_back( msg.readString(24, "antagonist clan name")); } + const ClanInfo *const info = ClanDb::get(localClan.id); + if (info == nullptr) + { + reportAlways("missing clan %d in clandb", + localClan.id); + } + else + { + localClan.stats = info->stats; + } createTab(); } |