diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-14 00:24:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-14 00:24:26 +0300 |
commit | 69348d6158802801a626938d5ced85807fd514d8 (patch) | |
tree | 647dc95866ef2ef2d9d1c112459a8ce9f321bcfe /src/net/eathena | |
parent | 8438ad4513e9aa2af4b42317aa05358e36f06e98 (diff) | |
download | plus-69348d6158802801a626938d5ced85807fd514d8.tar.gz plus-69348d6158802801a626938d5ced85807fd514d8.tar.bz2 plus-69348d6158802801a626938d5ced85807fd514d8.tar.xz plus-69348d6158802801a626938d5ced85807fd514d8.zip |
eathena: fix packet SMSG_PARTY_INVITED 0x02c6.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 16 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.h | 1 |
2 files changed, 4 insertions, 13 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 452cf1408..ea5b71089 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -152,12 +152,13 @@ void PartyHandler::invite(const std::string &name) const } void PartyHandler::inviteResponse(const std::string &inviter A_UNUSED, + const int partyId, const bool accept) const { if (localPlayer) { createOutPacket(CMSG_PARTY_INVITED2); - outMsg.writeInt32(localPlayer->getId(), "account id"); + outMsg.writeInt32(partyId, "party id"); outMsg.writeInt8(static_cast<int8_t>(accept ? 1 : 0), "accept"); } } @@ -501,20 +502,9 @@ void PartyHandler::processPartyInvited(Net::MessageIn &msg) { const int id = msg.readInt32("account id"); const std::string partyName = msg.readString(24, "party name"); - std::string nick; - - if (actorManager) - { - const Being *const being = actorManager->findBeing(id); - if (being) - { - if (being->getType() == ActorType::Player) - nick = being->getName(); - } - } if (socialWindow) - socialWindow->showPartyInvite(partyName, nick); + socialWindow->showPartyInvite(partyName, "", id); } } // namespace EAthena diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index f389bcb42..81127f8c8 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -45,6 +45,7 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void invite(const std::string &name) const override final; void inviteResponse(const std::string &inviter, + const int partyId, const bool accept) const override final; void leave() const override final; |