summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-05 20:58:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-05 20:58:21 +0300
commita87db81b6b7551a248e31e2850577aefda092538 (patch)
treef47c20512183113face758cf58ec71369c82806c /src/net/eathena/playerhandler.cpp
parent92c019dad798f1a84c5d3e8e8331a885f6458133 (diff)
downloadplus-a87db81b6b7551a248e31e2850577aefda092538.tar.gz
plus-a87db81b6b7551a248e31e2850577aefda092538.tar.bz2
plus-a87db81b6b7551a248e31e2850577aefda092538.tar.xz
plus-a87db81b6b7551a248e31e2850577aefda092538.zip
Replace most bools usage in playerinfo to strong typed bools.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index b866dcb5c..a2bb8b83e 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -205,11 +205,11 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg)
}
}
-void PlayerHandler::attack(const int id, const bool keep) const
+void PlayerHandler::attack(const int id, const Keep keep) const
{
createOutPacket(CMSG_PLAYER_CHANGE_ACT);
outMsg.writeInt32(id, "target id");
- if (keep)
+ if (keep == Keep_true)
outMsg.writeInt8(7, "action");
else
outMsg.writeInt8(0, "action");
@@ -446,26 +446,29 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
msg.readUInt8("luk cost");
}
- PlayerInfo::setStatBase(Attributes::ATK, msg.readInt16("left atk"), false);
+ PlayerInfo::setStatBase(Attributes::ATK,
+ msg.readInt16("left atk"), Notify_false);
PlayerInfo::setStatMod(Attributes::ATK, msg.readInt16("right atk"));
PlayerInfo::updateAttrs();
val = msg.readInt16("right matk");
- PlayerInfo::setStatBase(Attributes::MATK, val, false);
+ PlayerInfo::setStatBase(Attributes::MATK, val, Notify_false);
val = msg.readInt16("left matk");
PlayerInfo::setStatMod(Attributes::MATK, val);
- PlayerInfo::setStatBase(Attributes::DEF, msg.readInt16("left def"), false);
+ PlayerInfo::setStatBase(Attributes::DEF,
+ msg.readInt16("left def"), Notify_false);
PlayerInfo::setStatMod(Attributes::DEF, msg.readInt16("right def"));
PlayerInfo::setStatBase(Attributes::MDEF,
- msg.readInt16("left mdef"), false);
+ msg.readInt16("left mdef"), Notify_false);
PlayerInfo::setStatMod(Attributes::MDEF, msg.readInt16("right mdef"));
PlayerInfo::setStatBase(Attributes::HIT, msg.readInt16("hit"));
- PlayerInfo::setStatBase(Attributes::FLEE, msg.readInt16("flee"), false);
+ PlayerInfo::setStatBase(Attributes::FLEE,
+ msg.readInt16("flee"), Notify_false);
PlayerInfo::setStatMod(Attributes::FLEE, msg.readInt16("flee2/10"));
PlayerInfo::setStatBase(Attributes::CRIT, msg.readInt16("crit/10"));
@@ -577,7 +580,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
const int type,
const int base,
const int mod,
- const bool notify) const
+ const Notify notify) const
{
Ea::PlayerHandler::setStat(msg, type, base, mod, notify);
}