36#define SKILL_BASIC 0x0001
37#define SKILL_WARP 0x001b
38#define SKILL_STEAL 0x0032
39#define SKILL_ENVENOM 0x0034
42#define BSKILL_TRADE 0x0000
43#define BSKILL_EMOTE 0x0001
44#define BSKILL_SIT 0x0002
45#define BSKILL_CREATECHAT 0x0003
46#define BSKILL_JOINPARTY 0x0004
47#define BSKILL_SHOUT 0x0005
48#define BSKILL_PK 0x0006
49#define BSKILL_SETALLIGN 0x0007
52#define RFAIL_SKILLDEP 0x00
53#define RFAIL_INSUFSP 0x01
54#define RFAIL_INSUFHP 0x02
55#define RFAIL_NOMEMO 0x03
56#define RFAIL_SKILLDELAY 0x04
57#define RFAIL_ZENY 0x05
58#define RFAIL_WEAPON 0x06
59#define RFAIL_REDGEM 0x07
60#define RFAIL_BLUEGEM 0x08
61#define RFAIL_OVERWEIGHT 0x09
62#define RFAIL_GENERIC 0x0a
65#define SKILL_FAILED 0x00
73 static const Uint16 _messages[] = {
89 const int skillCount = (msg.
getLength() - 4) / 37;
91 for (
int k = 0; k < skillCount; k++)
141 msg =
_(
"Trade failed!");
144 msg =
_(
"Emote failed!");
147 msg =
_(
"Sit failed!");
150 msg =
_(
"Chat creating failed!");
153 msg =
_(
"Could not join party!");
156 msg =
_(
"Cannot shout!");
165 msg +=
_(
"You have not yet reached a high enough lvl!");
168 msg +=
_(
"Insufficient HP!");
171 msg +=
_(
"Insufficient SP!");
174 msg +=
_(
"You have no memos!");
177 msg +=
_(
"You cannot do that right now!");
180 msg +=
_(
"Seems you need more money... ;-)");
183 msg +=
_(
"You cannot use this skill with that kind of weapon!");
186 msg +=
_(
"You need another red gem!");
189 msg +=
_(
"You need another blue gem!");
192 msg +=
_(
"You're carrying to much to do this!");
195 msg +=
_(
"Huh? What's that?");
204 msg =
_(
"Warp failed...");
207 msg =
_(
"Could not steal anything...");
210 msg =
_(
"Poison had no effect...");
const uint16_t * handledMessages
void setModifiable(int id, bool modifiable)
void useOn(int id, int beingId) override
void handleMessage(MessageIn &msg) override
void useAt(int id, int x, int y) override
void useInDirection(int id, int direction) override
void use(int id) override
Used for parsing an incoming message from eAthena.
void skip(unsigned int length)
Skips a given number of bytes.
uint16_t readInt16()
Reads an unsigned 16-bit integer from the message.
uint8_t readInt8()
Reads an unsigned 8-bit integer from the message.
uint16_t getId() const
Returns the message ID.
unsigned int getLength() const
Returns the message length.
void serverNotice(const std::string &message)
SkillDialog * skillDialog
Net::AbilityHandler * abilityHandler
void info(const char *log_text,...) LOG_PRINTF_ATTR
void setStatBase(int id, int value, bool notify)
Changes the base value of the given stat.
Warning: buffers and other variables are shared, so there can be only one connection active at a time...
#define SKILL_BASIC
job dependend identifiers (?)
#define RFAIL_SKILLDEP
reasons why action failed
#define BSKILL_CREATECHAT
#define BSKILL_TRADE
basic skills identifiers