summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-04 17:00:09 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-04 17:00:09 +0300
commite668ab141d6b006b790d2b0a8fc515d13b78317e (patch)
treeb4aa71e9a4af62c948183328bbf74c2e1bf4eb84 /src/party.cpp
parent98cc93d2321b9be0a2a5ae6bf67aecf6adcdd2fb (diff)
downloadManaVerse-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.gz
ManaVerse-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.bz2
ManaVerse-e668ab141d6b006b790d2b0a8fc515d13b78317e.tar.xz
ManaVerse-e668ab141d6b006b790d2b0a8fc515d13b78317e.zip
Cleanup part list and beinginfo.
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/party.cpp b/src/party.cpp
index e3ea497ac..f3f787807 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -292,4 +292,15 @@ Party *Party::getParty(short id)
void Party::sort()
{
std::sort(mMembers.begin(), mMembers.end(), partySorter);
-} \ No newline at end of file
+}
+
+void Party::clearParties()
+{
+ PartyMap::iterator it = parties.begin();
+ while (it != parties.end())
+ {
+ delete (*it).second;
+ ++ it;
+ }
+ parties.clear();
+}