From 1be5a1cd679a5476e1ad3339c01a8b7237b84aec Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Dec 2017 02:33:41 +0300 Subject: Remove default parameter from PlayerInfo::setStatMod. --- src/net/eathena/playerhandler.cpp | 30 ++++++++++++++++++++++-------- src/net/eathena/playerrecv.cpp | 16 +++++++++++----- 2 files changed, 33 insertions(+), 13 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index ee94038fd..907a02202 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -513,7 +513,7 @@ void PlayerHandler::setViewEquipment(const bool allow) const #define setStatComplex(stat) \ PlayerInfo::setStatBase(stat, base, notify); \ if (mod != NoStat) \ - PlayerInfo::setStatMod(stat, mod) + PlayerInfo::setStatMod(stat, mod, Notify_true) void PlayerHandler::setStat(Net::MessageIn &msg, const int type, @@ -528,7 +528,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg, PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED, base, Notify_true); - PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED, 0); + PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED, + 0, + Notify_true); break; case Sp::BASEEXP: PlayerInfo::setAttribute(Attributes::PLAYER_EXP, @@ -544,13 +546,17 @@ void PlayerHandler::setStat(Net::MessageIn &msg, PlayerInfo::setStatBase(Attributes::PLAYER_KARMA, base, Notify_true); - PlayerInfo::setStatMod(Attributes::PLAYER_KARMA, 0); + PlayerInfo::setStatMod(Attributes::PLAYER_KARMA, + 0, + Notify_true); break; case Sp::MANNER: PlayerInfo::setStatBase(Attributes::PLAYER_MANNER, base, Notify_true); - PlayerInfo::setStatMod(Attributes::PLAYER_MANNER, 0); + PlayerInfo::setStatMod(Attributes::PLAYER_MANNER, + 0, + Notify_true); break; case Sp::HP: PlayerInfo::setAttribute(Attributes::PLAYER_HP, @@ -700,7 +706,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg, PlayerInfo::updateAttrs(); break; case Sp::ATK2: - PlayerInfo::setStatMod(Attributes::PLAYER_ATK, base); + PlayerInfo::setStatMod(Attributes::PLAYER_ATK, + base, + Notify_true); PlayerInfo::updateAttrs(); break; case Sp::MATK1: @@ -719,7 +727,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg, Notify_true); break; case Sp::DEF2: - PlayerInfo::setStatMod(Attributes::PLAYER_DEF, base); + PlayerInfo::setStatMod(Attributes::PLAYER_DEF, + base, + Notify_true); break; case Sp::MDEF1: PlayerInfo::setStatBase(Attributes::PLAYER_MDEF, @@ -742,7 +752,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg, Notify_true); break; case Sp::FLEE2: - PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, base); + PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, + base, + Notify_true); break; case Sp::CRITICAL: PlayerInfo::setStatBase(Attributes::PLAYER_CRIT, @@ -754,7 +766,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg, PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_DELAY, base, Notify_true); - PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_DELAY, 0); + PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_DELAY, + 0, + Notify_true); PlayerInfo::updateAttrs(); break; case Sp::JOBLEVEL: diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp index 802563b97..397b93f22 100644 --- a/src/net/eathena/playerrecv.cpp +++ b/src/net/eathena/playerrecv.cpp @@ -158,26 +158,31 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg) msg.readInt16("left atk"), Notify_false); PlayerInfo::setStatMod(Attributes::PLAYER_ATK, - msg.readInt16("right atk")); + msg.readInt16("right atk"), + Notify_true); PlayerInfo::updateAttrs(); val = msg.readInt16("right matk"); PlayerInfo::setStatBase(Attributes::PLAYER_MATK, val, Notify_false); val = msg.readInt16("left matk"); - PlayerInfo::setStatMod(Attributes::PLAYER_MATK, val); + PlayerInfo::setStatMod(Attributes::PLAYER_MATK, + val, + Notify_true); PlayerInfo::setStatBase(Attributes::PLAYER_DEF, msg.readInt16("left def"), Notify_false); PlayerInfo::setStatMod(Attributes::PLAYER_DEF, - msg.readInt16("right def")); + msg.readInt16("right def"), + Notify_true); PlayerInfo::setStatBase(Attributes::PLAYER_MDEF, msg.readInt16("left mdef"), Notify_false); PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, - msg.readInt16("right mdef")); + msg.readInt16("right mdef"), + Notify_true); PlayerInfo::setStatBase(Attributes::PLAYER_HIT, msg.readInt16("hit"), @@ -187,7 +192,8 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg) msg.readInt16("flee"), Notify_false); PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, - msg.readInt16("flee2/10")); + msg.readInt16("flee2/10"), + Notify_true); PlayerInfo::setStatBase(Attributes::PLAYER_CRIT, msg.readInt16("crit/10"), -- cgit v1.2.3-70-g09d2