summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-30 18:04:08 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-30 18:04:08 +0300
commit19738d5a2d5d96aef78e51da99061a22d7cf15bb (patch)
treedced9aacaf48cf32d4a1d4a7399861c96aebc22c /src/net
parentc96d089ab76316e5117c49e2ccdd3e9aab4bd29f (diff)
downloadmv-19738d5a2d5d96aef78e51da99061a22d7cf15bb.tar.gz
mv-19738d5a2d5d96aef78e51da99061a22d7cf15bb.tar.bz2
mv-19738d5a2d5d96aef78e51da99061a22d7cf15bb.tar.xz
mv-19738d5a2d5d96aef78e51da99061a22d7cf15bb.zip
Remove unused code from guildhandler.
Fix memory leak in guild class.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/guildhandler.cpp5
-rw-r--r--src/net/ea/guildhandler.h2
-rw-r--r--src/net/guildhandler.h2
-rw-r--r--src/net/manaserv/guildhandler.cpp4
-rw-r--r--src/net/manaserv/guildhandler.h2
-rw-r--r--src/net/tmwa/guildhandler.cpp23
-rw-r--r--src/net/tmwa/guildhandler.h13
7 files changed, 15 insertions, 36 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index cf0e19b36..163fed401 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -587,4 +587,9 @@ void GuildHandler::processGuildBroken(Net::MessageIn &msg)
msg.readInt32(); // Flag
}
+void GuildHandler::clear()
+{
+ taGuild = 0;
+}
+
} // namespace Ea
diff --git a/src/net/ea/guildhandler.h b/src/net/ea/guildhandler.h
index 7c516c61b..06edb2e89 100644
--- a/src/net/ea/guildhandler.h
+++ b/src/net/ea/guildhandler.h
@@ -104,6 +104,8 @@ class GuildHandler : public Net::GuildHandler
virtual void processGuildBroken(Net::MessageIn &msg);
+ void clear();
+
protected:
bool showBasicInfo;
};
diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h
index d5556074c..4070abad5 100644
--- a/src/net/guildhandler.h
+++ b/src/net/guildhandler.h
@@ -70,6 +70,8 @@ class GuildHandler
virtual void changeNotice(int guildId, std::string msg1,
std::string msg2) = 0;
+
+ virtual void clear() = 0;
};
}
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index 354b96762..dc3dbc616 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -358,4 +358,8 @@ void GuildHandler::changeNotice(int guildId A_UNUSED,
// TODO
}
+void GuildHandler::clear()
+{
+}
+
} // namespace ManaServ
diff --git a/src/net/manaserv/guildhandler.h b/src/net/manaserv/guildhandler.h
index 11fc2dfdb..023e60b08 100644
--- a/src/net/manaserv/guildhandler.h
+++ b/src/net/manaserv/guildhandler.h
@@ -76,6 +76,8 @@ public:
void changeNotice(int guildId, std::string msg1,
std::string msg2);
+ void clear();
+
protected:
void joinedGuild(Net::MessageIn &msg);
};
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index cbb32c3c8..43583971f 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -311,24 +311,6 @@ void GuildHandler::changeMemberPostion(GuildMember *member, int level)
msg.writeInt32(level); // pos
}
-void GuildHandler::requestAlliance(int guildId A_UNUSED,
- int otherGuildId A_UNUSED)
-{
- // TODO
-}
-
-void GuildHandler::requestAllianceResponse(int guildId A_UNUSED,
- int otherGuildId A_UNUSED,
- bool response A_UNUSED)
-{
- // TODO
-}
-
-void GuildHandler::endAlliance(int guildId A_UNUSED, int otherGuildId A_UNUSED)
-{
- // TODO
-}
-
void GuildHandler::changeNotice(int guildId, std::string msg1,
std::string msg2)
{
@@ -338,9 +320,4 @@ void GuildHandler::changeNotice(int guildId, std::string msg1,
msg.writeString(msg2, 120); // msg2
}
-bool GuildHandler::isSupported()
-{
- return true;
-}
-
} // namespace TmwAthena
diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h
index 58bfa2b0c..d8a1cc9e7 100644
--- a/src/net/tmwa/guildhandler.h
+++ b/src/net/tmwa/guildhandler.h
@@ -68,20 +68,7 @@ class GuildHandler : public Ea::GuildHandler, public MessageHandler
void changeMemberPostion(GuildMember *member, int level);
- void requestAlliance(int guildId, int otherGuildId);
-
- void requestAllianceResponse(int guildId, int otherGuildId,
- bool response);
-
- void endAlliance(int guildId, int otherGuildId);
-
void changeNotice(int guildId, std::string msg1, std::string msg2);
-
- bool isSupported();
-
- private:
- // TmwAthena (and eAthena) only supports one guild per player
-// Guild *mGuild;
};
extern Ea::GuildTab *guildTab;