summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/net.cpp6
-rw-r--r--src/net/serverinfo.h9
-rw-r--r--src/net/tmwa/adminhandler.cpp (renamed from src/net/ea/adminhandler.cpp)8
-rw-r--r--src/net/tmwa/adminhandler.h (renamed from src/net/ea/adminhandler.h)12
-rw-r--r--src/net/tmwa/beinghandler.cpp (renamed from src/net/ea/beinghandler.cpp)8
-rw-r--r--src/net/tmwa/beinghandler.h (renamed from src/net/ea/beinghandler.h)12
-rw-r--r--src/net/tmwa/buysellhandler.cpp (renamed from src/net/ea/buysellhandler.cpp)8
-rw-r--r--src/net/tmwa/buysellhandler.h (renamed from src/net/ea/buysellhandler.h)12
-rw-r--r--src/net/tmwa/charserverhandler.cpp (renamed from src/net/ea/charserverhandler.cpp)14
-rw-r--r--src/net/tmwa/charserverhandler.h (renamed from src/net/ea/charserverhandler.h)14
-rw-r--r--src/net/tmwa/chathandler.cpp (renamed from src/net/ea/chathandler.cpp)8
-rw-r--r--src/net/tmwa/chathandler.h (renamed from src/net/ea/chathandler.h)12
-rw-r--r--src/net/tmwa/gamehandler.cpp (renamed from src/net/ea/gamehandler.cpp)12
-rw-r--r--src/net/tmwa/gamehandler.h (renamed from src/net/ea/gamehandler.h)14
-rw-r--r--src/net/tmwa/generalhandler.cpp (renamed from src/net/ea/generalhandler.cpp)54
-rw-r--r--src/net/tmwa/generalhandler.h (renamed from src/net/ea/generalhandler.h)12
-rw-r--r--src/net/tmwa/gui/guildtab.cpp (renamed from src/net/ea/gui/guildtab.cpp)20
-rw-r--r--src/net/tmwa/gui/guildtab.h (renamed from src/net/ea/gui/guildtab.h)10
-rw-r--r--src/net/tmwa/gui/partytab.cpp (renamed from src/net/ea/gui/partytab.cpp)6
-rw-r--r--src/net/tmwa/gui/partytab.h (renamed from src/net/ea/gui/partytab.h)10
-rw-r--r--src/net/tmwa/guildhandler.cpp (renamed from src/net/ea/guildhandler.cpp)18
-rw-r--r--src/net/tmwa/guildhandler.h (renamed from src/net/ea/guildhandler.h)12
-rw-r--r--src/net/tmwa/inventoryhandler.cpp (renamed from src/net/ea/inventoryhandler.cpp)8
-rw-r--r--src/net/tmwa/inventoryhandler.h (renamed from src/net/ea/inventoryhandler.h)12
-rw-r--r--src/net/tmwa/itemhandler.cpp (renamed from src/net/ea/itemhandler.cpp)8
-rw-r--r--src/net/tmwa/itemhandler.h (renamed from src/net/ea/itemhandler.h)12
-rw-r--r--src/net/tmwa/loginhandler.cpp (renamed from src/net/ea/loginhandler.cpp)10
-rw-r--r--src/net/tmwa/loginhandler.h (renamed from src/net/ea/loginhandler.h)14
-rw-r--r--src/net/tmwa/messagehandler.cpp (renamed from src/net/ea/messagehandler.cpp)8
-rw-r--r--src/net/tmwa/messagehandler.h (renamed from src/net/ea/messagehandler.h)10
-rw-r--r--src/net/tmwa/messagein.cpp (renamed from src/net/ea/messagein.cpp)6
-rw-r--r--src/net/tmwa/messagein.h (renamed from src/net/ea/messagein.h)8
-rw-r--r--src/net/tmwa/messageout.cpp (renamed from src/net/ea/messageout.cpp)10
-rw-r--r--src/net/tmwa/messageout.h (renamed from src/net/ea/messageout.h)8
-rw-r--r--src/net/tmwa/network.cpp (renamed from src/net/ea/network.cpp)8
-rw-r--r--src/net/tmwa/network.h (renamed from src/net/ea/network.h)16
-rw-r--r--src/net/tmwa/npchandler.cpp (renamed from src/net/ea/npchandler.cpp)8
-rw-r--r--src/net/tmwa/npchandler.h (renamed from src/net/ea/npchandler.h)12
-rw-r--r--src/net/tmwa/partyhandler.cpp (renamed from src/net/ea/partyhandler.cpp)38
-rw-r--r--src/net/tmwa/partyhandler.h (renamed from src/net/ea/partyhandler.h)12
-rw-r--r--src/net/tmwa/playerhandler.cpp (renamed from src/net/ea/playerhandler.cpp)8
-rw-r--r--src/net/tmwa/playerhandler.h (renamed from src/net/ea/playerhandler.h)12
-rw-r--r--src/net/tmwa/protocol.h (renamed from src/net/ea/protocol.h)4
-rw-r--r--src/net/tmwa/specialhandler.cpp (renamed from src/net/ea/specialhandler.cpp)8
-rw-r--r--src/net/tmwa/specialhandler.h (renamed from src/net/ea/specialhandler.h)12
-rw-r--r--src/net/tmwa/token.h (renamed from src/net/ea/token.h)6
-rw-r--r--src/net/tmwa/tradehandler.cpp (renamed from src/net/ea/tradehandler.cpp)8
-rw-r--r--src/net/tmwa/tradehandler.h (renamed from src/net/ea/tradehandler.h)12
48 files changed, 286 insertions, 283 deletions
diff --git a/src/net/net.cpp b/src/net/net.cpp
index f7ab3897..5e7c989f 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -37,7 +37,7 @@
#include "net/specialhandler.h"
#include "net/tradehandler.h"
-#include "net/ea/generalhandler.h"
+#include "net/tmwa/generalhandler.h"
#include "net/manaserv/generalhandler.h"
@@ -149,8 +149,8 @@ void connectToServer(const ServerInfo &server)
new ManaServ::GeneralHandler;
break;
- case ServerInfo::EATHENA:
- new EAthena::GeneralHandler;
+ case ServerInfo::TMWATHENA:
+ new TmwAthena::GeneralHandler;
break;
default:
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 8b5b8f9d..b888cbbf 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -33,7 +33,7 @@ public:
enum Type {
UNKNOWN,
MANASERV,
- EATHENA
+ TMWATHENA
};
typedef std::pair<int, std::string> VersionString;
@@ -99,8 +99,11 @@ public:
static Type parseType(const std::string &type)
{
- if (compareStrI(type, "eathena") == 0)
- return EATHENA;
+ if (compareStrI(type, "tmwathena") == 0)
+ return TMWATHENA;
+ // Used for backward compatibility
+ else if (compareStrI(type, "eathena") == 0)
+ return TMWATHENA;
else if (compareStrI(type, "manaserv") == 0)
return MANASERV;
diff --git a/src/net/ea/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index 010a932e..e56d5a44 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/adminhandler.h"
+#include "net/tmwa/adminhandler.h"
#include "being.h"
#include "beingmanager.h"
@@ -31,7 +31,7 @@
#include "net/chathandler.h"
#include "net/net.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -40,7 +40,7 @@
extern Net::AdminHandler *adminHandler;
-namespace EAthena {
+namespace TmwAthena {
AdminHandler::AdminHandler()
{
@@ -128,4 +128,4 @@ void AdminHandler::mute(int playerId, int type, int limit)
outMsg.writeInt16(limit);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/adminhandler.h b/src/net/tmwa/adminhandler.h
index 8847ecb3..7d5b4fb5 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_ADMINHANDLER_H
-#define NET_EA_ADMINHANDLER_H
+#ifndef NET_TA_ADMINHANDLER_H
+#define NET_TA_ADMINHANDLER_H
#include "net/adminhandler.h"
#include "net/net.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class AdminHandler : public MessageHandler, public Net::AdminHandler
{
@@ -57,6 +57,6 @@ class AdminHandler : public MessageHandler, public Net::AdminHandler
void mute(int playerId, int type, int limit);
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_ADMINHANDLER_H
+#endif // NET_TA_ADMINHANDLER_H
diff --git a/src/net/ea/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 55df2ede..04690c50 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/beinghandler.h"
+#include "net/tmwa/beinghandler.h"
#include "being.h"
#include "beingmanager.h"
@@ -32,13 +32,13 @@
#include "party.h"
#include "playerrelations.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "resources/colordb.h"
#include <iostream>
-namespace EAthena {
+namespace TmwAthena {
const int EMOTION_TIME = 150; /**< Duration of emotion icon */
@@ -711,4 +711,4 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
}
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/beinghandler.h b/src/net/tmwa/beinghandler.h
index b946b3f6..ab833af0 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -19,12 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_BEINGHANDLER_H
-#define NET_EA_BEINGHANDLER_H
+#ifndef NET_TA_BEINGHANDLER_H
+#define NET_TA_BEINGHANDLER_H
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class BeingHandler : public MessageHandler
{
@@ -38,6 +38,6 @@ class BeingHandler : public MessageHandler
bool mSync;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_BEINGHANDLER_H
+#endif // NET_TA_BEINGHANDLER_H
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index 0e4f1be9..209f034d 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/buysellhandler.h"
+#include "net/tmwa/buysellhandler.h"
#include "beingmanager.h"
#include "inventory.h"
@@ -35,11 +35,11 @@
#include "net/messagein.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
-namespace EAthena {
+namespace TmwAthena {
BuySellHandler::BuySellHandler()
{
@@ -135,4 +135,4 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
}
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/buysellhandler.h b/src/net/tmwa/buysellhandler.h
index 320a9dd2..6ba0df93 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/tmwa/buysellhandler.h
@@ -19,14 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_BUYSELLHANDLER_H
-#define NET_EA_BUYSELLHANDLER_H
+#ifndef NET_TA_BUYSELLHANDLER_H
+#define NET_TA_BUYSELLHANDLER_H
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
class BuyDialog;
-namespace EAthena {
+namespace TmwAthena {
class BuySellHandler : public MessageHandler
{
@@ -40,6 +40,6 @@ class BuySellHandler : public MessageHandler
BuyDialog *mBuyDialog;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_BUYSELLHANDLER_H
+#endif // NET_TA_BUYSELLHANDLER_H
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 6f1506b5..f91dfc77 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/charserverhandler.h"
+#include "net/tmwa/charserverhandler.h"
#include "client.h"
#include "game.h"
@@ -33,10 +33,10 @@
#include "net/messageout.h"
#include "net/net.h"
-#include "net/ea/gamehandler.h"
-#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/gamehandler.h"
+#include "net/tmwa/loginhandler.h"
+#include "net/tmwa/network.h"
+#include "net/tmwa/protocol.h"
#include "resources/colordb.h"
@@ -46,7 +46,7 @@
extern Net::CharHandler *charHandler;
-namespace EAthena {
+namespace TmwAthena {
extern ServerInfo charServer;
extern ServerInfo mapServer;
@@ -349,4 +349,4 @@ void CharServerHandler::connect()
mNetwork->skip(4);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index 8f1b5d73..e80d22c4 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -19,18 +19,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_CHARSERVERHANDLER_H
-#define NET_EA_CHARSERVERHANDLER_H
+#ifndef NET_TA_CHARSERVERHANDLER_H
+#define NET_TA_CHARSERVERHANDLER_H
#include "net/charhandler.h"
#include "net/serverinfo.h"
-#include "net/ea/messagehandler.h"
-#include "net/ea/token.h"
+#include "net/tmwa/messagehandler.h"
+#include "net/tmwa/token.h"
class LoginData;
-namespace EAthena {
+namespace TmwAthena {
/**
* Deals with incoming messages from the character server.
@@ -75,6 +75,6 @@ class CharServerHandler : public MessageHandler, public Net::CharHandler
LocalPlayer *readPlayerData(Net::MessageIn &msg, int *slot);
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_CHARSERVERHANDLER_H
+#endif // NET_TA_CHARSERVERHANDLER_H
diff --git a/src/net/ea/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 096ca631..640d04c1 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/chathandler.h"
+#include "net/tmwa/chathandler.h"
#include "being.h"
#include "beingmanager.h"
@@ -32,7 +32,7 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -41,7 +41,7 @@
extern Net::ChatHandler *chatHandler;
-namespace EAthena {
+namespace TmwAthena {
ChatHandler::ChatHandler()
{
@@ -245,4 +245,4 @@ void ChatHandler::who()
MessageOut outMsg(CMSG_WHO_REQUEST);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/chathandler.h b/src/net/tmwa/chathandler.h
index aceb05a2..3e035f7e 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_CHATHANDLER_H
-#define NET_EA_CHATHANDLER_H
+#ifndef NET_TA_CHATHANDLER_H
+#define NET_TA_CHATHANDLER_H
#include "net/chathandler.h"
#include "net/net.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class ChatHandler : public MessageHandler, public Net::ChatHandler
{
@@ -63,6 +63,6 @@ class ChatHandler : public MessageHandler, public Net::ChatHandler
void who();
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_CHATHANDLER_H
+#endif // NET_TA_CHATHANDLER_H
diff --git a/src/net/ea/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index cabaf763..179d98e4 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/gamehandler.h"
+#include "net/tmwa/gamehandler.h"
#include "client.h"
#include "game.h"
@@ -33,16 +33,16 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/loginhandler.h"
+#include "net/tmwa/network.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
extern Net::GameHandler *gameHandler;
-namespace EAthena {
+namespace TmwAthena {
extern ServerInfo mapServer;
@@ -171,4 +171,4 @@ void GameHandler::setMap(const std::string map)
mMap = map.substr(0, map.rfind("."));
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/gamehandler.h b/src/net/tmwa/gamehandler.h
index b8b6626d..ca8d27e6 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/tmwa/gamehandler.h
@@ -19,17 +19,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_MAPHANDLER_H
-#define NET_EA_MAPHANDLER_H
+#ifndef NET_TA_MAPHANDLER_H
+#define NET_TA_MAPHANDLER_H
#include "net/gamehandler.h"
#include "net/net.h"
#include "net/serverinfo.h"
-#include "net/ea/messagehandler.h"
-#include "net/ea/token.h"
+#include "net/tmwa/messagehandler.h"
+#include "net/tmwa/token.h"
-namespace EAthena {
+namespace TmwAthena {
class GameHandler : public MessageHandler, public Net::GameHandler
{
@@ -65,6 +65,6 @@ class GameHandler : public MessageHandler, public Net::GameHandler
int mCharID; /// < Saved for map-server switching
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_MAPHANDLER_H
+#endif // NET_TA_MAPHANDLER_H
diff --git a/src/net/ea/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 047aee63..a975abe8 100644
--- a/src/net/ea/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/generalhandler.h"
+#include "net/tmwa/generalhandler.h"
#include "client.h"
#include "configuration.h"
@@ -32,26 +32,26 @@
#include "gui/socialwindow.h"
#include "gui/statuswindow.h"
-#include "net/ea/adminhandler.h"
-#include "net/ea/beinghandler.h"
-#include "net/ea/buysellhandler.h"
-#include "net/ea/chathandler.h"
-#include "net/ea/charserverhandler.h"
-#include "net/ea/gamehandler.h"
-#include "net/ea/guildhandler.h"
-#include "net/ea/inventoryhandler.h"
-#include "net/ea/itemhandler.h"
-#include "net/ea/loginhandler.h"
-#include "net/ea/network.h"
-#include "net/ea/npchandler.h"
-#include "net/ea/partyhandler.h"
-#include "net/ea/playerhandler.h"
-#include "net/ea/protocol.h"
-#include "net/ea/tradehandler.h"
-#include "net/ea/specialhandler.h"
-
-#include "net/ea/gui/guildtab.h"
-#include "net/ea/gui/partytab.h"
+#include "net/tmwa/adminhandler.h"
+#include "net/tmwa/beinghandler.h"
+#include "net/tmwa/buysellhandler.h"
+#include "net/tmwa/chathandler.h"
+#include "net/tmwa/charserverhandler.h"
+#include "net/tmwa/gamehandler.h"
+#include "net/tmwa/guildhandler.h"
+#include "net/tmwa/inventoryhandler.h"
+#include "net/tmwa/itemhandler.h"
+#include "net/tmwa/loginhandler.h"
+#include "net/tmwa/network.h"
+#include "net/tmwa/npchandler.h"
+#include "net/tmwa/partyhandler.h"
+#include "net/tmwa/playerhandler.h"
+#include "net/tmwa/protocol.h"
+#include "net/tmwa/tradehandler.h"
+#include "net/tmwa/specialhandler.h"
+
+#include "net/tmwa/gui/guildtab.h"
+#include "net/tmwa/gui/partytab.h"
#include "net/messagein.h"
#include "net/messageout.h"
@@ -65,13 +65,13 @@
extern Net::GeneralHandler *generalHandler;
-namespace EAthena {
+namespace TmwAthena {
ServerInfo charServer;
ServerInfo mapServer;
-extern Guild *eaGuild;
-extern Party *eaParty;
+extern Guild *taGuild;
+extern Party *taParty;
GeneralHandler::GeneralHandler():
mAdminHandler(new AdminHandler),
@@ -232,8 +232,8 @@ void GeneralHandler::guiWindowsLoaded()
void GeneralHandler::guiWindowsUnloaded()
{
- socialWindow->removeTab(eaGuild);
- socialWindow->removeTab(eaParty);
+ socialWindow->removeTab(taGuild);
+ socialWindow->removeTab(taParty);
delete guildTab;
guildTab = 0;
@@ -252,4 +252,4 @@ void GeneralHandler::stateChanged(State oldState, State newState)
//
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/generalhandler.h b/src/net/tmwa/generalhandler.h
index f0857abe..d680f215 100644
--- a/src/net/ea/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -19,16 +19,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_GENERALHANDLER_H
-#define NET_EA_GENERALHANDLER_H
+#ifndef NET_TMWA_GENERALHANDLER_H
+#define NET_TMWA_GENERALHANDLER_H
#include "net/generalhandler.h"
#include "net/net.h"
#include "net/serverinfo.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class GeneralHandler : public MessageHandler, public Net::GeneralHandler
{
@@ -73,6 +73,6 @@ class GeneralHandler : public MessageHandler, public Net::GeneralHandler
MessageHandlerPtr mTradeHandler;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_GENERALHANDLER_H
+#endif // NET_TA_GENERALHANDLER_H
diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/tmwa/gui/guildtab.cpp
index e6fddf4f..794ad5cc 100644
--- a/src/net/ea/gui/guildtab.cpp
+++ b/src/net/tmwa/gui/guildtab.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/gui/guildtab.h"
+#include "net/tmwa/gui/guildtab.h"
#include "commandhandler.h"
#include "guild.h"
@@ -37,9 +37,9 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-namespace EAthena {
+namespace TmwAthena {
-extern Guild *eaGuild;
+extern Guild *taGuild;
GuildTab::GuildTab() :
ChatTab(_("Guild"))
@@ -53,7 +53,7 @@ GuildTab::~GuildTab()
void GuildTab::handleInput(const std::string &msg)
{
- Net::getGuildHandler()->chat(eaGuild->getId(), msg);
+ Net::getGuildHandler()->chat(taGuild->getId(), msg);
}
void GuildTab::showHelp()
@@ -92,15 +92,15 @@ bool GuildTab::handleCommand(const std::string &type, const std::string &args)
}
else if (type == "invite")
{
- Net::getGuildHandler()->invite(eaGuild->getId(), args);
+ Net::getGuildHandler()->invite(taGuild->getId(), args);
}
else if (type == "leave")
{
- Net::getGuildHandler()->leave(eaGuild->getId());
+ Net::getGuildHandler()->leave(taGuild->getId());
}
else if (type == "kick")
{
- Net::getGuildHandler()->kick(eaGuild->getMember(args));
+ Net::getGuildHandler()->kick(taGuild->getMember(args));
}
else
return false;
@@ -110,8 +110,8 @@ bool GuildTab::handleCommand(const std::string &type, const std::string &args)
void GuildTab::getAutoCompleteList(std::vector<std::string> &names) const
{
- if (eaGuild)
- eaGuild->getNames(names);
+ if (taGuild)
+ taGuild->getNames(names);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/gui/guildtab.h b/src/net/tmwa/gui/guildtab.h
index 58c8f539..031c81bf 100644
--- a/src/net/ea/gui/guildtab.h
+++ b/src/net/tmwa/gui/guildtab.h
@@ -19,12 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef EA_GUILDTAB_H
-#define EA_GUILDTAB_H
+#ifndef TA_GUILDTAB_H
+#define TA_GUILDTAB_H
#include "gui/widgets/chattab.h"
-namespace EAthena {
+namespace TmwAthena {
/**
* A tab for a guild chat channel.
@@ -47,6 +47,6 @@ class GuildTab : public ChatTab
extern GuildTab *guildTab;
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // EA_GUILDTAB_H
+#endif // TA_GUILDTAB_H
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/tmwa/gui/partytab.cpp
index 85311352..03dadb04 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/tmwa/gui/partytab.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/gui/partytab.h"
+#include "net/tmwa/gui/partytab.h"
#include "commandhandler.h"
#include "localplayer.h"
@@ -37,7 +37,7 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-namespace EAthena {
+namespace TmwAthena {
PartyTab::PartyTab() :
ChatTab(_("Party"))
@@ -206,4 +206,4 @@ void PartyTab::getAutoCompleteList(std::vector<std::string> &names) const
p->getNames(names);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/gui/partytab.h b/src/net/tmwa/gui/partytab.h
index af111836..62027726 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/tmwa/gui/partytab.h
@@ -19,12 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef EA_PARTYTAB_H
-#define EA_PARTYTAB_H
+#ifndef TA_PARTYTAB_H
+#define TA_PARTYTAB_H
#include "gui/widgets/chattab.h"
-namespace EAthena {
+namespace TmwAthena {
/**
* A tab for a party chat channel.
@@ -47,6 +47,6 @@ class PartyTab : public ChatTab
extern PartyTab *partyTab;
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // EA_PARTYTAB_H
+#endif // TA_PARTYTAB_H
diff --git a/src/net/ea/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index bb2fdff7..8a106841 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/guildhandler.h"
+#include "net/tmwa/guildhandler.h"
#include "guild.h"
#include "localplayer.h"
@@ -26,19 +26,19 @@
#include "gui/socialwindow.h"
-#include "net/ea/messagein.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/messagein.h"
+#include "net/tmwa/protocol.h"
-#include "net/ea/gui/guildtab.h"
+#include "net/tmwa/gui/guildtab.h"
#include "utils/gettext.h"
extern Net::GuildHandler *guildHandler;
-namespace EAthena {
+namespace TmwAthena {
GuildTab *guildTab = 0;
-Guild *eaGuild;
+Guild *taGuild;
GuildHandler::GuildHandler()
{
@@ -171,7 +171,7 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
int length = msg.readInt16();
int count = (length - 4) / 104;
- eaGuild->clearMembers();
+ taGuild->clearMembers();
for (int i = 0; i < count; i++)
{
@@ -188,7 +188,7 @@ void GuildHandler::handleMessage(Net::MessageIn &msg)
msg.skip(50); // unused
std::string name = msg.readString(24); // Name
- GuildMember *m = eaGuild->addMember(id, name);
+ GuildMember *m = taGuild->addMember(id, name);
m->setOnline(online);
}
}
@@ -477,4 +477,4 @@ void GuildHandler::endAlliance(int guildId, int otherGuildId)
// TODO
}
-}
+} // namespace TmwAthena
diff --git a/src/net/ea/guildhandler.h b/src/net/tmwa/guildhandler.h
index df43a2a1..39dbe486 100644
--- a/src/net/ea/guildhandler.h
+++ b/src/net/tmwa/guildhandler.h
@@ -18,14 +18,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_GUILDHANDLER_H
-#define NET_EA_GUILDHANDLER_H
+#ifndef NET_TA_GUILDHANDLER_H
+#define NET_TA_GUILDHANDLER_H
#include "net/guildhandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class GuildHandler : public Net::GuildHandler, public MessageHandler
{
@@ -62,10 +62,10 @@ class GuildHandler : public Net::GuildHandler, public MessageHandler
void endAlliance(int guildId, int otherGuildId);
private:
- // eAthena only supports one guild per player
+ // TmwAthena (and eAthena) only supports one guild per player
Guild *mGuild;
};
}
-#endif // NET_EA_GUILDHANDLER_H
+#endif // NET_TA_GUILDHANDLER_H
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 36d024f6..fd979dc6 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/inventoryhandler.h"
+#include "net/tmwa/inventoryhandler.h"
#include "configuration.h"
#include "equipment.h"
@@ -34,7 +34,7 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "resources/iteminfo.h"
@@ -58,7 +58,7 @@ const Equipment::Slot EQUIP_POINTS[Equipment::EQUIP_VECTOREND] = {
Equipment::EQUIP_TORSO_SLOT,
Equipment::EQUIP_PROJECTILE_SLOT};
-namespace EAthena {
+namespace TmwAthena {
int getSlot(int eAthenaSlot)
{
@@ -516,4 +516,4 @@ size_t InventoryHandler::getSize(int type) const
}
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index cb127af9..82738afe 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_INVENTORYHANDLER_H
-#define NET_EA_INVENTORYHANDLER_H
+#ifndef NET_TA_INVENTORYHANDLER_H
+#define NET_TA_INVENTORYHANDLER_H
#include "equipment.h"
#include "inventory.h"
@@ -31,11 +31,11 @@
#include "net/inventoryhandler.h"
#include "net/net.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
#include <list>
-namespace EAthena {
+namespace TmwAthena {
class EquipBackend : public Equipment::Backend {
public:
@@ -159,6 +159,6 @@ class InventoryHandler : public MessageHandler, public Net::InventoryHandler
InventoryWindow *mStorageWindow;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_INVENTORYHANDLER_H
+#endif // NET_TA_INVENTORYHANDLER_H
diff --git a/src/net/ea/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp
index e3c55c92..abc8103b 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/tmwa/itemhandler.cpp
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/itemhandler.h"
+#include "net/tmwa/itemhandler.h"
#include "flooritemmanager.h"
#include "net/messagein.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
-namespace EAthena {
+namespace TmwAthena {
ItemHandler::ItemHandler()
{
@@ -65,4 +65,4 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
}
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/itemhandler.h b/src/net/tmwa/itemhandler.h
index 7d2bab3d..712eb2bd 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/tmwa/itemhandler.h
@@ -19,12 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_ITEMHANDLER_H
-#define NET_EA_ITEMHANDLER_H
+#ifndef NET_TA_ITEMHANDLER_H
+#define NET_TA_ITEMHANDLER_H
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class ItemHandler : public MessageHandler
{
@@ -34,6 +34,6 @@ class ItemHandler : public MessageHandler
virtual void handleMessage(Net::MessageIn &msg);
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_ITEMHANDLER_H
+#endif // NET_TA_ITEMHANDLER_H
diff --git a/src/net/ea/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 42ba0c61..7d973ba3 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/loginhandler.h"
+#include "net/tmwa/loginhandler.h"
#include "client.h"
#include "log.h"
@@ -28,8 +28,8 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/network.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/network.h"
+#include "net/tmwa/protocol.h"
#include "utils/dtor.h"
#include "utils/gettext.h"
@@ -37,7 +37,7 @@
extern Net::LoginHandler *loginHandler;
-namespace EAthena {
+namespace TmwAthena {
extern ServerInfo charServer;
@@ -312,4 +312,4 @@ void LoginHandler::clearWorlds()
mWorlds.clear();
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/loginhandler.h b/src/net/tmwa/loginhandler.h
index 1dd4f52c..455c75f1 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -19,19 +19,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_LOGINHANDLER_H
-#define NET_EA_LOGINHANDLER_H
+#ifndef NET_TMWA_LOGINHANDLER_H
+#define NET_TMWA_LOGINHANDLER_H
#include "net/loginhandler.h"
-#include "net/ea/messagehandler.h"
-#include "net/ea/token.h"
+#include "net/tmwa/messagehandler.h"
+#include "net/tmwa/token.h"
#include <string>
struct LoginData;
-namespace EAthena {
+namespace TmwAthena {
class LoginHandler : public MessageHandler, public Net::LoginHandler
{
@@ -89,6 +89,6 @@ class LoginHandler : public MessageHandler, public Net::LoginHandler
Token mToken;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_LOGINHANDLER_H
+#endif // NET_TA_LOGINHANDLER_H
diff --git a/src/net/ea/messagehandler.cpp b/src/net/tmwa/messagehandler.cpp
index c1fdd3fd..65e61302 100644
--- a/src/net/ea/messagehandler.cpp
+++ b/src/net/tmwa/messagehandler.cpp
@@ -19,13 +19,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-#include "net/ea/network.h"
+#include "net/tmwa/network.h"
#include <cassert>
-namespace EAthena {
+namespace TmwAthena {
MessageHandler::MessageHandler()
: mNetwork(NULL)
@@ -44,4 +44,4 @@ void MessageHandler::setNetwork(Network *network)
mNetwork = network;
}
-}
+} // namespace TmwAthena
diff --git a/src/net/ea/messagehandler.h b/src/net/tmwa/messagehandler.h
index aa4090c5..0fa2e80c 100644
--- a/src/net/ea/messagehandler.h
+++ b/src/net/tmwa/messagehandler.h
@@ -19,19 +19,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_MESSAGEHANDLER_H
-#define NET_EA_MESSAGEHANDLER_H
+#ifndef NET_TA_MESSAGEHANDLER_H
+#define NET_TA_MESSAGEHANDLER_H
#include "net/messagehandler.h"
#include "net/messagein.h"
-#include "net/ea/messageout.h"
+#include "net/tmwa/messageout.h"
#include <SDL_types.h>
#include <memory>
-namespace EAthena {
+namespace TmwAthena {
class Network;
@@ -55,4 +55,4 @@ typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr;
}
-#endif // NET_EA_MESSAGEHANDLER_H
+#endif // NET_TA_MESSAGEHANDLER_H
diff --git a/src/net/ea/messagein.cpp b/src/net/tmwa/messagein.cpp
index f7463677..0074cfdd 100644
--- a/src/net/ea/messagein.cpp
+++ b/src/net/tmwa/messagein.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/messagein.h"
+#include "net/tmwa/messagein.h"
#include <SDL.h>
#include <SDL_endian.h>
@@ -28,7 +28,7 @@
((unsigned short)(((unsigned char)(low)) | \
((unsigned short)((unsigned char)(high))) << 8))
-namespace EAthena {
+namespace TmwAthena {
MessageIn::MessageIn(const char *data, unsigned int length):
Net::MessageIn(data, length)
@@ -71,4 +71,4 @@ int MessageIn::readInt32()
return value;
}
-}
+} // namespace TmwAthena
diff --git a/src/net/ea/messagein.h b/src/net/tmwa/messagein.h
index 625d1595..aa94bba1 100644
--- a/src/net/ea/messagein.h
+++ b/src/net/tmwa/messagein.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_MESSAGEIN_H
-#define NET_EA_MESSAGEIN_H
+#ifndef NET_TA_MESSAGEIN_H
+#define NET_TA_MESSAGEIN_H
#include "net/messagein.h"
#include <SDL_types.h>
#include <string>
-namespace EAthena {
+namespace TmwAthena {
/**
* Used for parsing an incoming message.
@@ -48,4 +48,4 @@ namespace EAthena {
}
-#endif // NET_EA_MESSAGEIN_H
+#endif // NET_TA_MESSAGEIN_H
diff --git a/src/net/ea/messageout.cpp b/src/net/tmwa/messageout.cpp
index 844580a9..8b407c47 100644
--- a/src/net/ea/messageout.cpp
+++ b/src/net/tmwa/messageout.cpp
@@ -19,9 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/messageout.h"
+#include "net/tmwa/messageout.h"
-#include "net/ea/network.h"
+#include "net/tmwa/network.h"
#include <SDL.h>
#include <SDL_endian.h>
@@ -29,12 +29,12 @@
#include <cstring>
#include <string>
-namespace EAthena {
+namespace TmwAthena {
MessageOut::MessageOut(short id):
Net::MessageOut(id)
{
- mNetwork = EAthena::Network::instance();
+ mNetwork = TmwAthena::Network::instance();
mData = mNetwork->mOutBuffer + mNetwork->mOutSize;
writeInt16(id);
}
@@ -125,4 +125,4 @@ void MessageOut::writeCoordinates(unsigned short x, unsigned short y,
data[2] |= direction;
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/messageout.h b/src/net/tmwa/messageout.h
index a418f459..c9d87a1b 100644
--- a/src/net/ea/messageout.h
+++ b/src/net/tmwa/messageout.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_MESSAGEOUT_H
-#define NET_EA_MESSAGEOUT_H
+#ifndef NET_TA_MESSAGEOUT_H
+#define NET_TA_MESSAGEOUT_H
#include "net/messageout.h"
#include <iosfwd>
#include <SDL_types.h>
-namespace EAthena {
+namespace TmwAthena {
class Network;
@@ -61,4 +61,4 @@ class MessageOut : public Net::MessageOut
}
-#endif // NET_EA_MESSAGEOUT_H
+#endif // NET_TA_MESSAGEOUT_H
diff --git a/src/net/ea/network.cpp b/src/net/tmwa/network.cpp
index 0467241f..ddfbbc5d 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -19,14 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/network.h"
+#include "net/tmwa/network.h"
#include "log.h"
#include "net/messagehandler.h"
#include "net/messagein.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -84,7 +84,7 @@ short packet_lengths[] = {
const unsigned int BUFFER_SIZE = 65536;
-namespace EAthena {
+namespace TmwAthena {
int networkThread(void *data)
{
@@ -475,4 +475,4 @@ Uint16 Network::readWord(int pos)
#endif
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/network.h b/src/net/tmwa/network.h
index 0b391bf0..2c19c218 100644
--- a/src/net/ea/network.h
+++ b/src/net/tmwa/network.h
@@ -19,14 +19,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_NETWORK_H
-#define NET_EA_NETWORK_H
+#ifndef NET_TA_NETWORK_H
+#define NET_TA_NETWORK_H
#include "net/serverinfo.h"
-#include "net/ea/messagehandler.h"
-#include "net/ea/messagein.h"
-#include "net/ea/messageout.h"
+#include "net/tmwa/messagehandler.h"
+#include "net/tmwa/messagein.h"
+#include "net/tmwa/messageout.h"
#include <SDL_net.h>
#include <SDL_thread.h>
@@ -40,7 +40,7 @@
*/
#define CLIENT_PROTOCOL_VERSION 1
-namespace EAthena {
+namespace TmwAthena {
class Network
{
@@ -125,6 +125,6 @@ class Network
static Network *mInstance;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_NETWORK_H
+#endif // NET_TA_NETWORK_H
diff --git a/src/net/ea/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index dfd56cf1..e6b16f2d 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/npchandler.h"
+#include "net/tmwa/npchandler.h"
#include "beingmanager.h"
#include "localplayer.h"
@@ -32,13 +32,13 @@
#include "net/net.h"
#include "net/npchandler.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include <SDL_types.h>
extern Net::NpcHandler *npcHandler;
-namespace EAthena {
+namespace TmwAthena {
NpcHandler::NpcHandler()
{
@@ -223,4 +223,4 @@ void NpcHandler::endShopping(int beingId)
// TODO
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/npchandler.h b/src/net/tmwa/npchandler.h
index f6d8e8a5..a40371a6 100644
--- a/src/net/ea/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -19,19 +19,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_NPCHANDLER_H
-#define NET_EA_NPCHANDLER_H
+#ifndef NET_TA_NPCHANDLER_H
+#define NET_TA_NPCHANDLER_H
#include "net/net.h"
#include "net/npchandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
#include <map>
class NpcDialog;
-namespace EAthena {
+namespace TmwAthena {
class NpcHandler : public MessageHandler, public Net::NpcHandler
{
@@ -75,6 +75,6 @@ class NpcHandler : public MessageHandler, public Net::NpcHandler
NpcDialogs mNpcDialogs;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_NPCHANDLER_H
+#endif // NET_TA_NPCHANDLER_H
diff --git a/src/net/ea/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index f27318d6..440b75f4 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/partyhandler.h"
+#include "net/tmwa/partyhandler.h"
#include "beingmanager.h"
#include "localplayer.h"
@@ -29,9 +29,9 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
-#include "net/ea/gui/partytab.h"
+#include "net/tmwa/gui/partytab.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -40,10 +40,10 @@
extern Net::PartyHandler *partyHandler;
-namespace EAthena {
+namespace TmwAthena {
PartyTab *partyTab = 0;
-Party *eaParty;
+Party *taParty;
PartyHandler::PartyHandler():
mShareExp(PARTY_SHARE_UNKNOWN), mShareItems(PARTY_SHARE_UNKNOWN)
@@ -63,7 +63,7 @@ PartyHandler::PartyHandler():
};
handledMessages = _messages;
partyHandler = this;
- eaParty = Party::getParty(1);
+ taParty = Party::getParty(1);
}
PartyHandler::~PartyHandler()
@@ -87,10 +87,10 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_PARTY_INFO:
{
- eaParty->clearMembers();
+ taParty->clearMembers();
int length = msg.readInt16();
- eaParty->setName(msg.readString(24));
+ taParty->setName(msg.readString(24));
int count = (length - 28) / 46;
for (int i = 0; i < count; i++)
@@ -101,12 +101,12 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
bool leader = msg.readInt8() == 0;
bool online = msg.readInt8() == 0;
- PartyMember *member = eaParty->addMember(id, nick);
+ PartyMember *member = taParty->addMember(id, nick);
member->setLeader(leader);
member->setOnline(online);
}
- player_node->setParty(eaParty);
+ player_node->setParty(taParty);
}
break;
case SMSG_PARTY_INVITE_RESPONSE:
@@ -236,8 +236,8 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
msg.readInt8(); // fail
if (id == player_node->getId())
{
- eaParty->removeFromMembers();
- eaParty->clearMembers();
+ taParty->removeFromMembers();
+ taParty->clearMembers();
localChatTab->chatLog(_("You have left the party."),
BY_SERVER);
if (partyTab)
@@ -245,7 +245,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
delete partyTab;
partyTab = 0;
}
- socialWindow->removeTab(eaParty);
+ socialWindow->removeTab(taParty);
}
else
{
@@ -256,7 +256,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
if (b->getType() == Being::PLAYER)
static_cast<Player*>(b)->setParty(NULL);
- eaParty->removeMember(id);
+ taParty->removeMember(id);
}
break;
}
@@ -265,7 +265,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
int id = msg.readInt32();
int hp = msg.readInt16();
int maxhp = msg.readInt16();
- PartyMember *m = eaParty->getMember(id);
+ PartyMember *m = taParty->getMember(id);
if (m)
{
m->setHp(hp);
@@ -276,7 +276,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
// lets make sure they get the party hilight.
if (Being *b = beingManager->findBeing(id))
{
- static_cast<Player*>(b)->setParty(eaParty);
+ static_cast<Player*>(b)->setParty(taParty);
}
}
break;
@@ -297,7 +297,7 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
int id = msg.readInt32();
std::string chatMsg = msg.readString(msgLength);
- PartyMember *member = eaParty->getMember(id);
+ PartyMember *member = taParty->getMember(id);
if (member)
partyTab->chatLog(member->getName(), chatMsg);
else
@@ -362,7 +362,7 @@ void PartyHandler::kick(Player *player)
void PartyHandler::kick(const std::string &name)
{
- PartyMember *m = eaParty->getMember(name);
+ PartyMember *m = taParty->getMember(name);
if (!m)
{
partyTab->chatLog(strprintf(_("%s is not in your party!"), name.c_str()),
@@ -408,4 +408,4 @@ void PartyHandler::setShareItems(PartyShare share)
outMsg.writeInt16(share);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/partyhandler.h b/src/net/tmwa/partyhandler.h
index 09f05bb3..fc8d741f 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/tmwa/partyhandler.h
@@ -18,17 +18,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_PARTYHANDLER_H
-#define NET_EA_PARTYHANDLER_H
+#ifndef NET_TA_PARTYHANDLER_H
+#define NET_TA_PARTYHANDLER_H
#include "net/net.h"
#include "net/partyhandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
#include "party.h"
-namespace EAthena {
+namespace TmwAthena {
class PartyHandler : public MessageHandler, public Net::PartyHandler
{
@@ -71,6 +71,6 @@ class PartyHandler : public MessageHandler, public Net::PartyHandler
PartyShare mShareExp, mShareItems;
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_PARTYHANDLER_H
+#endif // NET_TA_PARTYHANDLER_H
diff --git a/src/net/ea/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 6aeb5168..afa2c71b 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/playerhandler.h"
+#include "net/tmwa/playerhandler.h"
#include "game.h"
#include "localplayer.h"
@@ -41,7 +41,7 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/stringutils.h"
#include "utils/gettext.h"
@@ -141,7 +141,7 @@ static const char *randomDeathMessage()
extern Net::PlayerHandler *playerHandler;
-namespace EAthena {
+namespace TmwAthena {
PlayerHandler::PlayerHandler()
{
@@ -649,4 +649,4 @@ Vector PlayerHandler::getDefaultWalkSpeed()
return Vector(150, 150, 0);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/playerhandler.h b/src/net/tmwa/playerhandler.h
index d963c812..cb352110 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_PLAYERHANDLER_H
-#define NET_EA_PLAYERHANDLER_H
+#ifndef NET_TA_PLAYERHANDLER_H
+#define NET_TA_PLAYERHANDLER_H
#include "net/net.h"
#include "net/playerhandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class PlayerHandler : public MessageHandler, public Net::PlayerHandler
{
@@ -61,6 +61,6 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler
Vector getDefaultWalkSpeed();
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_PLAYERHANDLER_H
+#endif // NET_TA_PLAYERHANDLER_H
diff --git a/src/net/ea/protocol.h b/src/net/tmwa/protocol.h
index 2d9c13c3..21d562bc 100644
--- a/src/net/ea/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef EA_PROTOCOL_H
-#define EA_PROTOCOL_H
+#ifndef TA_PROTOCOL_H
+#define TA_PROTOCOL_H
enum {
JOB = 0xa,
diff --git a/src/net/ea/specialhandler.cpp b/src/net/tmwa/specialhandler.cpp
index 4a7bb765..bd1b2e5a 100644
--- a/src/net/ea/specialhandler.cpp
+++ b/src/net/tmwa/specialhandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/specialhandler.h"
+#include "net/tmwa/specialhandler.h"
#include "localplayer.h"
#include "log.h"
@@ -31,7 +31,7 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
@@ -69,7 +69,7 @@
extern Net::SpecialHandler *specialHandler;
-namespace EAthena {
+namespace TmwAthena {
SpecialHandler::SpecialHandler()
{
@@ -252,4 +252,4 @@ void SpecialHandler::use(int id, const std::string &map)
outMsg.writeString(map, 16);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/specialhandler.h b/src/net/tmwa/specialhandler.h
index 3ac27f8b..e8af0f69 100644
--- a/src/net/ea/specialhandler.h
+++ b/src/net/tmwa/specialhandler.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_SKILLHANDLER_H
-#define NET_EA_SKILLHANDLER_H
+#ifndef NET_TA_SKILLHANDLER_H
+#define NET_TA_SKILLHANDLER_H
#include "net/net.h"
#include "net/specialhandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class SpecialHandler : public MessageHandler, public Net::SpecialHandler
{
@@ -45,6 +45,6 @@ class SpecialHandler : public MessageHandler, public Net::SpecialHandler
void use(int id, const std::string &map);
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_SKILLHANDLER_H
+#endif // NET_TA_SKILLHANDLER_H
diff --git a/src/net/ea/token.h b/src/net/tmwa/token.h
index 19884c7b..d2a21012 100644
--- a/src/net/ea/token.h
+++ b/src/net/tmwa/token.h
@@ -21,8 +21,8 @@
#include "player.h"
-#ifndef NET_EA_TOKEN_H
-#define NET_EA_TOKEN_H
+#ifndef NET_TA_TOKEN_H
+#define NET_TA_TOKEN_H
struct Token
{
@@ -40,4 +40,4 @@ struct Token
}
};
-#endif // NET_EA_TOKEN_H
+#endif // NET_TA_TOKEN_H
diff --git a/src/net/ea/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp
index 797a1523..9089f8e6 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/tmwa/tradehandler.cpp
@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "net/ea/tradehandler.h"
+#include "net/tmwa/tradehandler.h"
#include "inventory.h"
#include "item.h"
@@ -35,7 +35,7 @@
#include "net/messagein.h"
#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/tmwa/protocol.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -59,7 +59,7 @@ namespace {
extern Net::TradeHandler *tradeHandler;
-namespace EAthena {
+namespace TmwAthena {
TradeHandler::TradeHandler()
{
@@ -285,4 +285,4 @@ void TradeHandler::cancel()
MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST);
}
-} // namespace EAthena
+} // namespace TmwAthena
diff --git a/src/net/ea/tradehandler.h b/src/net/tmwa/tradehandler.h
index b6bf3560..c396e8cc 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/tmwa/tradehandler.h
@@ -19,15 +19,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NET_EA_TRADEHANDLER_H
-#define NET_EA_TRADEHANDLER_H
+#ifndef NET_TA_TRADEHANDLER_H
+#define NET_TA_TRADEHANDLER_H
#include "net/net.h"
#include "net/tradehandler.h"
-#include "net/ea/messagehandler.h"
+#include "net/tmwa/messagehandler.h"
-namespace EAthena {
+namespace TmwAthena {
class TradeHandler : public MessageHandler, public Net::TradeHandler
{
@@ -53,6 +53,6 @@ class TradeHandler : public MessageHandler, public Net::TradeHandler
void cancel();
};
-} // namespace EAthena
+} // namespace TmwAthena
-#endif // NET_EA_TRADEHANDLER_H
+#endif // NET_TA_TRADEHANDLER_H