63 const uint8_t flag =
msg.readUInt8(
"flag");
96 msg.readInt32(
"type");
101 const int guildId =
msg.readInt32(
"guild id");
102 const int level =
msg.readInt32(
"guild level");
103 const int members =
msg.readInt32(
"connect member");
104 const int maxMembers =
msg.readInt32(
"max member");
105 const int avgLevel =
msg.readInt32(
"average level");
106 const int exp =
msg.readInt32(
"exp");
107 const int nextExp =
msg.readInt32(
"next exp");
108 msg.skip(12,
"unused");
109 const int emblem =
msg.readInt32(
"emblem id");
110 std::string name =
msg.readString(24,
"guild name");
113 if (
msg.getVersion() >= 20160622)
115 castle =
msg.readString(16,
"castles");
116 msg.readInt32(
"money, unused");
117 msg.readBeingId(
"leader char id");
121 master =
msg.readString(24,
"master name");
122 castle =
msg.readString(16,
"castles");
123 msg.readInt32(
"money, unused");
191 const int length =
msg.readInt16(
"len");
194 const int count = (length - 4) / 32;
196 for (
int i = 0; i < count; i++)
198 msg.readInt32(
"opposition");
199 msg.readInt32(
"guild id");
200 msg.readString(24,
"guild name");
209 const int length =
msg.readInt16(
"len");
213 if (
msg.getVersion() >= 20161026)
222 const int count = (length - 4) / guildSize;
233 for (
int i = 0; i < count; i++)
235 const BeingId id =
msg.readBeingId(
"account id");
236 const int charId =
msg.readInt32(
"char id");
237 msg.readInt16(
"hair");
238 msg.readInt16(
"hair color");
239 const int gender =
msg.readInt16(
"gender");
240 const int race =
msg.readInt16(
"class");
241 const int level =
msg.readInt16(
"level");
242 const int exp =
msg.readInt32(
"exp");
243 const int online =
msg.readInt32(
"online");
244 const int pos =
msg.readInt32(
"position");
246 if (
msg.getVersion() < 20161026)
248 msg.skip(50,
"unused");
249 name =
msg.readString(24,
"name");
253 msg.readInt32(
"last login");
274 if (being !=
nullptr)
303 const int length =
msg.readInt16(
"len");
306 const int count = (length - 4) / 28;
308 for (
int i = 0; i < count; i++)
310 const int id =
msg.readInt32(
"position id");
311 const std::string name =
msg.readString(24,
"position name");
318 const int length =
msg.readInt16(
"len");
321 const int count = (length - 4) / 16;
323 for (
int i = 0; i < count; i++)
326 msg.readInt32(
"mode");
327 msg.readInt32(
"same id");
328 msg.readInt32(
"exp mode");
335 msg.readInt16(
"len");
337 msg.readInt32(
"mode");
338 msg.readInt32(
"same ip");
339 msg.readInt32(
"exp mode");
340 msg.readString(24,
"name");
345 msg.readInt16(
"len");
346 const BeingId accountId =
msg.readBeingId(
"account id");
347 const int charId =
msg.readInt32(
"char id");
348 const int pos =
msg.readInt32(
"position");
360 const int length =
msg.readInt16(
"len");
362 msg.readInt32(
"guild id");
363 msg.readInt32(
"emblem id");
366 msg.skip(length - 12,
"emblem data");
371 const int count = (
msg.readInt16(
"len") - 6) / 37;
372 msg.readInt16(
"skill points");
376 for (
int i = 0; i < count; i++)
378 const int skillId =
msg.readInt16(
"skill id");
380 msg.readInt32(
"inf"));
381 const int level =
msg.readInt16(
"skill level");
382 const int sp =
msg.readInt16(
"sp");
383 const int range =
msg.readInt16(
"range");
384 const std::string name =
msg.readString(24,
"skill name");
392 skillId, name, level, range, up, inf, sp);
404 const std::string msg1 =
msg.readString(60,
"msg1");
405 const std::string
msg2 =
msg.readString(120,
"msg2");
417 msg.readString(60,
"msg1");
418 msg.readString(120,
"msg2");
424 const int guildId =
msg.readInt32(
"guild id");
428 const std::string guildName =
msg.readString(24,
"guild name");
433 msg.readString(24,
"guild name");
439 const uint8_t flag =
msg.readUInt8(
"flag");
469 const std::string nick =
msg.readString(24,
"nick");
470 msg.readString(40,
"message");
512 const int charId =
msg.readInt32(
"char id");
513 msg.readString(40,
"message");
519 if (member !=
nullptr)
563 const int msgLength =
msg.readInt16(
"len") - 4;
569 std::string chatMsg =
msg.readString(msgLength,
"message");
570 const size_t pos = chatMsg.find(
" : ", 0);
571 if (pos != std::string::npos)
573 const std::string sender_name = chatMsg.substr(0, pos);
574 chatMsg.erase(0, pos + 3);
589 msg.readString(msgLength,
"message");
597 msg.readString(24,
"name");
603 msg.readInt32(
"flag");
609 msg.readInt32(
"guild id");
610 msg.readInt32(
"flag");
616 msg.readUInt8(
"flag");
622 msg.readInt32(
"flag");
666 const BeingId id =
msg.readBeingId(
"account id");
667 const int x =
msg.readInt16(
"x");
668 const int y =
msg.readInt16(
"y");
682 const int guildId =
msg.readInt32(
"guild id");
683 const int emblem =
msg.readInt32(
"elblem id");
686 msg.readUInt8(
"guild master");
687 msg.readInt32(
"unused");
688 std::string guildName =
msg.readString(24,
"guild name");
717 const BeingId accountId =
msg.readBeingId(
"account id");
718 const int charId =
msg.readInt32(
"char id");
719 const int online =
msg.readInt32(
"flag");
721 msg.readInt16(
"sex")));
722 msg.readInt16(
"hair");
723 msg.readInt16(
"hair color");
742 const std::string nick =
msg.readString(24,
"name");
743 msg.readString(40,
"message");
750 msg.readString(40,
"message");
751 const int charId =
msg.readInt32(
"char id");
758 if (member !=
nullptr)
769 const int length =
msg.readInt16(
"len");
773 const int count = (length - 4) / 88;
774 for (
int i = 0; i < count; i++)
776 msg.readString(24,
"char name");
777 msg.readString(24,
"account name");
778 msg.readString(40,
"message");
785 const int length =
msg.readInt16(
"len");
789 const int count = (length - 4) / 64;
790 for (
int i = 0; i < count; i++)
792 msg.readString(24,
"name");
793 msg.readString(40,
"message");
800 const int length =
msg.readInt16(
"len");
804 int count = (length - 4) / 44;
805 for (
int i = 0; i < count; i++)
807 msg.readInt32(
"char id");
808 msg.readString(40,
"message");
815 msg.readBeingId(
"being id");
816 msg.readInt32(
"guild id");
817 msg.readInt16(
"emblem id");
824 msg.readBeingId(
"being id");
825 msg.readInt32(
"char id");
826 msg.readInt32(
"online");
831 const int positionLen =
msg.readInt16(
"len") - 8;
832 const BeingId beingId =
msg.readBeingId(
"being id");
833 std::string position;
836 position =
msg.readString(positionLen,
"position");
839 if (dstBeing !=
nullptr)
ActorManager * actorManager
Net::BeingHandler * beingHandler
#define fromBool(val, name)
std::string findCharById(const int32_t id)
void updatePlayerColors() const
Being * findBeing(const BeingId id) const
Being * findBeingByName(const std::string &name, const ActorTypeT type) const
void updatePlayerGuild() const
void setOnline(const bool online)
void setGender(const GenderT g)
void setLevel(const int level)
void setID(const BeingId id)
std::string getName() const
void setCharId(const int id)
void setRace(const int r)
void setGuildName(const std::string &name)
virtual int getLevel() const
static GenderT intToGender(const uint8_t sex) A_CONST
void addGuild(Guild *const guild)
void setLevel(const int n)
const std::string & getName() const
void setGuildPos(const std::string &pos)
void removeGuild(const int id)
void setGuild(Guild *const guild)
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
void showOnline(const std::string &nick, const Online online)
void loadFromLogFile(const std::string &name)
bool getBoolValue(const std::string &key) const
void setPos(const int pos)
GuildMember * addMember(const BeingId accountId, const int charId, const std::string &name)
void setName(const std::string &name)
static Guild * getGuild(const int16_t id)
GuildMember * getMemberByCharId(const int charId) const
const std::string & getName() const
void removeMember(const GuildMember *const member)
void addPos(const int id, const std::string &name)
void setEmblemId(const int id)
GuildMember * getMember(const BeingId id) const
void log1(const char *const log_text)
virtual void requestNameByCharId(const int id) const =0
virtual void memberList() const =0
bool updateSkill(const int id, const int range, const Modifiable modifiable, const SkillType::SkillType type, const int sp)
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)
void hideSkills(const SkillOwner::Type owner)
void updateGuildCounter(const int online, const int total)
void showGuildInvite(const std::string &guildName, const int guildId, const std::string &inviterName)
bool removeTab(Guild *const guild)
Net::GuildHandler * guildHandler
const bool IgnoreRecord_false
LocalPlayer * localPlayer
#define UNIMPLEMENTEDPACKET
bool msg(InputEvent &event)
bool msg2(InputEvent &event)
std::string trim(std::string const &str)
void processGuildCreateResponse(Net::MessageIn &msg)
void processGuildReqAlliance(Net::MessageIn &msg)
void processGuildMemberList(Net::MessageIn &msg)
void processGuildSetPosition(Net::MessageIn &msg)
void processGuildSkillInfo(Net::MessageIn &msg)
void processGuildEmblemData(Net::MessageIn &msg)
void processGuildLeave2(Net::MessageIn &msg)
void processGuildMemberLogin(Net::MessageIn &msg)
void processGuildMasterOrMember(Net::MessageIn &msg)
void processGuildBasicInfo(Net::MessageIn &msg)
void processGuildInviteAck(Net::MessageIn &msg)
void processOnlineInfo(Net::MessageIn &msg)
void processGuildExpulsionList3(Net::MessageIn &msg)
void processGuildBroken(Net::MessageIn &msg)
void processGuildReqAllianceAck(Net::MessageIn &msg)
void processGuildExpulsionList1(Net::MessageIn &msg)
void processGuildExpulsion2(Net::MessageIn &msg)
void processGuildPosNameList(Net::MessageIn &msg)
void processGuildPosInfoList(Net::MessageIn &msg)
void processGuildMessage(Net::MessageIn &msg)
void processGuildEmblem(Net::MessageIn &msg)
void processGuildMemberPosChange(Net::MessageIn &msg)
void processGuildAlianceInfo(Net::MessageIn &msg)
void processGuildExpulsion(Net::MessageIn &msg)
void processGuildOppositionAck(Net::MessageIn &msg)
void processGuildNotice(Net::MessageIn &msg)
void processGuildInvite(Net::MessageIn &msg)
void processGuildPositionInfo(Net::MessageIn &msg)
void processGuildLeave(Net::MessageIn &msg)
void processGuildDelAlliance(Net::MessageIn &msg)
void processGuildExpulsionContinue(const std::string &nick)
void processGuildPositionChanged(Net::MessageIn &msg)
void processGuildExpulsionList2(Net::MessageIn &msg)
void processGuildUpdateCoords(Net::MessageIn &msg)
void notify(const unsigned int message)
@ GUILD_EMPERIUM_CHECK_FAILED
void setSkillLevel(const int id, const int value)
void setGuildPositionFlags(const GuildPositionFlags::Type pos)
SkillDialog * skillDialog
SocialWindow * socialWindow
std::string strprintf(const char *const format,...)
const bool TryRemoveColors_true