summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-17 02:07:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-17 02:07:28 +0300
commite91a8c39e38cddb085320ae390cf985a73eaee5c (patch)
treeb407ed97d8feda93743ab1347a11692dfd979353 /src/net/tmwa
parentddf3a130e1db0417d2dad77f69d6aa95028024d6 (diff)
downloadplus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.gz
plus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.bz2
plus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.xz
plus-e91a8c39e38cddb085320ae390cf985a73eaee5c.zip
Remove default parameter from PlayerInfo::setStatBase.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/playerhandler.cpp36
-rw-r--r--src/net/tmwa/playerrecv.cpp35
2 files changed, 49 insertions, 22 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 27cfc4bf4..21311a2d1 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -226,7 +226,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
{
case Sp::SPEED:
localPlayer->setWalkSpeed(base);
- PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED,
+ base,
+ Notify_true);
PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED, 0);
break;
case Sp::BASEEXP:
@@ -396,7 +398,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
statusWindow->setPointsNeeded(Attributes::PLAYER_LUK, base);
break;
case Sp::ATK1:
- PlayerInfo::setStatBase(Attributes::PLAYER_ATK, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
+ base,
+ Notify_true);
PlayerInfo::updateAttrs();
break;
case Sp::ATK2:
@@ -404,38 +408,52 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::updateAttrs();
break;
case Sp::MATK1:
- PlayerInfo::setStatBase(Attributes::PLAYER_MATK, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_MATK,
+ base,
+ Notify_true);
break;
case Sp::MATK2:
PlayerInfo::setStatMod(Attributes::PLAYER_MATK, base);
break;
case Sp::DEF1:
- PlayerInfo::setStatBase(Attributes::PLAYER_DEF, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
+ base,
+ Notify_true);
break;
case Sp::DEF2:
PlayerInfo::setStatMod(Attributes::PLAYER_DEF, base);
break;
case Sp::MDEF1:
- PlayerInfo::setStatBase(Attributes::PLAYER_MDEF, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_MDEF,
+ base,
+ Notify_true);
break;
case Sp::MDEF2:
PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, base);
break;
case Sp::HIT:
- PlayerInfo::setStatBase(Attributes::PLAYER_HIT, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_HIT,
+ base,
+ Notify_true);
break;
case Sp::FLEE1:
- PlayerInfo::setStatBase(Attributes::PLAYER_FLEE, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_FLEE,
+ base,
+ Notify_true);
break;
case Sp::FLEE2:
PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, base);
break;
case Sp::CRITICAL:
- PlayerInfo::setStatBase(Attributes::PLAYER_CRIT, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_CRIT,
+ base,
+ Notify_true);
break;
case Sp::ASPD:
localPlayer->setAttackSpeed(base);
- PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_DELAY, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_DELAY,
+ base,
+ Notify_true);
PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_DELAY, 0);
PlayerInfo::updateAttrs();
break;
diff --git a/src/net/tmwa/playerrecv.cpp b/src/net/tmwa/playerrecv.cpp
index 4bd0f7f88..a914d50d6 100644
--- a/src/net/tmwa/playerrecv.cpp
+++ b/src/net/tmwa/playerrecv.cpp
@@ -42,7 +42,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
Notify_true);
unsigned int val = msg.readUInt8("str");
- PlayerInfo::setStatBase(Attributes::PLAYER_STR, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_STR, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_STR,
@@ -54,7 +54,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("agi");
- PlayerInfo::setStatBase(Attributes::PLAYER_AGI, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_AGI, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_AGI,
@@ -66,7 +66,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("vit");
- PlayerInfo::setStatBase(Attributes::PLAYER_VIT, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_VIT, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_VIT,
@@ -78,7 +78,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("int");
- PlayerInfo::setStatBase(Attributes::PLAYER_INT, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_INT, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_INT,
@@ -90,7 +90,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("dex");
- PlayerInfo::setStatBase(Attributes::PLAYER_DEX, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_DEX, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_DEX,
@@ -102,7 +102,7 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
val = msg.readUInt8("luk");
- PlayerInfo::setStatBase(Attributes::PLAYER_LUK, val);
+ PlayerInfo::setStatBase(Attributes::PLAYER_LUK, val, Notify_true);
if (statusWindow != nullptr)
{
statusWindow->setPointsNeeded(Attributes::PLAYER_LUK,
@@ -114,7 +114,8 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
- msg.readInt16("atk"), Notify_false);
+ msg.readInt16("atk"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_ATK, msg.readInt16("atk+"));
PlayerInfo::updateAttrs();
@@ -125,23 +126,31 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::setStatMod(Attributes::PLAYER_MATK, val);
PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
- msg.readInt16("def"), Notify_false);
+ msg.readInt16("def"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_DEF, msg.readInt16("def+"));
PlayerInfo::setStatBase(Attributes::PLAYER_MDEF,
- msg.readInt16("mdef"), Notify_false);
+ msg.readInt16("mdef"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, msg.readInt16("mdef+"));
- PlayerInfo::setStatBase(Attributes::PLAYER_HIT, msg.readInt16("hit"));
+ PlayerInfo::setStatBase(Attributes::PLAYER_HIT,
+ msg.readInt16("hit"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_FLEE,
- msg.readInt16("flee"), Notify_false);
+ msg.readInt16("flee"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, msg.readInt16("flee+"));
- PlayerInfo::setStatBase(Attributes::PLAYER_CRIT, msg.readInt16("crit"));
+ PlayerInfo::setStatBase(Attributes::PLAYER_CRIT,
+ msg.readInt16("crit"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_MANNER,
- msg.readInt16("manner"));
+ msg.readInt16("manner"),
+ Notify_true);
msg.readInt16("unused?");
BLOCK_END("PlayerRecv::processPlayerStatUpdate5")
}