diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-05 19:17:33 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-05 19:17:33 -0600 |
commit | a0c7d1f61783e77e552896824855377e4bb43f8d (patch) | |
tree | e952181b83482abeffbd8ad9c62789b8f72e42e5 /src/gui/buy.cpp | |
parent | 9113afb868f6c1da5911437d3ddabdcf169cbec2 (diff) | |
download | mana-a0c7d1f61783e77e552896824855377e4bb43f8d.tar.gz mana-a0c7d1f61783e77e552896824855377e4bb43f8d.tar.bz2 mana-a0c7d1f61783e77e552896824855377e4bb43f8d.tar.xz mana-a0c7d1f61783e77e552896824855377e4bb43f8d.zip |
Implement TMWServ's NpcHandler
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r-- | src/gui/buy.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 7cefa3e5..8d963227 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -34,11 +34,8 @@ #include "shopitem.h" #include "units.h" -#ifdef TMWSERV_SUPPORT -#include "net/tmwserv/gameserver/player.h" -#else -#include "net/ea/npchandler.h" -#endif +#include "net/net.h" +#include "net/npchandler.h" #include "resources/iteminfo.h" @@ -187,13 +184,9 @@ void BuyDialog::action(const gcn::ActionEvent &event) else if (event.getId() == "buy" && mAmountItems > 0 && mAmountItems <= mMaxItems) { - // Net::getNpcHandler()->buyItem(current_npc, mShopItems->at(selectedItem)->getId(), mAmountItems); -#ifdef TMWSERV_SUPPORT - Net::GameServer::Player::tradeWithNPC - (mShopItems->at(selectedItem)->getId(), mAmountItems); -#else - npcHandler->buyItem(current_npc, mShopItems->at(selectedItem)->getId(), mAmountItems); -#endif + Net::getNpcHandler()->buyItem(current_npc, + mShopItems->at(selectedItem)->getId(), + mAmountItems); // Update money and adjust the max number of items that can be bought mMaxItems -= mAmountItems; |