diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-11 11:10:47 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-04-12 14:56:28 +0200 |
commit | 9e6a0f98ecb52e04ab5afce817cb1d7fe2076450 (patch) | |
tree | 97b6ffedbfbaf09389fe05c1d183471a97740ebb /src/game-server/trade.cpp | |
parent | d7fa7ea64f6bb0bc0b097e4bf1ceb4bd9620d0da (diff) | |
download | manaserv-9e6a0f98ecb52e04ab5afce817cb1d7fe2076450.tar.gz manaserv-9e6a0f98ecb52e04ab5afce817cb1d7fe2076450.tar.xz manaserv-9e6a0f98ecb52e04ab5afce817cb1d7fe2076450.zip |
Moved Actor into an Component
This was the final step to remove the hierachy with Entity on the top.
Diffstat (limited to 'src/game-server/trade.cpp')
-rw-r--r-- | src/game-server/trade.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/trade.cpp b/src/game-server/trade.cpp index 1d86313..3fbcd0e 100644 --- a/src/game-server/trade.cpp +++ b/src/game-server/trade.cpp @@ -41,7 +41,7 @@ Trade::Trade(Entity *c1, Entity *c2): mChar1(c1), mChar2(c2), mMoney1(0), mMoney2(0), mState(TRADE_INIT), mCurrencyId(ATTR_GP) { MessageOut msg(GPMSG_TRADE_REQUEST); - msg.writeInt16(static_cast<Actor *>(c1)->getPublicID()); + msg.writeInt16(c1->getComponent<ActorComponent>()->getPublicID()); c2->getComponent<CharacterComponent>()->getClient()->send(msg); c1->getComponent<CharacterComponent>()->setTrading(this); c2->getComponent<CharacterComponent>()->setTrading(this); @@ -65,7 +65,7 @@ bool Trade::request(Entity *c, int id) { //The trade isn't confirmed, the player which is request is the same. if (mState != TRADE_INIT || c != mChar2 || - static_cast<Actor *>(mChar1)->getPublicID() != id) + mChar1->getComponent<ActorComponent>()->getPublicID() != id) { /* This is not an ack for the current transaction. So assume a new one is about to start and cancel the current one. */ |