diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-08 15:39:02 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-08 15:39:02 -0700 |
commit | a4007a7f8f253e90bb189cfb22b3e0c798440bdc (patch) | |
tree | 0b04750b4e108496f58490edd0e91c3d313c34a3 /src/party.cpp | |
parent | 40e1928f3f20efe1be383c4c9a55dffc5506d56f (diff) | |
download | mana-a4007a7f8f253e90bb189cfb22b3e0c798440bdc.tar.gz mana-a4007a7f8f253e90bb189cfb22b3e0c798440bdc.tar.bz2 mana-a4007a7f8f253e90bb189cfb22b3e0c798440bdc.tar.xz mana-a4007a7f8f253e90bb189cfb22b3e0c798440bdc.zip |
Fix some bugs in party handling and add HP to AvatarListBox
Diffstat (limited to 'src/party.cpp')
-rw-r--r-- | src/party.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/party.cpp b/src/party.cpp index 6bbd0f6b..9a661e5b 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -145,6 +145,21 @@ void Party::removeMember(const std::string &name) } } +void Party::removeFromMembers() +{ + MemberList::iterator itr = mMembers.begin(), + itr_end = mMembers.end(); + while(itr != itr_end) + { + Player *p = dynamic_cast<Player*>(beingManager->findBeing((*itr)->getID())); + if (p) + { + p->setParty(NULL); + } + ++itr; + } +} + Avatar *Party::getAvatarAt(int index) { return mMembers[index]; |