diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-04 20:05:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-04 20:05:48 +0300 |
commit | 62ec17f6e489ec50f17219444468aeb8969dc961 (patch) | |
tree | 350d7edb5c26c282a4e1906544536d68831228ac /src/net | |
parent | 71d924d7dcdac067f02a317e9353ee067dbd0bde (diff) | |
parent | fd484fc70fca32ff9065b91c175089b65aa3fd26 (diff) | |
download | manaplus-62ec17f6e489ec50f17219444468aeb8969dc961.tar.gz manaplus-62ec17f6e489ec50f17219444468aeb8969dc961.tar.bz2 manaplus-62ec17f6e489ec50f17219444468aeb8969dc961.tar.xz manaplus-62ec17f6e489ec50f17219444468aeb8969dc961.zip |
Merge branch 'master' into strippedstripped1.1.9.4
Conflicts:
data/fonts/mplus-1p-bold.ttf
data/fonts/mplus-1p-regular.ttf
src/guichan/basiccontainer.cpp
src/guichan/include/guichan/basiccontainer.hpp
src/guichan/widgets/window.cpp
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/chathandler.cpp | 7 | ||||
-rw-r--r-- | src/net/ea/guildhandler.cpp | 1 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/ea/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/manaserv/adminhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/manaserv/adminhandler.h | 1 | ||||
-rw-r--r-- | src/net/manaserv/messagehandler.cpp | 2 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/manaserv/playerhandler.h | 1 | ||||
-rw-r--r-- | src/net/playerhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 5 |
14 files changed, 47 insertions, 9 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 06e86f8a4..4a5cfb841 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -29,6 +29,7 @@ #include "client.h" #include "effectmanager.h" #include "guild.h" +#include "guildmanager.h" #include "keyboardconfig.h" #include "localplayer.h" #include "logger.h" @@ -661,7 +662,8 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) if ((dstBeing = actorSpriteManager->findBeing(msg.readInt32()))) { dstBeing->setPartyName(msg.readString(24)); - dstBeing->setGuildName(msg.readString(24)); + if (!guildManager || !GuildManager::getEnableGuildBot()) + dstBeing->setGuildName(msg.readString(24)); dstBeing->setGuildPos(msg.readString(24)); dstBeing->addToCache(); msg.readString(24); // Discard this diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index c188a2204..5737cc2b2 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -25,6 +25,7 @@ #include "actorspritemanager.h" #include "being.h" #include "configuration.h" +#include "guildmanager.h" #include "localplayer.h" #include "playerrelations.h" #include "logger.h" @@ -161,6 +162,12 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) if (nick != "Server") { + if (guildManager && GuildManager::getEnableGuildBot() + && nick == "guild" && guildManager->processGuildMessage(chatMsg)) + { + return; + } + if (player_relations.hasPermission( nick, PlayerRelation::WHISPER)) { diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 0210a76ff..2accb1f1d 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -125,6 +125,7 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) if (!guildTab && chatWindow) { guildTab = new GuildTab(); + guildTab->loadFromLogFile("#Guild"); if (player_node) player_node->addGuild(taGuild); memberList(guildId); diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 045a2332b..bd6f19d97 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -359,6 +359,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) if (socialWindow && Ea::taParty) socialWindow->removeTab(Ea::taParty); + player_node->setPartyName(""); } else { @@ -372,7 +373,10 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) { Being *b = actorSpriteManager->findBeing(id); if (b && b->getType() == Being::PLAYER) + { b->setParty(0); + b->setPartyName(""); + } } if (Ea::taParty) Ea::taParty->removeMember(id); diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 4198c14ad..3af237b5b 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -359,9 +359,11 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) case 0x0029: PlayerInfo::setStatBase(EA_ATK, value); + PlayerInfo::updateAttrs(); break; case 0x002a: PlayerInfo::setStatMod(EA_ATK, value); + PlayerInfo::updateAttrs(); break; case 0x002b: @@ -402,8 +404,9 @@ void PlayerHandler::processPlayerStatUpdate1(Net::MessageIn &msg) case 0x0035: player_node->setAttackSpeed(value); - PlayerInfo::setStatBase(ATTACK_SPEED, value); - PlayerInfo::setStatMod(ATTACK_SPEED, 0); + PlayerInfo::setStatBase(ATTACK_DELAY, value); + PlayerInfo::setStatMod(ATTACK_DELAY, 0); + PlayerInfo::updateAttrs(); break; case 0x0037: @@ -484,6 +487,8 @@ void PlayerHandler::processPlayerStatUpdate3(Net::MessageIn &msg) PlayerInfo::setStatBase(type, base, false); PlayerInfo::setStatMod(type, bonus); + if (type == EA_ATK || type == ATTACK_DELAY) + PlayerInfo::updateAttrs(); } void PlayerHandler::processPlayerStatUpdate4(Net::MessageIn &msg) @@ -552,6 +557,7 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) PlayerInfo::setStatBase(EA_ATK, msg.readInt16(), false); PlayerInfo::setStatMod(EA_ATK, msg.readInt16()); + PlayerInfo::updateAttrs(); val = msg.readInt16(); PlayerInfo::setStatBase(EA_MATK, val, false); @@ -636,4 +642,8 @@ int PlayerHandler::getJobLocation() const return EA_JOB; } +int PlayerHandler::getAttackLocation() const +{ + return EA_ATK; +} } // namespace Ea diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h index 8b8751630..57bcbdcd5 100644 --- a/src/net/ea/playerhandler.h +++ b/src/net/ea/playerhandler.h @@ -55,6 +55,8 @@ class PlayerHandler : public Net::PlayerHandler int getJobLocation() const; + int getAttackLocation() const; + void processWalkResponse(Net::MessageIn &msg); void processPlayerWarp(Net::MessageIn &msg); diff --git a/src/net/manaserv/adminhandler.cpp b/src/net/manaserv/adminhandler.cpp index 2c76e99a3..a8860d73b 100644 --- a/src/net/manaserv/adminhandler.cpp +++ b/src/net/manaserv/adminhandler.cpp @@ -91,7 +91,8 @@ void AdminHandler::mute(int playerId A_UNUSED, int type A_UNUSED, // TODO } -void AdminHandler::warp(std::string map, int x, int y) +void AdminHandler::warp(std::string map A_UNUSED, + int x A_UNUSED, int y A_UNUSED) { // TODO } diff --git a/src/net/manaserv/adminhandler.h b/src/net/manaserv/adminhandler.h index 65e9ea2b0..17d296bd6 100644 --- a/src/net/manaserv/adminhandler.h +++ b/src/net/manaserv/adminhandler.h @@ -24,6 +24,7 @@ #define NET_MANASERV_ADMINHANDLER_H #include "net/adminhandler.h" +#include "string" #ifdef __GNUC__ #define A_UNUSED __attribute__ ((unused)) diff --git a/src/net/manaserv/messagehandler.cpp b/src/net/manaserv/messagehandler.cpp index 7524c95e8..2e9603f19 100644 --- a/src/net/manaserv/messagehandler.cpp +++ b/src/net/manaserv/messagehandler.cpp @@ -24,8 +24,6 @@ #include "net/manaserv/network.h" -#include <cassert> - namespace ManaServ { diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp index 3dfddb436..da8958044 100644 --- a/src/net/manaserv/playerhandler.cpp +++ b/src/net/manaserv/playerhandler.cpp @@ -432,6 +432,11 @@ int PlayerHandler::getJobLocation() const return -1; } +int PlayerHandler::getAttackLocation() const +{ + return -1; +} + Vector PlayerHandler::getDefaultWalkSpeed() const { // Return translation in pixels per ticks. diff --git a/src/net/manaserv/playerhandler.h b/src/net/manaserv/playerhandler.h index dcd05d5fc..f00fea42a 100644 --- a/src/net/manaserv/playerhandler.h +++ b/src/net/manaserv/playerhandler.h @@ -74,6 +74,7 @@ class PlayerHandler : public MessageHandler, public Net::PlayerHandler bool canCorrectAttributes() const; int getJobLocation() const; + int getAttackLocation() const; Vector getDefaultWalkSpeed() const; diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 2abd12d57..47d666036 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -68,6 +68,8 @@ class PlayerHandler virtual int getJobLocation() const = 0; + virtual int getAttackLocation() const = 0; + virtual Vector getDefaultWalkSpeed() const = 0; }; diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 17503a406..ce2db733f 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -331,6 +331,9 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, bool look2) dstBeing->setSpriteColor(SPRITE_HAIR, ColorDB::getHairColor(id)); break; + case 7: // Clothes color + // ignoring it + break; case 8: // eAthena LOOK_SHIELD if (!config.getBoolValue("hideShield")) { @@ -552,7 +555,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType) dstBeing->setTileCoords(srcX, srcY); dstBeing->setDestination(dstX, dstY); - // because server dont send direction in move packet, + // because server don't send direction in move packet, // we fixing it if (srcX != dstX || srcY != dstY) diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 746cb6620..e1b565399 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -67,7 +67,6 @@ #include "utils/gettext.h" -#include <assert.h> #include <list> #include "debug.h" @@ -273,12 +272,14 @@ void GeneralHandler::event(Mana::Channels channel, statusWindow->addAttribute(FLEE, _("% Evade"), false, ""); // xgettext:no-c-format statusWindow->addAttribute(CRIT, _("% Critical"), false, ""); - statusWindow->addAttribute(ATTACK_SPEED, _("Attack Delay"), + statusWindow->addAttribute(ATTACK_DELAY, _("Attack Delay"), false, ""); statusWindow->addAttribute(WALK_SPEED, _("Walk Delay"), false, ""); statusWindow->addAttribute(ATTACK_RANGE, _("Attack Range"), false, ""); + statusWindow->addAttribute(ATTACK_SPEED, _("Damage per sec."), + false, ""); } else if (event.getName() == Mana::EVENT_GUIWINDOWSUNLOADING) { |