diff options
author | Bertram <bertram@cegetel.net> | 2010-03-03 23:36:37 +0100 |
---|---|---|
committer | Bertram <bertram@cegetel.net> | 2010-03-03 23:36:37 +0100 |
commit | 8cc31b582f372238ce6bd2c86888d312cf1fe5b2 (patch) | |
tree | 8db5f864348d08a05b8533c7ede58e76741a98f8 /src/net/ea/partyhandler.cpp | |
parent | b1845e9e081df1fc77d9bcbed3ab95792d6ba682 (diff) | |
parent | d564943867452ad76e6d313a28870e640715dded (diff) | |
download | mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.gz mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.bz2 mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.tar.xz mana-client-8cc31b582f372238ce6bd2c86888d312cf1fe5b2.zip |
Merge branch 'master' of gitorious.org:mana/mana
Conflicts:
src/being.cpp
Diffstat (limited to 'src/net/ea/partyhandler.cpp')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 157898dc..922e59d1 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -68,11 +68,8 @@ PartyHandler::PartyHandler(): PartyHandler::~PartyHandler() { - if (partyTab) - { - delete partyTab; - partyTab = 0; - } + delete partyTab; + partyTab = 0; } void PartyHandler::handleMessage(Net::MessageIn &msg) @@ -104,11 +101,12 @@ void PartyHandler::handleMessage(Net::MessageIn &msg) bool leader = msg.readInt8() == 0; bool online = msg.readInt8() == 0; - PartyMember *member = new PartyMember(PARTY_ID, id, nick); + PartyMember *member = eaParty->addMember(id, nick); member->setLeader(leader); member->setOnline(online); - eaParty->addMember(member); } + + player_node->setParty(eaParty); } break; case SMSG_PARTY_INVITE_RESPONSE: @@ -270,6 +268,13 @@ void PartyHandler::handleMessage(Net::MessageIn &msg) m->setHp(hp); m->setMaxHp(maxhp); } + + // The server only sends this when the member is in range, so + // lets make sure they get the party hilight. + if (Being *b = beingManager->findBeing(id)) + { + static_cast<Player*>(b)->setParty(eaParty); + } } break; case SMSG_PARTY_UPDATE_COORDS: |