diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 18:59:10 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 18:59:10 -0700 |
commit | 6ec98a246ee9915cdcc4a58f5de6882e415adc2f (patch) | |
tree | 45add22f8dfc85c45910cad41db79c979310c113 /src/localplayer.cpp | |
parent | 75dbcb1b780fe3fc2f09cbcdc05f9559446ef482 (diff) | |
download | mana-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.gz mana-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.bz2 mana-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.xz mana-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.zip |
Move ManaServ guild code into GuildHandler
Ad start eAthena's GuildHandler
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 22ca20d1..e736a01c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -46,6 +46,7 @@ #include "gui/widgets/chattab.h" +#include "net/guildhandler.h" #include "net/inventoryhandler.h" #include "net/net.h" #include "net/partyhandler.h" @@ -54,12 +55,8 @@ #include "net/tradehandler.h" #include "effectmanager.h" -#ifdef MANASERV_SUPPORT #include "guild.h" -#include "net/manaserv/chatserver/guild.h" -#endif - #include "resources/animation.h" #include "resources/imageset.h" #include "resources/itemdb.h" @@ -368,6 +365,10 @@ bool LocalPlayer::checkInviteRights(const std::string &guildName) void LocalPlayer::inviteToGuild(Being *being) { + if (being->getType() != PLAYER) + return; + Player *player = static_cast<Player*>(being); + // TODO: Allow user to choose which guild to invite being to // For now, just invite to the first guild you have permissions to invite with std::map<int, Guild*>::iterator itr = mGuilds.begin(); @@ -376,7 +377,7 @@ void LocalPlayer::inviteToGuild(Being *being) { if (checkInviteRights(itr->second->getName())) { - ManaServ::ChatServer::Guild::invitePlayer(being->getName(), itr->second->getId()); + Net::getGuildHandler()->invite(itr->second->getId(), player); return; } } |