summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-06 23:02:49 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-06 23:02:49 +0300
commit0d35aab89fab92c11282f1c878b0fbbf68ca4ccf (patch)
treee154e65a42dd6746287fe928460bbbee64470012 /src
parent32223642829f80fe2f8a775f2dca81e5565c0104 (diff)
downloadmv-0d35aab89fab92c11282f1c878b0fbbf68ca4ccf.tar.gz
mv-0d35aab89fab92c11282f1c878b0fbbf68ca4ccf.tar.bz2
mv-0d35aab89fab92c11282f1c878b0fbbf68ca4ccf.tar.xz
mv-0d35aab89fab92c11282f1c878b0fbbf68ca4ccf.zip
Add into increaseAttribute parameter with about of attributes to up.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/net/eathena/playerhandler.cpp5
-rw-r--r--src/net/eathena/playerhandler.h3
-rw-r--r--src/net/playerhandler.h3
-rw-r--r--src/net/tmwa/playerhandler.cpp3
-rw-r--r--src/net/tmwa/playerhandler.h3
6 files changed, 12 insertions, 7 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 979da2859..231b4d9b5 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -798,7 +798,7 @@ void ChangeDisplay::action(const ActionEvent &event)
for (int f = 0; f < mInc->getClickCount(); f ++)
{
- playerHandler->increaseAttribute(mId);
+ playerHandler->increaseAttribute(mId, 1);
if (cnt != 1)
SDL_Delay(100);
}
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index c07fa4d13..470a1530a 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -64,13 +64,14 @@ void PlayerHandler::emote(const uint8_t emoteId) const
outMsg.writeInt8(emoteId, "emote id");
}
-void PlayerHandler::increaseAttribute(const AttributesT attr) const
+void PlayerHandler::increaseAttribute(const AttributesT attr,
+ const int amount) const
{
if (attr >= Attributes::STR && attr <= Attributes::LUK)
{
createOutPacket(CMSG_STAT_UPDATE_REQUEST);
outMsg.writeInt16(CAST_S16(attr), "attribute id");
- outMsg.writeInt8(1, "increase");
+ outMsg.writeInt8(amount, "increase");
}
}
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index f8e29c36b..6f8e9b4eb 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -40,7 +40,8 @@ class PlayerHandler final : public Ea::PlayerHandler
void stopAttack() const override final;
void emote(const uint8_t emoteId) const override final;
- void increaseAttribute(const AttributesT attr) const override final;
+ void increaseAttribute(const AttributesT attr,
+ const int amount) const override final;
void increaseSkill(const uint16_t skillId) const override final;
void pickUp(const FloorItem *const floorItem) const override final;
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index 19682bda4..3292c6083 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -49,7 +49,8 @@ class PlayerHandler notfinal
virtual void emote(const uint8_t emoteId) const = 0;
- virtual void increaseAttribute(const AttributesT attr) const = 0;
+ virtual void increaseAttribute(const AttributesT attr,
+ const int amount) const = 0;
virtual void decreaseAttribute(const AttributesT attr) const = 0;
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index b53f29664..a4512489a 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -64,7 +64,8 @@ void PlayerHandler::emote(const uint8_t emoteId) const
outMsg.writeInt8(emoteId, "emote id");
}
-void PlayerHandler::increaseAttribute(const AttributesT attr) const
+void PlayerHandler::increaseAttribute(const AttributesT attr,
+ const int amount A_UNUSED) const
{
if (attr >= Attributes::STR && attr <= Attributes::LUK)
{
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index f9799a597..c97aee27c 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -40,7 +40,8 @@ class PlayerHandler final : public Ea::PlayerHandler
void stopAttack() const override final;
void emote(const uint8_t emoteId) const override final;
- void increaseAttribute(const AttributesT attr) const override final;
+ void increaseAttribute(const AttributesT attr,
+ const int amount) const override final;
void increaseSkill(const uint16_t skillId) const override final;
void pickUp(const FloorItem *const floorItem) const override final;