summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-17 02:33:41 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-17 02:33:41 +0300
commit1be5a1cd679a5476e1ad3339c01a8b7237b84aec (patch)
tree8fcbe25cd0444185f66e3d22ae31000aaa28173a /src
parente91a8c39e38cddb085320ae390cf985a73eaee5c (diff)
downloadmv-1be5a1cd679a5476e1ad3339c01a8b7237b84aec.tar.gz
mv-1be5a1cd679a5476e1ad3339c01a8b7237b84aec.tar.bz2
mv-1be5a1cd679a5476e1ad3339c01a8b7237b84aec.tar.xz
mv-1be5a1cd679a5476e1ad3339c01a8b7237b84aec.zip
Remove default parameter from PlayerInfo::setStatMod.
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp4
-rw-r--r--src/being/playerinfo.h2
-rw-r--r--src/net/ea/inventoryrecv.cpp4
-rw-r--r--src/net/eathena/playerhandler.cpp30
-rw-r--r--src/net/eathena/playerrecv.cpp16
-rw-r--r--src/net/tmwa/playerhandler.cpp30
-rw-r--r--src/net/tmwa/playerrecv.cpp20
7 files changed, 77 insertions, 29 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 4a6c65718..206f1f1ca 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -196,7 +196,9 @@ LocalPlayer::LocalPlayer(const BeingId id,
PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED,
getWalkSpeed(),
Notify_true);
- PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED, 0);
+ PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED,
+ 0,
+ Notify_true);
loadHomes();
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h
index a4691a54e..12cba8f18 100644
--- a/src/being/playerinfo.h
+++ b/src/being/playerinfo.h
@@ -133,7 +133,7 @@ namespace PlayerInfo
*/
void setStatMod(const AttributesT id,
const int value,
- const Notify notify = Notify_true);
+ const Notify notify);
/**
* Returns the current effective value of the given stat. Effective is base
diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp
index 839447496..f1a4e2e69 100644
--- a/src/net/ea/inventoryrecv.cpp
+++ b/src/net/ea/inventoryrecv.cpp
@@ -175,7 +175,9 @@ void InventoryRecv::processPlayerAttackRange(Net::MessageIn &msg)
PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_RANGE,
range,
Notify_true);
- PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_RANGE, 0);
+ PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_RANGE,
+ 0,
+ Notify_true);
BLOCK_END("InventoryRecv::processPlayerAttackRange")
}
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"),
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 21311a2d1..a069457ba 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -214,7 +214,7 @@ void PlayerHandler::setViewEquipment(const bool allow A_UNUSED) 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,
@@ -229,7 +229,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,
@@ -404,7 +406,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:
@@ -413,7 +417,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
Notify_true);
break;
case Sp::MATK2:
- PlayerInfo::setStatMod(Attributes::PLAYER_MATK, base);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MATK,
+ base,
+ Notify_true);
break;
case Sp::DEF1:
PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
@@ -421,7 +427,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,
@@ -429,7 +437,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
Notify_true);
break;
case Sp::MDEF2:
- PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, base);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MDEF,
+ base,
+ Notify_true);
break;
case Sp::HIT:
PlayerInfo::setStatBase(Attributes::PLAYER_HIT,
@@ -442,7 +452,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,
@@ -454,7 +466,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/tmwa/playerrecv.cpp b/src/net/tmwa/playerrecv.cpp
index a914d50d6..f6dadcbed 100644
--- a/src/net/tmwa/playerrecv.cpp
+++ b/src/net/tmwa/playerrecv.cpp
@@ -116,24 +116,32 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
msg.readInt16("atk"),
Notify_false);
- PlayerInfo::setStatMod(Attributes::PLAYER_ATK, msg.readInt16("atk+"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_ATK,
+ msg.readInt16("atk+"),
+ Notify_true);
PlayerInfo::updateAttrs();
val = msg.readInt16("matk");
PlayerInfo::setStatBase(Attributes::PLAYER_MATK, val, Notify_false);
val = msg.readInt16("matk+");
- PlayerInfo::setStatMod(Attributes::PLAYER_MATK, val);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MATK,
+ val,
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
msg.readInt16("def"),
Notify_false);
- PlayerInfo::setStatMod(Attributes::PLAYER_DEF, msg.readInt16("def+"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_DEF,
+ msg.readInt16("def+"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_MDEF,
msg.readInt16("mdef"),
Notify_false);
- PlayerInfo::setStatMod(Attributes::PLAYER_MDEF, msg.readInt16("mdef+"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_MDEF,
+ msg.readInt16("mdef+"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_HIT,
msg.readInt16("hit"),
@@ -142,7 +150,9 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::setStatBase(Attributes::PLAYER_FLEE,
msg.readInt16("flee"),
Notify_false);
- PlayerInfo::setStatMod(Attributes::PLAYER_FLEE, msg.readInt16("flee+"));
+ PlayerInfo::setStatMod(Attributes::PLAYER_FLEE,
+ msg.readInt16("flee+"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::PLAYER_CRIT,
msg.readInt16("crit"),