From 9e6a0f98ecb52e04ab5afce817cb1d7fe2076450 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Thu, 11 Apr 2013 11:10:47 +0200 Subject: Moved Actor into an Component This was the final step to remove the hierachy with Entity on the top. --- src/game-server/trade.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game-server/trade.cpp') diff --git a/src/game-server/trade.cpp b/src/game-server/trade.cpp index 1d863137..3fbcd0e6 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(c1)->getPublicID()); + msg.writeInt16(c1->getComponent()->getPublicID()); c2->getComponent()->getClient()->send(msg); c1->getComponent()->setTrading(this); c2->getComponent()->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(mChar1)->getPublicID() != id) + mChar1->getComponent()->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. */ -- cgit v1.2.3-70-g09d2