diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-03 22:23:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-03 22:23:30 +0300 |
commit | 2b4fecc8a93722d3cb080edcae436c329641937b (patch) | |
tree | 23d2ec5dc93fda645b637de77d42924a87efd33b | |
parent | 7758b86aaa0d368ef776ad826903a0b3bcc7102c (diff) | |
download | manaverse-2b4fecc8a93722d3cb080edcae436c329641937b.tar.gz manaverse-2b4fecc8a93722d3cb080edcae436c329641937b.tar.bz2 manaverse-2b4fecc8a93722d3cb080edcae436c329641937b.tar.xz manaverse-2b4fecc8a93722d3cb080edcae436c329641937b.zip |
Fix code style and remove some unused variabled.
-rw-r--r-- | src/net/ea/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/guildhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 11 | ||||
-rw-r--r-- | src/net/ea/loginhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 2 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 13 |
6 files changed, 24 insertions, 9 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 0f0b3214a..ea9d17798 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -212,7 +212,7 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) } } else if (chatMsg.length() > 3 - && chatMsg.find("\302\202") == 0) + && chatMsg.find("\302\202") == 0) { chatMsg = chatMsg.erase(0, 2); if (showMsg && chatWindow) diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 163fed401..bb5cbe94b 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -423,7 +423,7 @@ void GuildHandler::processGuildInviteAck(Net::MessageIn &msg) void GuildHandler::processGuildLeave(Net::MessageIn &msg) { std::string nick = msg.readString(24); // Name - std::string message = msg.readString(40); // Message + msg.readString(40); // Message if (taGuild) taGuild->removeMember(nick); @@ -468,7 +468,7 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) { std::string nick = msg.readString(24); // Name (of expulsed?) - std::string message = msg.readString(40); // Message + msg.readString(40); // Message msg.skip(24); // unused ("dummy") if (taGuild) taGuild->removeMember(nick); diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 04967b0a7..acd674d12 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -158,7 +158,8 @@ int InventoryHandler::getSlot(int eAthenaSlot) return EQUIP_POINTS[position]; } -void InventoryHandler::processPlayerInventory(Net::MessageIn &msg, bool playerInvintory) +void InventoryHandler::processPlayerInventory(Net::MessageIn &msg, + bool playerInvintory) { int index, amount, itemId, arrow; int cards[4], itemType; @@ -450,7 +451,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) { int index, amount, itemId, refine; unsigned char identified; - int cards[4]; +// int cards[4]; // Move an item into storage index = msg.readInt16() - STORAGE_OFFSET; @@ -460,7 +461,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) msg.readInt8(); // attribute refine = msg.readInt8(); for (int i = 0; i < 4; i++) - cards[i] = msg.readInt16(); + msg.readInt16(); // card i if (Item *item = mStorage->getItem(index)) { @@ -583,10 +584,10 @@ void InventoryHandler::processPlayerEquip(Net::MessageIn &msg) void InventoryHandler::processPlayerUnEquip(Net::MessageIn &msg) { - int index, equipType; + int equipType; int flag; - index = msg.readInt16() - INVENTORY_OFFSET; + msg.readInt16(); // inder val - INVENTORY_OFFSET; equipType = msg.readInt16(); flag = msg.readInt8(); diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index 2bce6c251..51502895c 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -38,6 +38,7 @@ LoginHandler::LoginHandler(): mVersionResponse(false), mRegistrationEnabled(true) { + mToken.clear(); } LoginHandler::~LoginHandler() diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp index 1194cb9f2..ca7fe511f 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -100,7 +100,7 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) case GPMSG_PLAYER_SERVER_CHANGE: { // TODO: Implement reconnecting to another game server - std::string token = msg.readString(32); + msg.readString(32); // token std::string address = msg.readString(); int port = msg.readInt16(); logger->log("Changing server to %s:%d", address.c_str(), port); diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 40bc35f1c..6658236f3 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -35,13 +35,20 @@ ItemInfo::ItemInfo(ItemInfo &info) { + mMissileParticleFile = info.mMissileParticleFile; + mDisplay = info.mDisplay; + mName = info.mName; + mDescription = info.mDescription; + mEffect = info.mEffect; mType = info.mType; + mParticle = info.mParticle; mWeight = info.mWeight; mView = info.mView; mId = info.mId; mIsRemoveSprites = info.mIsRemoveSprites; mAttackAction = info.mAttackAction; mAttackRange = info.mAttackRange; + mMissileParticle = info.mMissileParticle; mColors = info.mColors; mColorList = info.mColorList; mHitEffectId = info.mHitEffectId; @@ -56,13 +63,19 @@ ItemInfo::ItemInfo(ItemInfo &info) } ItemInfo::ItemInfo() : + mMissileParticleFile(""), + mName(""), + mDescription(""), + mEffect(""), mType(ITEM_UNUSABLE), + mParticle(""), mWeight(0), mView(0), mId(0), mIsRemoveSprites(false), mAttackAction(SpriteAction::INVALID), mAttackRange(0), + mMissileParticle(""), mColors(0), mColorList(""), mHitEffectId(0), |