diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-17 02:07:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-17 02:07:28 +0300 |
commit | e91a8c39e38cddb085320ae390cf985a73eaee5c (patch) | |
tree | b407ed97d8feda93743ab1347a11692dfd979353 | |
parent | ddf3a130e1db0417d2dad77f69d6aa95028024d6 (diff) | |
download | manaverse-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.gz manaverse-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.bz2 manaverse-e91a8c39e38cddb085320ae390cf985a73eaee5c.tar.xz manaverse-e91a8c39e38cddb085320ae390cf985a73eaee5c.zip |
Remove default parameter from PlayerInfo::setStatBase.
-rw-r--r-- | src/being/localplayer.cpp | 3 | ||||
-rw-r--r-- | src/being/playerinfo.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/attrs/changedisplay.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/inventoryrecv.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/charserverrecv.cpp | 3 | ||||
-rw-r--r-- | src/net/eathena/elementalrecv.cpp | 15 | ||||
-rw-r--r-- | src/net/eathena/homunculusrecv.cpp | 58 | ||||
-rw-r--r-- | src/net/eathena/mercenaryrecv.cpp | 57 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 52 | ||||
-rw-r--r-- | src/net/eathena/playerrecv.cpp | 32 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 36 | ||||
-rw-r--r-- | src/net/tmwa/playerrecv.cpp | 35 |
12 files changed, 204 insertions, 95 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 4e783606f..4a6c65718 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -194,7 +194,8 @@ LocalPlayer::LocalPlayer(const BeingId id, mNameColor = nullptr; PlayerInfo::setStatBase(Attributes::PLAYER_WALK_SPEED, - getWalkSpeed()); + getWalkSpeed(), + Notify_true); PlayerInfo::setStatMod(Attributes::PLAYER_WALK_SPEED, 0); loadHomes(); diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 504b7d1d2..a4691a54e 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -121,7 +121,7 @@ namespace PlayerInfo */ void setStatBase(const AttributesT id, const int value, - const Notify notify = Notify_true); + const Notify notify); /** * Returns the modifier for the given stat. diff --git a/src/gui/widgets/attrs/changedisplay.cpp b/src/gui/widgets/attrs/changedisplay.cpp index 213abc3d5..a24057af5 100644 --- a/src/gui/widgets/attrs/changedisplay.cpp +++ b/src/gui/widgets/attrs/changedisplay.cpp @@ -101,7 +101,7 @@ void ChangeDisplay::action(const ActionEvent &event) Notify_true); const int newbase = PlayerInfo::getStatBase(mId) + cnt; - PlayerInfo::setStatBase(mId, newbase); + PlayerInfo::setStatBase(mId, newbase, Notify_true); if (Net::getNetworkType() != ServerType::TMWATHENA) { diff --git a/src/net/ea/inventoryrecv.cpp b/src/net/ea/inventoryrecv.cpp index 3e8c239e9..839447496 100644 --- a/src/net/ea/inventoryrecv.cpp +++ b/src/net/ea/inventoryrecv.cpp @@ -172,7 +172,9 @@ void InventoryRecv::processPlayerAttackRange(Net::MessageIn &msg) const int range = msg.readInt16("range"); if (localPlayer != nullptr) localPlayer->setAttackRange(range); - PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_RANGE, range); + PlayerInfo::setStatBase(Attributes::PLAYER_ATTACK_RANGE, + range, + Notify_true); PlayerInfo::setStatMod(Attributes::PLAYER_ATTACK_RANGE, 0); BLOCK_END("InventoryRecv::processPlayerAttackRange") } 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"), 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") } |