49 const int skillCount = (
msg.getLength() - 4) / 37;
52 for (
int k = 0; k < skillCount; k++)
54 const int skillId =
msg.readInt16(
"skill id");
56 msg.readInt16(
"inf"));
57 msg.readInt16(
"skill pool flags");
58 const int level =
msg.readInt16(
"skill level");
59 const int sp =
msg.readInt16(
"sp");
60 const int range =
msg.readInt16(
"range");
61 msg.skip(24,
"unused");
64 if ((oldLevel != 0) && oldLevel != level)
65 updateSkill = skillId;
72 skillId,
"", level, range, up, inf, sp);
88 const int skillId =
msg.readInt16(
"skill id");
89 const int16_t bskill =
msg.readInt16(
"bskill");
90 msg.readInt16(
"btype");
91 const signed char success =
msg.readUInt8(
"success");
92 const signed char reason =
msg.readUInt8(
"reason");
96 logger->
log(
"Action: %d/%d", bskill, success);
114 txt =
_(
"Trade failed!");
118 txt =
_(
"Emote failed!");
122 txt =
_(
"Sit failed!");
126 txt =
_(
"Chat creating failed!");
130 txt =
_(
"Could not join party!");
134 txt =
_(
"Cannot shout!");
147 txt.append(
_(
"You have not yet reached a high enough lvl!"));
151 txt.append(
_(
"Insufficient HP!"));
155 txt.append(
_(
"Insufficient SP!"));
159 txt.append(
_(
"You have no memos!"));
163 txt.append(
_(
"You cannot do that right now!"));
167 txt.append(
_(
"Seems you need more money... ;-)"));
171 txt.append(
_(
"You cannot use this skill with that "
176 txt.append(
_(
"You need another red gem!"));
180 txt.append(
_(
"You need another blue gem!"));
184 txt.append(
_(
"You're carrying to much to do this!"));
188 txt.append(
_(
"Huh? What's that?"));
199 txt =
_(
"Warp failed...");
203 txt =
_(
"Could not steal anything...");
207 txt =
_(
"Poison had no effect...");
#define fromBool(val, name)
void log(const char *const log_text,...)
bool updateSkill(const int id, const int range, const Modifiable modifiable, const SkillType::SkillType type, const int sp)
void playUpdateEffect(const int id) const
void addSkill(const SkillOwner::Type owner, const int id, const std::string &name, const int level, const int range, const Modifiable modifiable, const SkillType::SkillType type, const int sp)
std::string update(const int id)
LocalPlayer * localPlayer
#define UNIMPLEMENTEDPACKETFIELD(field)
bool msg(InputEvent &event)
void notify(const unsigned int message)
int getSkillLevel(const int id)
void setSkillLevel(const int id, const int value)
void processPlayerSkills(Net::MessageIn &msg)
void processSkillFailed(Net::MessageIn &msg)
static const unsigned int RFAIL_BLUEGEM
static const unsigned int RFAIL_OVERWEIGHT
static const unsigned int BSKILL_SIT
static const unsigned int SKILL_STEAL
static const unsigned int RFAIL_INSUFHP
static const unsigned int RFAIL_INSUFSP
static const unsigned int SKILL_ENVENOM
static const unsigned int RFAIL_ZENY
static const unsigned int BSKILL_TRADE
static const unsigned int BSKILL_SHOUT
static const unsigned int BSKILL_JOINPARTY
static const unsigned int SKILL_BASIC
static const unsigned int RFAIL_SKILLDELAY
static const unsigned int RFAIL_REDGEM
static const unsigned int SKILL_WARP
static const unsigned int RFAIL_SKILLDEP
static const unsigned int BSKILL_EMOTE
static const unsigned int BSKILL_CREATECHAT
static const unsigned int RFAIL_WEAPON
static const unsigned int RFAIL_NOMEMO
static const unsigned int SKILL_FAILED
SkillDialog * skillDialog