diff options
Diffstat (limited to 'src/net')
38 files changed, 159 insertions, 149 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 71369031..b706b088 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,6 +35,10 @@ #include "../npc.h" #include "../player_relations.h" +#include "../gui/npc_text.h" + +extern NpcTextDialog *npcTextDialog; + const int EMOTION_TIME = 150; /**< Duration of emotion icon */ BeingHandler::BeingHandler(bool enableSync): @@ -58,6 +61,7 @@ BeingHandler::BeingHandler(bool enableSync): SMSG_PLAYER_STOP, SMSG_PLAYER_MOVE_TO_ATTACK, 0x0119, + 0x0196, 0 }; handledMessages = _messages; @@ -68,13 +72,16 @@ void BeingHandler::handleMessage(MessageIn *msg) Uint32 id; Uint16 job, speed; Uint16 headTop, headMid, headBottom; - Uint16 shoes, gloves, cape, misc1, misc2; + Uint16 shoes, gloves; Uint16 weapon, shield; Uint16 gmstatus; Sint16 param1; + int stunMode; + Uint32 statusEffects; Sint8 type; + Uint16 status; Being *srcBeing, *dstBeing; - int hairStyle, hairColor; + int hairStyle, hairColor, flag; switch (msg->getId()) { @@ -83,9 +90,9 @@ void BeingHandler::handleMessage(MessageIn *msg) // Information about a being in range id = msg->readInt32(); speed = msg->readInt16(); - msg->readInt16(); // opt1 - msg->readInt16(); // opt2 - msg->readInt16(); // option + stunMode = msg->readInt16(); // opt1 + statusEffects = msg->readInt16(); // opt2 + statusEffects |= ((Uint32)msg->readInt16()) << 16; // option job = msg->readInt16(); // class dstBeing = beingManager->findBeing(id); @@ -109,6 +116,7 @@ void BeingHandler::handleMessage(MessageIn *msg) dstBeing->setAction(Being::STAND); } + // Prevent division by 0 when calculating frame if (speed == 0) { speed = 150; } @@ -127,14 +135,14 @@ void BeingHandler::handleMessage(MessageIn *msg) headTop = msg->readInt16(); headMid = msg->readInt16(); hairColor = msg->readInt16(); - shoes = msg->readInt16(); - gloves = msg->readInt16(); + shoes = msg->readInt16(); // clothes color - "abused" as shoes + gloves = msg->readInt16(); // head dir - "abused" as gloves msg->readInt16(); // guild msg->readInt16(); // unknown msg->readInt16(); // unknown msg->readInt16(); // manner - msg->readInt16(); // karma - msg->readInt8(); // unknown + dstBeing->setStatusEffectBlock(32, msg->readInt16()); // opt3 + msg->readInt8(); // karma dstBeing->setGender( (msg->readInt8() == 0) ? GENDER_FEMALE : GENDER_MALE); @@ -165,6 +173,10 @@ void BeingHandler::handleMessage(MessageIn *msg) msg->readInt8(); // unknown msg->readInt8(); // unknown msg->readInt8(); // unknown / sit + + dstBeing->setStunMode(stunMode); + dstBeing->setStatusEffectBlock(0, (statusEffects >> 16) & 0xffff); + dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff); break; case SMSG_BEING_MOVE2: @@ -197,10 +209,11 @@ void BeingHandler::handleMessage(MessageIn *msg) case SMSG_BEING_REMOVE: // A being should be removed or has died id = msg->readInt32(); - dstBeing = beingManager->findBeing(id); if (id == current_npc) - current_npc = 0; + npcTextDialog->showCloseButton(); + + dstBeing = beingManager->findBeing(id); if (!dstBeing) break; @@ -371,9 +384,10 @@ void BeingHandler::handleMessage(MessageIn *msg) // An update about a player, potentially including movement. id = msg->readInt32(); speed = msg->readInt16(); - cape = msg->readInt16(); - misc1 = msg->readInt16(); - misc2 = msg->readInt16(); + stunMode = msg->readInt16(); // opt1; Aethyra use this as cape + statusEffects = msg->readInt16(); // opt2; Aethyra use this as misc1 + statusEffects |= ((Uint32) msg->readInt16()) + << 16; // status.options; Aethyra uses this as misc2 job = msg->readInt16(); dstBeing = beingManager->findBeing(id); @@ -398,11 +412,12 @@ void BeingHandler::handleMessage(MessageIn *msg) headTop = msg->readInt16(); headMid = msg->readInt16(); hairColor = msg->readInt16(); - shoes = msg->readInt16(); - gloves = msg->readInt16(); + msg->readInt16(); // clothes color - Aethyra-"abused" as shoes, we ignore it + msg->readInt16(); // head dir - Aethyra-"abused" as gloves, we ignore it msg->readInt32(); // guild - msg->readInt32(); // emblem + msg->readInt16(); // emblem msg->readInt16(); // manner + dstBeing->setStatusEffectBlock(32, msg->readInt16()); // opt3 msg->readInt8(); // karma dstBeing->setGender( (msg->readInt8() == 0) ? GENDER_FEMALE : GENDER_MALE); @@ -413,13 +428,9 @@ void BeingHandler::handleMessage(MessageIn *msg) dstBeing->setSprite(Being::BOTTOMCLOTHES_SPRITE, headBottom); dstBeing->setSprite(Being::TOPCLOTHES_SPRITE, headMid); dstBeing->setSprite(Being::HAT_SPRITE, headTop); - dstBeing->setSprite(Being::SHOE_SPRITE, shoes); - // Compensation for the unpatched TMW server - if (gloves > 10) - dstBeing->setSprite(Being::GLOVES_SPRITE, gloves); - dstBeing->setSprite(Being::CAPE_SPRITE, cape); - dstBeing->setSprite(Being::MISC1_SPRITE, misc1); - dstBeing->setSprite(Being::MISC2_SPRITE, misc2); + //dstBeing->setSprite(Being::CAPE_SPRITE, cape); + //dstBeing->setSprite(Being::MISC1_SPRITE, misc1); + //dstBeing->setSprite(Being::MISC2_SPRITE, misc2); dstBeing->setHairStyle(hairStyle, hairColor); if (msg->getId() == SMSG_PLAYER_MOVE) @@ -460,6 +471,10 @@ void BeingHandler::handleMessage(MessageIn *msg) dstBeing->mWalkTime = tick_time; dstBeing->mFrame = 0; + + dstBeing->setStunMode(stunMode); + dstBeing->setStatusEffectBlock(0, (statusEffects >> 16) & 0xffff); + dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff); break; case SMSG_PLAYER_STOP: @@ -499,10 +514,30 @@ void BeingHandler::handleMessage(MessageIn *msg) break; case 0x0119: - // Change in players look - logger->log("0x0119 %i %i %i %x %i", msg->readInt32(), - msg->readInt16(), msg->readInt16(), msg->readInt16(), - msg->readInt8()); + // Change in players' flags + id = msg->readInt32(); + dstBeing = beingManager->findBeing(id); + stunMode = msg->readInt16(); + statusEffects = msg->readInt16(); + statusEffects |= ((Uint32) msg->readInt16()) << 16; + msg->readInt8(); + + if (dstBeing) { + dstBeing->setStunMode(stunMode); + dstBeing->setStatusEffectBlock(0, (statusEffects >> 16) & 0xffff); + dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff); + } + break; + + case 0x0196: + // Status change + status = msg->readInt16(); + id = msg->readInt32(); + flag = msg->readInt8(); // 0: stop, 1: start + + dstBeing = beingManager->findBeing(id); + if (dstBeing) + dstBeing->setStatusEffect(status, flag); break; } } diff --git a/src/net/beinghandler.h b/src/net/beinghandler.h index 5fbb57ce..54b82075 100644 --- a/src/net/beinghandler.h +++ b/src/net/beinghandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp index e9255540..65f8498a 100644 --- a/src/net/buysellhandler.cpp +++ b/src/net/buysellhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/buysellhandler.h b/src/net/buysellhandler.h index 2b4aaf4f..0ede7b48 100644 --- a/src/net/buysellhandler.h +++ b/src/net/buysellhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 95555300..8e743bf0 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 2a5331b5..37b378f2 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index 6717f515..a3ccc4fb 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/chathandler.h b/src/net/chathandler.h index 9a47c633..ff649205 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/equipmenthandler.cpp b/src/net/equipmenthandler.cpp index fe158198..9a3c396a 100644 --- a/src/net/equipmenthandler.cpp +++ b/src/net/equipmenthandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/equipmenthandler.h b/src/net/equipmenthandler.h index 08de3b36..c66d7932 100644 --- a/src/net/equipmenthandler.h +++ b/src/net/equipmenthandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index be128609..a227701e 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h index f87e1214..336b2e98 100644 --- a/src/net/inventoryhandler.h +++ b/src/net/inventoryhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/itemhandler.cpp b/src/net/itemhandler.cpp index e38be454..8c4af4e4 100644 --- a/src/net/itemhandler.cpp +++ b/src/net/itemhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/itemhandler.h b/src/net/itemhandler.h index 0f292d46..0cb3b42a 100644 --- a/src/net/itemhandler.h +++ b/src/net/itemhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index cf45dbd4..2695fc7b 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index 6b938627..df86b634 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/maploginhandler.cpp b/src/net/maploginhandler.cpp index bcd3dd62..b5192bd7 100644 --- a/src/net/maploginhandler.cpp +++ b/src/net/maploginhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/maploginhandler.h b/src/net/maploginhandler.h index fb083b51..c7fee70c 100644 --- a/src/net/maploginhandler.h +++ b/src/net/maploginhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messagehandler.cpp b/src/net/messagehandler.cpp index f45000be..f1561a31 100644 --- a/src/net/messagehandler.cpp +++ b/src/net/messagehandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messagehandler.h b/src/net/messagehandler.h index 7ff5194b..45cdf8cd 100644 --- a/src/net/messagehandler.h +++ b/src/net/messagehandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index f1ff4013..a288d936 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messagein.h b/src/net/messagein.h index 94f2bee7..0ff6e78a 100644 --- a/src/net/messagein.h +++ b/src/net/messagein.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp index ab17f537..bf4957be 100644 --- a/src/net/messageout.cpp +++ b/src/net/messageout.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/messageout.h b/src/net/messageout.h index 93f1c2e8..b3a4ef68 100644 --- a/src/net/messageout.h +++ b/src/net/messageout.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/network.cpp b/src/net/network.cpp index 0126ad6d..3fa046c4 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/network.h b/src/net/network.h index e264f8a5..02fe7538 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index 1067a57e..2ecd4726 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,12 +73,22 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_CLOSE: id = msg->readInt32(); - if (current_npc == id) - current_npc = 0; + // If we're talking to that NPC, show the close button + if (id == current_npc) + npcTextDialog->showCloseButton(); + // Otherwise, move on as an empty dialog doesn't help + else + npcTextDialog->nextDialog(id); break; case SMSG_NPC_NEXT: - // Next button in NPC dialog, currently unused + id = msg->readInt32(); + // If we're talking to that NPC, show the next button + if (id == current_npc) + npcTextDialog->showNextButton(); + // Otherwise, move on as an empty dialog doesn't help + else + npcTextDialog->nextDialog(id); break; case SMSG_NPC_INT_INPUT: @@ -87,6 +96,7 @@ void NPCHandler::handleMessage(MessageIn *msg) current_npc = msg->readInt32(); player_node->setAction(LocalPlayer::STAND); npcIntegerDialog->setRange(0, 2147483647); + npcIntegerDialog->setDefaultValue(0); npcIntegerDialog->setVisible(true); npcIntegerDialog->requestFocus(); break; diff --git a/src/net/npchandler.h b/src/net/npchandler.h index 35db2956..7ac962eb 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/partyhandler.cpp b/src/net/partyhandler.cpp index b65ff2c9..96200add 100644 --- a/src/net/partyhandler.cpp +++ b/src/net/partyhandler.cpp @@ -1,8 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2008 Lloyd Bryant <lloyd_bryant@netzero.net> * - * This file is part of Aethyra. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h index 158e89e6..fc02bf0a 100644 --- a/src/net/partyhandler.h +++ b/src/net/partyhandler.h @@ -1,8 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2008 Lloyd Bryant <lloyd_bryant@netzero.net> * - * This file is part of Aethyra. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index ffeb3fab..7790cdd0 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +27,7 @@ #include "../localplayer.h" #include "../log.h" #include "../npc.h" +#include "../units.h" #include "../gui/buy.h" #include "../gui/chat.h" @@ -146,8 +146,6 @@ void PlayerHandler::handleMessage(MessageIn *msg) // Switch the actual map, deleting the previous one if necessary engine->changeMap(mapPath); - current_npc = 0; - float scrollOffsetX = 0.0f; float scrollOffsetY = 0.0f; @@ -288,8 +286,8 @@ void PlayerHandler::handleMessage(MessageIn *msg) player_node->mGp = msg->readInt32(); if (player_node->mGp > curGp) chatWindow->chatLog(_("You picked up ") + - toString(player_node->mGp - curGp) + " GP", - BY_SERVER); + Units::formatCurrency(player_node->mGp + - curGp), BY_SERVER); } break; case 0x0016: diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 0500ae44..1a7c8da3 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index 563c1cc4..69d69901 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/protocol.h b/src/net/protocol.h index 081f8873..e9053451 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/skillhandler.cpp b/src/net/skillhandler.cpp index 8ef37101..e2185524 100644 --- a/src/net/skillhandler.cpp +++ b/src/net/skillhandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/skillhandler.h b/src/net/skillhandler.h index 689e42dc..2b55605d 100644 --- a/src/net/skillhandler.h +++ b/src/net/skillhandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp index 98f26cbd..c5465835 100644 --- a/src/net/tradehandler.cpp +++ b/src/net/tradehandler.cpp @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/net/tradehandler.h b/src/net/tradehandler.h index 8f108248..d479e43f 100644 --- a/src/net/tradehandler.h +++ b/src/net/tradehandler.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |