summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
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();
+}