summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/generalhandler.cpp6
-rw-r--r--src/net/ea/generalhandler.h2
-rw-r--r--src/net/ea/playerhandler.cpp9
-rw-r--r--src/net/ea/playerhandler.h2
-rw-r--r--src/net/ea/specialhandler.cpp (renamed from src/net/ea/skillhandler.cpp)24
-rw-r--r--src/net/ea/specialhandler.h (renamed from src/net/ea/skillhandler.h)14
6 files changed, 32 insertions, 25 deletions
diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp
index 959e7632..8ff62d37 100644
--- a/src/net/ea/generalhandler.cpp
+++ b/src/net/ea/generalhandler.cpp
@@ -42,7 +42,7 @@
#include "net/ea/playerhandler.h"
#include "net/ea/partyhandler.h"
#include "net/ea/tradehandler.h"
-#include "net/ea/skillhandler.h"
+#include "net/ea/specialhandler.h"
#include "net/ea/gui/partytab.h"
@@ -78,7 +78,7 @@ GeneralHandler::GeneralHandler():
mNpcHandler(new NpcHandler),
mPartyHandler(new PartyHandler),
mPlayerHandler(new PlayerHandler),
- mSkillHandler(new SkillHandler),
+ mSpecialHandler(new SpecialHandler),
mTradeHandler(new TradeHandler)
{
static const Uint16 _messages[] = {
@@ -158,7 +158,7 @@ void GeneralHandler::load()
mNetwork->registerHandler(mMapHandler.get());
mNetwork->registerHandler(mNpcHandler.get());
mNetwork->registerHandler(mPlayerHandler.get());
- mNetwork->registerHandler(mSkillHandler.get());
+ mNetwork->registerHandler(mSpecialHandler.get());
mNetwork->registerHandler(mTradeHandler.get());
mNetwork->registerHandler(mPartyHandler.get());
}
diff --git a/src/net/ea/generalhandler.h b/src/net/ea/generalhandler.h
index ebbc84ca..98364e5d 100644
--- a/src/net/ea/generalhandler.h
+++ b/src/net/ea/generalhandler.h
@@ -66,7 +66,7 @@ class GeneralHandler : public MessageHandler, public Net::GeneralHandler
MessageHandlerPtr mNpcHandler;
MessageHandlerPtr mPartyHandler;
MessageHandlerPtr mPlayerHandler;
- MessageHandlerPtr mSkillHandler;
+ MessageHandlerPtr mSpecialHandler;
MessageHandlerPtr mTradeHandler;
};
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 07b738ee..9eecc445 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -469,6 +469,15 @@ void PlayerHandler::decreaseStat(LocalPlayer::Attribute attr)
// Supported by eA?
}
+void PlayerHandler::increaseSkill(int skillId)
+{
+ if (player_node->getSkillPoints() <= 0)
+ return;
+
+ MessageOut outMsg(CMSG_SKILL_LEVELUP_REQUEST);
+ outMsg.writeInt16(skillId);
+}
+
void PlayerHandler::pickUp(FloorItem *floorItem)
{
MessageOut outMsg(CMSG_ITEM_PICKUP);
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 5dbc171b..dcf53f6f 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -43,6 +43,8 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler
void decreaseStat(LocalPlayer::Attribute attr);
+ void increaseSkill(int skillId);
+
void pickUp(FloorItem *floorItem);
void setDirection(char direction);
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/specialhandler.cpp
index 9fb4e566..e75ed1bb 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/specialhandler.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "net/ea/skillhandler.h"
+#include "net/ea/specialhandler.h"
#include "net/ea/protocol.h"
@@ -67,11 +67,11 @@
/** should always be zero if failed */
#define SKILL_FAILED 0x00
-Net::SkillHandler *skillHandler;
+Net::SpecialHandler *specialHandler;
namespace EAthena {
-SkillHandler::SkillHandler()
+SpecialHandler::SpecialHandler()
{
static const Uint16 _messages[] = {
SMSG_PLAYER_SKILLS,
@@ -80,10 +80,10 @@ SkillHandler::SkillHandler()
0
};
handledMessages = _messages;
- skillHandler = this;
+ specialHandler = this;
}
-void SkillHandler::handleMessage(MessageIn &msg)
+void SpecialHandler::handleMessage(MessageIn &msg)
{
int skillCount;
int skillId;
@@ -223,26 +223,22 @@ void SkillHandler::handleMessage(MessageIn &msg)
}
}
-void SkillHandler::up(int skillId)
+void SpecialHandler::use(int id)
{
- if (player_node->getSkillPoints() <= 0)
- return;
-
- MessageOut outMsg(CMSG_SKILL_LEVELUP_REQUEST);
- outMsg.writeInt16(skillId);
+ // TODO
}
-void SkillHandler::use(int skillId, int level, int beingId)
+void SpecialHandler::use(int id, int level, int beingId)
{
// TODO
}
-void SkillHandler::use(int skillId, int level, int x, int y)
+void SpecialHandler::use(int id, int level, int x, int y)
{
// TODO
}
-void SkillHandler::use(int skillId, const std::string &map)
+void SpecialHandler::use(int id, const std::string &map)
{
// TODO
}
diff --git a/src/net/ea/skillhandler.h b/src/net/ea/specialhandler.h
index c1965213..eac53569 100644
--- a/src/net/ea/skillhandler.h
+++ b/src/net/ea/specialhandler.h
@@ -24,24 +24,24 @@
#include "net/messagehandler.h"
#include "net/net.h"
-#include "net/skillhandler.h"
+#include "net/specialhandler.h"
namespace EAthena {
-class SkillHandler : public MessageHandler, public Net::SkillHandler
+class SpecialHandler : public MessageHandler, public Net::SpecialHandler
{
public:
- SkillHandler();
+ SpecialHandler();
void handleMessage(MessageIn &msg);
- void up(int skillId);
+ void use(int id);
- void use(int skillId, int level, int beingId);
+ void use(int id, int level, int beingId);
- void use(int skillId, int level, int x, int y);
+ void use(int id, int level, int x, int y);
- void use(int skillId, const std::string &map);
+ void use(int id, const std::string &map);
};
} // namespace EAthena