summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-04 16:41:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-04 16:41:09 +0300
commit05a196194b8270c1ae2e63f8ae31f8a492022388 (patch)
treea00c9c9a009d562db1a95b3f8f77428df0169a21 /src/net/tmwa
parent6f06cd42b8e56aaae2be853a31d73d0115a39c2a (diff)
downloadmanaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.gz
manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.bz2
manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.tar.xz
manaplus-05a196194b8270c1ae2e63f8ae31f8a492022388.zip
Show unimplimented packet debug message on each unsupported packets parameters.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp25
-rw-r--r--src/net/tmwa/beinghandler.h6
-rw-r--r--src/net/tmwa/chathandler.cpp2
-rw-r--r--src/net/tmwa/inventoryhandler.cpp2
-rw-r--r--src/net/tmwa/partyhandler.cpp2
-rw-r--r--src/net/tmwa/playerhandler.cpp5
-rw-r--r--src/net/tmwa/playerhandler.h3
-rw-r--r--src/net/tmwa/skillhandler.cpp9
-rw-r--r--src/net/tmwa/tradehandler.cpp1
9 files changed, 27 insertions, 28 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 33c1db769..7ce768d62 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -277,7 +277,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg)
BLOCK_END("BeingHandler::processBeingChangeLook")
return;
}
- processBeingChangeLookContinue(dstBeing, type, id, id2);
+ processBeingChangeLookContinue(msg, dstBeing, type, id, id2);
BLOCK_END("BeingHandler::processBeingChangeLook")
}
@@ -312,11 +312,12 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg)
BLOCK_END("BeingHandler::processBeingChangeLook")
return;
}
- processBeingChangeLookContinue(dstBeing, type, id, id2);
+ processBeingChangeLookContinue(msg, dstBeing, type, id, id2);
BLOCK_END("BeingHandler::processBeingChangeLook")
}
-void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
+void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg,
+ Being *const dstBeing,
const uint8_t type,
const int id,
const int id2)
@@ -413,10 +414,7 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
dstBeing->setLook(static_cast<uint16_t>(id));
break;
default:
- logger->log("QQQ3 CHANGE_LOOKS: unsupported type: "
- "%d, id: %d", type, id);
- logger->log("ID: " + toString(dstBeing->getId()));
- logger->log("name: " + toString(dstBeing->getName()));
+ UNIMPLIMENTEDPACKET;
break;
}
}
@@ -556,7 +554,7 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg)
if (gmstatus & 0x80)
dstBeing->setGM(true);
- applyPlayerAction(dstBeing, msg.readUInt8("action type"));
+ applyPlayerAction(msg, dstBeing, msg.readUInt8("action type"));
const int level = static_cast<int>(msg.readUInt8("level"));
if (level)
dstBeing->setLevel(level);
@@ -708,7 +706,7 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg)
if (gmstatus & 0x80)
dstBeing->setGM(true);
- applyPlayerAction(dstBeing, msg.readUInt8("action type"));
+ applyPlayerAction(msg, dstBeing, msg.readUInt8("action type"));
const int level = static_cast<int>(msg.readUInt8("level"));
if (level)
dstBeing->setLevel(level);
@@ -1440,7 +1438,9 @@ void BeingHandler::setServerGender(Being *const being, const uint8_t gender)
}
}
-void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type)
+void BeingHandler::applyPlayerAction(Net::MessageIn &msg,
+ Being *const being,
+ const uint8_t type)
{
switch (type)
{
@@ -1463,10 +1463,7 @@ void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type)
break;
default:
- // need set stand state?
- logger->log("QQQ2 SMSG_PLAYER_UPDATE_1:" + toString(type));
- logger->log("being id:" + toString(being->getId()));
- logger->log("being name:" + being->getName());
+ UNIMPLIMENTEDPACKET;
break;
}
}
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index f2117e2bc..0fcb62872 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -72,7 +72,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void processBeingChangeDirection(Net::MessageIn &msg);
- static void processBeingChangeLookContinue(Being *const dstBeing,
+ static void processBeingChangeLookContinue(Net::MessageIn &msg,
+ Being *const dstBeing,
const uint8_t type,
const int id,
const int id2);
@@ -86,7 +87,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void setServerGender(Being *const being,
const uint8_t gender);
- static void applyPlayerAction(Being *const being,
+ static void applyPlayerAction(Net::MessageIn &msg,
+ Being *const being,
const uint8_t type);
static void processBeingSelfEffect(Net::MessageIn &msg);
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index c60c1f600..4a4810c58 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -464,7 +464,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
BLOCK_START("ChatHandler::processWhisperResponse")
const uint8_t type = msg.readUInt8("response");
- processWhisperResponseContinue(type);
+ processWhisperResponseContinue(msg, type);
}
void ChatHandler::joinChat(const ChatObject *const chat A_UNUSED,
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 7fedc5574..28db6fa69 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -384,7 +384,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
break;
default:
pickup = Pickup::UNKNOWN;
- logger->log("unknown pickup type: %d", err);
+ UNIMPLIMENTEDPACKET;
break;
}
if (localPlayer)
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 84f39affc..6d9e448f0 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -216,7 +216,7 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg)
// These seem to indicate the sharing mode for exp and items
const int16_t exp = msg.readInt16("share exp");
const int16_t item = msg.readInt16("share items");
- processPartySettingsContinue(exp, item);
+ processPartySettingsContinue(msg, exp, item);
}
void PartyHandler::processPartyInfo(Net::MessageIn &msg)
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index f5ccad489..48f86daa9 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -398,7 +398,8 @@ void PlayerHandler::setViewEquipment(const bool allow A_UNUSED) const
{
}
-void PlayerHandler::setStat(const int type,
+void PlayerHandler::setStat(Net::MessageIn &msg,
+ const int type,
const int base,
const int mod,
const bool notify) const
@@ -408,7 +409,7 @@ void PlayerHandler::setStat(const int type,
localPlayer->setGMLevel(base);
return;
}
- Ea::PlayerHandler::setStat(type, base, mod, notify);
+ Ea::PlayerHandler::setStat(msg, type, base, mod, notify);
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index 1ca4c0ab8..062e00db6 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -79,7 +79,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void setViewEquipment(const bool allow) const override final;
protected:
- void setStat(const int type,
+ void setStat(Net::MessageIn &msg,
+ const int type,
const int base,
const int mod,
const bool notify) const override final;
diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp
index 424a8ad6b..1567d576a 100644
--- a/src/net/tmwa/skillhandler.cpp
+++ b/src/net/tmwa/skillhandler.cpp
@@ -210,8 +210,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg)
txt = _("Cannot shout!");
break;
default:
- logger->log("QQQ SMSG_SKILL_FAILED: bskill "
- + toString(bskill));
+ UNIMPLIMENTEDPACKET;
break;
}
@@ -263,8 +262,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg)
default:
// TRANSLATORS: error message
txt.append(_("Huh? What's that?"));
- logger->log("QQQ SMSG_SKILL_FAILED: reason "
- + toString(reason));
+ UNIMPLIMENTEDPACKET;
break;
}
}
@@ -285,8 +283,7 @@ void SkillHandler::processSkillFailed(Net::MessageIn &msg)
txt = _("Poison had no effect...");
break;
default:
- logger->log("QQQ SMSG_SKILL_FAILED: skillId "
- + toString(skillId));
+ UNIMPLIMENTEDPACKET;
break;
}
}
diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp
index 574c30bf1..f734a2e43 100644
--- a/src/net/tmwa/tradehandler.cpp
+++ b/src/net/tmwa/tradehandler.cpp
@@ -267,6 +267,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
break;
default:
NotifyManager::notify(NotifyTypes::TRADE_ADD_ERROR);
+ UNIMPLIMENTEDPACKET;
logger->log("QQQ SMSG_TRADE_ITEM_ADD_RESPONSE: "
+ toString(res));
break;