summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp8
-rw-r--r--src/net/tmwa/buysellhandler.cpp22
-rw-r--r--src/net/tmwa/charserverhandler.cpp10
-rw-r--r--src/net/tmwa/inventoryhandler.cpp4
-rw-r--r--src/net/tmwa/loginhandler.cpp5
-rw-r--r--src/net/tmwa/playerhandler.cpp3
-rw-r--r--src/net/tmwa/protocol.h2
7 files changed, 44 insertions, 10 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index ea4978a20..9c75689a4 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -674,6 +674,14 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
dstBeing->setSprite(SPRITE_MISC2, id);
player_node->imitateOutfit(dstBeing, SPRITE_MISC2);
break;
+ case 14:
+ dstBeing->setSprite(SPRITE_EVOL1, id);
+ player_node->imitateOutfit(dstBeing, SPRITE_EVOL1);
+ break;
+ case 15:
+ dstBeing->setSprite(SPRITE_EVOL2, id);
+ player_node->imitateOutfit(dstBeing, SPRITE_EVOL2);
+ break;
default:
logger->log("QQQ3 CHANGE_LOOKS: unsupported type: "
"%d, id: %d", type, id);
diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp
index bdc372238..84a02e92a 100644
--- a/src/net/tmwa/buysellhandler.cpp
+++ b/src/net/tmwa/buysellhandler.cpp
@@ -139,12 +139,22 @@ void BuySellHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_NPC_SELL_RESPONSE:
- if (msg.readInt8() == 0)
- SERVER_NOTICE(_("Thanks for selling."))
- else
- SERVER_NOTICE(_("Unable to sell."))
-
- break;
+ switch (msg.readInt8())
+ {
+ case 0:
+ SERVER_NOTICE(_("Thanks for selling."))
+ break;
+ case 1:
+ default:
+ SERVER_NOTICE(_("Unable to sell."))
+ break;
+ case 2:
+ SERVER_NOTICE(_("Unable to sell while trading."))
+ break;
+ case 3:
+ SERVER_NOTICE(_("Unable to sell unsellable item."))
+ break;
+ }
default:
break;
}
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index e500f667b..4bf9df8b3 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -160,7 +160,15 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg)
PlayerInfo::setCharId(msg.readInt32());
GameHandler *gh = static_cast<GameHandler*>(Net::getGameHandler());
gh->setMap(msg.readString(16));
- mapServer.hostname = ipToString(msg.readInt32());
+ if (config.getBoolValue("usePersistentIP"))
+ {
+ msg.readInt32();
+ mapServer.hostname = Client::getServerName();
+ }
+ else
+ {
+ mapServer.hostname = ipToString(msg.readInt32());
+ }
mapServer.port = msg.readInt16();
// Prevent the selected local player from being deleted
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index b4b38e623..3cc0e9ce0 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -77,8 +77,8 @@ const Equipment::Slot EQUIP_CONVERT[] =
Equipment::EQUIP_GLOVES_SLOT, // SPRITE_GLOVES
Equipment::EQUIP_FIGHT1_SLOT, // SPRITE_WEAPON
Equipment::EQUIP_FIGHT2_SLOT, // SPRITE_SHIELD
- Equipment::EQUIP_PROJECTILE_SLOT, // 0
- Equipment::EQUIP_PROJECTILE_SLOT, // 0
+ Equipment::EQUIP_EVOL_RING1_SLOT, // SPRITE_EVOL1
+ Equipment::EQUIP_EVOL_RING2_SLOT, // SPRITE_EVOL2
Equipment::EQUIP_PROJECTILE_SLOT, // 0
};
diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp
index 73fec1322..05a28513c 100644
--- a/src/net/tmwa/loginhandler.cpp
+++ b/src/net/tmwa/loginhandler.cpp
@@ -288,7 +288,10 @@ void LoginHandler::chooseServer(unsigned int server)
return;
charServer.clear();
- charServer.hostname = ipToString(mWorlds[server]->address);
+ if (config.getBoolValue("usePersistentIP"))
+ charServer.hostname = Client::getServerName();
+ else
+ charServer.hostname = ipToString(mWorlds[server]->address);
charServer.port = mWorlds[server]->port;
Client::setState(STATE_UPDATE);
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 1d0d3e67d..8ef19c373 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -35,6 +35,7 @@
#include "gui/npcdialog.h"
#include "gui/okdialog.h"
#include "gui/sell.h"
+#include "gui/skilldialog.h"
#include "gui/statuswindow.h"
#include "gui/viewport.h"
@@ -314,6 +315,8 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
break;
case 0x000c:
PlayerInfo::setAttribute(SKILL_POINTS, value);
+ if (skillDialog)
+ skillDialog->update();
break;
case 0x0018:
if (!weightNotice)
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 6001fae3b..83854c4c6 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -59,6 +59,8 @@ enum
SPRITE_GLOVES,
SPRITE_WEAPON,
SPRITE_SHIELD,
+ SPRITE_EVOL1,
+ SPRITE_EVOL2,
SPRITE_VECTOREND
};