From 0d35aab89fab92c11282f1c878b0fbbf68ca4ccf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 Mar 2016 23:02:49 +0300 Subject: Add into increaseAttribute parameter with about of attributes to up. --- src/net/eathena/playerhandler.cpp | 5 +++-- src/net/eathena/playerhandler.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/net/eathena') 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; -- cgit v1.2.3-70-g09d2