61 msg.readInt16(
"share exp"));
63 msg.readInt16(
"share items"));
70 bool isOldParty =
false;
71 std::set<std::string> names;
72 std::set<std::string> onlineNames;
75 logger->
log1(
"error: party empty in SMSG_PARTY_INFO");
85 FOR_EACHP (Party::MemberList::const_iterator, it, members)
87 if ((*it)->getOnline())
88 onlineNames.insert((*it)->getName());
96 logger->
log1(
"error: localPlayer==0 in SMSG_PARTY_INFO");
101 const int length =
msg.readInt16(
"len");
105 const int count = (length - 28) / 46;
112 for (
int i = 0; i < count; i++)
115 std::string nick =
msg.readString(24,
"nick");
116 std::string map =
msg.readString(16,
"map");
117 const bool leader =
msg.readUInt8(
"leader") == 0U;
118 const bool online =
msg.readUInt8(
"online") == 0U;
126 if (names.find(nick) == names.end())
134 if (member !=
nullptr)
136 if (!joined && (
partyTab !=
nullptr))
138 if (!names.empty() && ((onlineNames.find(nick)
139 == onlineNames.end() && online)
140 || (onlineNames.find(nick) != onlineNames.end()
174 const int msgLength =
msg.readInt16(
"len") - 8;
179 const std::string chatMsg =
msg.readString(msgLength,
"message");
184 if (member !=
nullptr)
201 const std::string nick =
msg.readString(24,
"nick");
203 switch (
msg.readUInt8(
"status"))
227 const BeingId id =
msg.readBeingId(
"account id");
233 if (being !=
nullptr)
242 const std::string partyName =
msg.readString(24,
"party name");
247 msg.readString(24,
"party name");
259 msg.readInt32(
"unused");
262 const bool online =
msg.readUInt8(
"online") != 0;
266 msg.readString(24,
"party");
267 msg.readString(24,
"nick");
272 msg.readInt32(
"unused");
275 msg.readUInt8(
"online");
276 msg.readString(24,
"party");
277 msg.readString(24,
"nick");
278 msg.readString(16,
"map");
285 const int hp =
msg.readInt16(
"hp");
286 const int maxhp =
msg.readInt16(
"max hp");
ActorManager * actorManager
#define fromBool(val, name)
Being * findBeing(const BeingId id) const
void setOnline(const bool online)
void setMaxHp(const int maxHp)
void setMap(const std::string &map)
std::string getName() const
void setParty(Party *const party)
const std::string & getName() const
void setPartyName(const std::string &name)
ActorTypeT getType() const
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
void showOnline(const std::string &nick, const Online online)
void log1(const char *const log_text)
void setLeader(const bool leader)
std::vector< PartyMember * > MemberList
const MemberList * getMembers() const
void setName(const std::string &name)
PartyMember * addMember(const BeingId id, const std::string &name)
PartyMember * getMember(const BeingId id) const
void getNamesSet(std::set< std::string > &names) const
static Party * getParty(const int16_t id)
void showPartyInvite(const std::string &partyName, const std::string &inviter, const int partyId)
#define FOR_EACHP(type, iter, array)
LocalPlayer * localPlayer
bool msg(InputEvent &event)
void processPartyItemSettingsContinue(Net::MessageIn &msg, const PartyShareT item)
void processPartyExpSettingsContinue(Net::MessageIn &msg, const PartyShareT exp)
const std::string & getName(const int id)
void notify(const unsigned int message)
@ PARTY_INVITE_ALREADY_MEMBER
@ PARTY_INVITE_PARTY_FULL
void processPartySettings(Net::MessageIn &msg)
void processPartyUpdateHp(Net::MessageIn &msg)
void processPartyInviteResponse(Net::MessageIn &msg)
void processPartyMove(Net::MessageIn &msg)
void processPartyMessage(Net::MessageIn &msg)
void processPartyInvited(Net::MessageIn &msg)
void processPartyInfo(Net::MessageIn &msg)
PartyShare ::T PartyShareT
SocialWindow * socialWindow