summaryrefslogtreecommitdiff
path: root/src/net/eathena
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/eathena
parentddf3a130e1db0417d2dad77f69d6aa95028024d6 (diff)
downloadmanaplus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.gz
manaplus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.bz2
manaplus-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.xz
manaplus-e91a8c39e38cddb085320ae390cf985a73eaee5c.zip
Remove default parameter from PlayerInfo::setStatBase.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/charserverrecv.cpp3
-rw-r--r--src/net/eathena/elementalrecv.cpp15
-rw-r--r--src/net/eathena/homunculusrecv.cpp58
-rw-r--r--src/net/eathena/mercenaryrecv.cpp57
-rw-r--r--src/net/eathena/playerhandler.cpp52
-rw-r--r--src/net/eathena/playerrecv.cpp32
6 files changed, 148 insertions, 69 deletions
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 5ff1911b9..9ba8d4ef4 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -294,7 +294,8 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg)
localPlayer = Net::CharServerHandler::mSelectedCharacter->dummy;
PlayerInfo::setBackend(Net::CharServerHandler::mSelectedCharacter->data);
PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED,
- playerHandler->getDefaultWalkSpeed());
+ playerHandler->getDefaultWalkSpeed(),
+ Notify_true);
Net::CharServerHandler::mSelectedCharacter->dummy = nullptr;
diff --git a/src/net/eathena/elementalrecv.cpp b/src/net/eathena/elementalrecv.cpp
index d5e0c6d18..25595f7ef 100644
--- a/src/net/eathena/elementalrecv.cpp
+++ b/src/net/eathena/elementalrecv.cpp
@@ -36,7 +36,8 @@ namespace EAthena
#define setElementalStat(sp, stat) \
case sp: \
PlayerInfo::setStatBase(stat, \
- val); \
+ val, \
+ Notify_true); \
break;
void ElementalRecv::processElementalUpdateStatus(Net::MessageIn &msg)
@@ -60,13 +61,17 @@ void ElementalRecv::processElementalInfo(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("elemental id");
PlayerInfo::setStatBase(Attributes::ELEMENTAL_HP,
- msg.readInt32("hp"));
+ msg.readInt32("hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::ELEMENTAL_MAX_HP,
- msg.readInt32("max hp"));
+ msg.readInt32("max hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::ELEMENTAL_MP,
- msg.readInt32("sp"));
+ msg.readInt32("sp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::ELEMENTAL_MAX_MP,
- msg.readInt32("max sp"));
+ msg.readInt32("max sp"),
+ Notify_true);
PlayerInfo::setElemental(id);
}
diff --git a/src/net/eathena/homunculusrecv.cpp b/src/net/eathena/homunculusrecv.cpp
index 204b618a7..eb7846419 100644
--- a/src/net/eathena/homunculusrecv.cpp
+++ b/src/net/eathena/homunculusrecv.cpp
@@ -114,53 +114,73 @@ void HomunculusRecv::processHomunculusInfo(Net::MessageIn &msg)
const std::string name = msg.readString(24, "name");
msg.readUInt8("flags"); // 0x01 - renamed, 0x02 - vaporize, 0x04 - alive
const int level = msg.readInt16("level");
- PlayerInfo::setStatBase(Attributes::HOMUN_LEVEL, level);
+ PlayerInfo::setStatBase(Attributes::HOMUN_LEVEL,
+ level,
+ Notify_true);
const int hungry = msg.readInt16("hungry");
const int intimacy = msg.readInt16("intimacy");
const int equip = msg.readInt16("equip");
PlayerInfo::setStatBase(Attributes::HOMUN_ATK,
- msg.readInt16("atk"));
+ msg.readInt16("atk"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_MATK,
- msg.readInt16("matk"));
+ msg.readInt16("matk"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_HIT,
- msg.readInt16("hit"));
+ msg.readInt16("hit"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_CRIT,
- msg.readInt16("luk/3 or crit/10"));
+ msg.readInt16("luk/3 or crit/10"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_DEF,
- msg.readInt16("def"));
+ msg.readInt16("def"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_MDEF,
- msg.readInt16("mdef"));
+ msg.readInt16("mdef"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_FLEE,
- msg.readInt16("flee"));
+ msg.readInt16("flee"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_ATTACK_DELAY,
- msg.readInt16("attack speed"));
+ msg.readInt16("attack speed"),
+ Notify_true);
if (msg.getVersion() >= 20150513)
{
PlayerInfo::setStatBase(Attributes::HOMUN_HP,
- msg.readInt32("hp"));
+ msg.readInt32("hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_MAX_HP,
- msg.readInt32("max hp"));
+ msg.readInt32("max hp"),
+ Notify_true);
}
else
{
PlayerInfo::setStatBase(Attributes::HOMUN_HP,
- msg.readInt16("hp"));
+ msg.readInt16("hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_MAX_HP,
- msg.readInt16("max hp"));
+ msg.readInt16("max hp"),
+ Notify_true);
}
PlayerInfo::setStatBase(Attributes::HOMUN_MP,
- msg.readInt16("sp"));
+ msg.readInt16("sp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_MAX_MP,
- msg.readInt16("max sp"));
+ msg.readInt16("max sp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_EXP,
- msg.readInt32("exp"));
+ msg.readInt32("exp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_EXP_NEEDED,
- msg.readInt32("next exp"));
+ msg.readInt32("next exp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::HOMUN_SKILL_POINTS,
- msg.readInt16("skill points"));
+ msg.readInt16("skill points"),
+ Notify_true);
const int range = msg.readInt16("attack range");
PlayerInfo::setStatBase(Attributes::HOMUN_ATTACK_RANGE,
- range);
+ range,
+ Notify_true);
PlayerInfo::updateAttrs();
HomunculusInfo *const info = PlayerInfo::getHomunculus();
diff --git a/src/net/eathena/mercenaryrecv.cpp b/src/net/eathena/mercenaryrecv.cpp
index 457045e5b..d995164a9 100644
--- a/src/net/eathena/mercenaryrecv.cpp
+++ b/src/net/eathena/mercenaryrecv.cpp
@@ -45,7 +45,8 @@ namespace EAthena
#define setMercStat(sp, stat) \
case sp: \
PlayerInfo::setStatBase(stat, \
- val); \
+ val, \
+ Notify_true); \
break;
void MercenaryRecv::processMercenaryUpdate(Net::MessageIn &msg)
@@ -81,44 +82,62 @@ void MercenaryRecv::processMercenaryInfo(Net::MessageIn &msg)
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
PlayerInfo::setStatBase(Attributes::MERC_ATK,
- msg.readInt16("atk"));
+ msg.readInt16("atk"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_MATK,
- msg.readInt16("matk"));
+ msg.readInt16("matk"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_HIT,
- msg.readInt16("hit"));
+ msg.readInt16("hit"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_CRIT,
- msg.readInt16("crit/10"));
+ msg.readInt16("crit/10"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_DEF,
- msg.readInt16("def"));
+ msg.readInt16("def"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_MDEF,
- msg.readInt16("mdef"));
+ msg.readInt16("mdef"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_FLEE,
- msg.readInt16("flee"));
+ msg.readInt16("flee"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_ATTACK_DELAY,
- msg.readInt16("attack speed"));
+ msg.readInt16("attack speed"),
+ Notify_true);
const std::string name = msg.readString(24, "name");
const int level = msg.readInt16("level");
PlayerInfo::setStatBase(Attributes::MERC_LEVEL,
- level);
+ level,
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_HP,
- msg.readInt32("hp"));
+ msg.readInt32("hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_MAX_HP,
- msg.readInt32("max hp"));
+ msg.readInt32("max hp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_MP,
- msg.readInt32("sp"));
+ msg.readInt32("sp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_MAX_MP,
- msg.readInt32("max sp"));
+ msg.readInt32("max sp"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_EXPIRE,
- msg.readInt32("expire time"));
+ msg.readInt32("expire time"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_FAITH,
- msg.readInt16("faith"));
+ msg.readInt16("faith"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_CALLS,
- msg.readInt32("calls"));
+ msg.readInt32("calls"),
+ Notify_true);
PlayerInfo::setStatBase(Attributes::MERC_KILLS,
- msg.readInt32("kills"));
+ msg.readInt32("kills"),
+ Notify_true);
const int range = msg.readInt16("attack range");
PlayerInfo::setStatBase(Attributes::MERC_ATTACK_RANGE,
- range);
+ range,
+ Notify_true);
PlayerInfo::updateAttrs();
if ((dstBeing != nullptr) && (localPlayer != nullptr))
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index e98331a28..ee94038fd 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -525,7 +525,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:
@@ -539,11 +541,15 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
Notify_true);
break;
case Sp::KARMA:
- PlayerInfo::setStatBase(Attributes::PLAYER_KARMA, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_KARMA,
+ base,
+ Notify_true);
PlayerInfo::setStatMod(Attributes::PLAYER_KARMA, 0);
break;
case Sp::MANNER:
- PlayerInfo::setStatBase(Attributes::PLAYER_MANNER, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_MANNER,
+ base,
+ Notify_true);
PlayerInfo::setStatMod(Attributes::PLAYER_MANNER, 0);
break;
case Sp::HP:
@@ -688,7 +694,9 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
break;
case Sp::ATK1:
- PlayerInfo::setStatBase(Attributes::PLAYER_ATK, base);
+ PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
+ base,
+ Notify_true);
PlayerInfo::updateAttrs();
break;
case Sp::ATK2:
@@ -696,38 +704,56 @@ 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);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MATK,
+ base,
+ Notify_true);
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);
+ PlayerInfo::setStatMod(Attributes::PLAYER_MDEF,
+ base,
+ Notify_true);
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/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index 7aad0440a..802563b97 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -81,7 +81,9 @@ 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,
@@ -93,7 +95,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,
@@ -105,7 +107,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,
@@ -117,7 +119,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,
@@ -129,7 +131,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,
@@ -141,7 +143,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,
@@ -153,7 +155,8 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
}
PlayerInfo::setStatBase(Attributes::PLAYER_ATK,
- msg.readInt16("left atk"), Notify_false);
+ msg.readInt16("left atk"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_ATK,
msg.readInt16("right atk"));
PlayerInfo::updateAttrs();
@@ -165,25 +168,30 @@ void PlayerRecv::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::setStatMod(Attributes::PLAYER_MATK, val);
PlayerInfo::setStatBase(Attributes::PLAYER_DEF,
- msg.readInt16("left def"), Notify_false);
+ msg.readInt16("left def"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_DEF,
msg.readInt16("right def"));
PlayerInfo::setStatBase(Attributes::PLAYER_MDEF,
- msg.readInt16("left mdef"), Notify_false);
+ msg.readInt16("left mdef"),
+ Notify_false);
PlayerInfo::setStatMod(Attributes::PLAYER_MDEF,
msg.readInt16("right mdef"));
PlayerInfo::setStatBase(Attributes::PLAYER_HIT,
- msg.readInt16("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("flee2/10"));
PlayerInfo::setStatBase(Attributes::PLAYER_CRIT,
- msg.readInt16("crit/10"));
+ msg.readInt16("crit/10"),
+ Notify_true);
PlayerInfo::setAttribute(Attributes::PLAYER_ATTACK_DELAY,
msg.readInt16("attack speed"),