ManaPlus
guildrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2009-2010 The Mana Developers
4  * Copyright (C) 2011-2018 The ManaPlus Developers
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #include "net/eathena/guildrecv.h"
23 
24 #include "actormanager.h"
25 #include "configuration.h"
26 #include "notifymanager.h"
27 
28 #include "being/localplayer.h"
29 #include "being/playerinfo.h"
30 
32 
33 #include "gui/windows/chatwindow.h"
36 
38 
39 #include "net/messagein.h"
40 
42 
43 #include "utils/delete2.h"
44 #include "utils/checkutils.h"
45 #include "utils/gettext.h"
46 
47 #include "debug.h"
48 
49 namespace EAthena
50 {
51 
52 Guild *taGuild = nullptr;
53 
54 namespace GuildRecv
55 {
56  bool showBasicInfo = false;
57 } // namespace GuildRecv
58 
60 {
61  const uint8_t flag = msg.readUInt8("flag");
62 
63  switch (flag)
64  {
65  case 0:
66  // Success
68  break;
69 
70  case 1:
71  // Already in a guild
73  break;
74 
75  case 2:
76  // Unable to make (likely name already in use)
78  break;
79 
80  case 3:
81  // Emperium check failed
83  break;
84 
85  default:
86  // Unknown response
88  break;
89  }
90 }
91 
93 {
94  msg.readInt32("type"); // Type (0x57 for member, 0xd7 for master)
95 }
96 
98 {
99  const int guildId = msg.readInt32("guild id");
100  const int level = msg.readInt32("guild level");
101  const int members = msg.readInt32("connect member");
102  const int maxMembers = msg.readInt32("max member");
103  const int avgLevel = msg.readInt32("average level");
104  const int exp = msg.readInt32("exp");
105  const int nextExp = msg.readInt32("next exp");
106  msg.skip(12, "unused");
107  const int emblem = msg.readInt32("emblem id");
108  std::string name = msg.readString(24, "guild name");
109  std::string castle;
110  std::string master;
111  if (msg.getVersion() >= 20160622)
112  {
113  castle = msg.readString(16, "castles");
114  msg.readInt32("money, unused");
115  msg.readBeingId("leader char id");
116  }
117  else
118  {
119  master = msg.readString(24, "master name");
120  castle = msg.readString(16, "castles");
121  msg.readInt32("money, unused");
122  }
123 
124  if (guildTab != nullptr &&
126  {
127  showBasicInfo = false;
128  // TRANSLATORS: guild info message
129  guildTab->chatLog(strprintf(_("Guild name: %s"),
130  name.c_str()),
134  if (!master.empty())
135  {
136  // TRANSLATORS: guild info message
137  guildTab->chatLog(strprintf(_("Guild master: %s"),
138  master.c_str()),
142  }
143  // TRANSLATORS: guild info message
144  guildTab->chatLog(strprintf(_("Guild level: %d"), level),
148  // TRANSLATORS: guild info message
149  guildTab->chatLog(strprintf(_("Online members: %d"), members),
153  // TRANSLATORS: guild info message
154  guildTab->chatLog(strprintf(_("Max members: %d"), maxMembers),
158  // TRANSLATORS: guild info message
159  guildTab->chatLog(strprintf(_("Average level: %d"), avgLevel),
163  // TRANSLATORS: guild info message
164  guildTab->chatLog(strprintf(_("Guild exp: %d"), exp),
168  // TRANSLATORS: guild info message
169  guildTab->chatLog(strprintf(_("Guild next exp: %d"), nextExp),
173  // TRANSLATORS: guild info message
174  guildTab->chatLog(strprintf(_("Guild castle: %s"), castle.c_str()),
178  }
179 
180  Guild *const g = Guild::getGuild(CAST_S16(guildId));
181  if (g == nullptr)
182  return;
183  g->setName(name);
184  g->setEmblemId(emblem);
185 }
186 
188 {
189  const int length = msg.readInt16("len");
190  if (length < 4)
191  return;
192  const int count = (length - 4) / 32;
193 
194  for (int i = 0; i < count; i++)
195  {
196  msg.readInt32("opposition");
197  msg.readInt32("guild id");
198  msg.readString(24, "guild name");
199  }
200 }
201 
203 {
204  const int length = msg.readInt16("len");
205  if (length < 4)
206  return;
207  int guildSize = 0;
208  if (msg.getVersion() >= 20161026)
209  {
210  guildSize = 34;
211  reportAlways("missing guild member names");
212  }
213  else
214  {
215  guildSize = 104;
216  }
217 
218  const int count = (length - 4) / guildSize;
219  if (taGuild == nullptr)
220  {
221  logger->log1("!taGuild");
222  return;
223  }
224 
225  taGuild->clearMembers();
226 
227  int onlineNum = 0;
228  int totalNum = 0;
229  for (int i = 0; i < count; i++)
230  {
231  const BeingId id = msg.readBeingId("account id");
232  const int charId = msg.readInt32("char id");
233  msg.readInt16("hair");
234  msg.readInt16("hair color");
235  const int gender = msg.readInt16("gender");
236  const int race = msg.readInt16("class");
237  const int level = msg.readInt16("level");
238  const int exp = msg.readInt32("exp");
239  const int online = msg.readInt32("online");
240  const int pos = msg.readInt32("position");
241  std::string name;
242  if (msg.getVersion() < 20161026)
243  {
244  msg.skip(50, "unused");
245  name = msg.readString(24, "name");
246  }
247  else
248  {
249  msg.readInt32("last login"); // for now unused
250  continue;
251  }
252 
253  GuildMember *const m = taGuild->addMember(id, charId, name);
254  if (m != nullptr)
255  {
256  m->setOnline(online != 0);
257  m->setID(id);
258  m->setCharId(charId);
259  m->setGender(Being::intToGender(CAST_U8(gender)));
260  m->setLevel(level);
261  m->setExp(exp);
262  m->setPos(pos);
263  m->setRace(race);
264  if (actorManager != nullptr)
265  {
266  Being *const being = actorManager->findBeingByName(
267  name, ActorType::Player);
268  if (being != nullptr)
269  {
270  being->setGuildName(taGuild->getName());
271  if (being->getLevel() != level)
272  {
273  being->setLevel(level);
274  being->updateName();
275  }
276  }
277  }
278  if (online != 0)
279  onlineNum ++;
280  totalNum ++;
281  }
282  }
283  taGuild->sort();
284  if (actorManager != nullptr)
285  {
288  }
289  if (socialWindow != nullptr)
290  socialWindow->updateGuildCounter(onlineNum, totalNum);
291 }
292 
294 {
295  if (taGuild == nullptr)
296  {
297  logger->log1("!taGuild");
298  return;
299  }
300 
301  const int length = msg.readInt16("len");
302  if (length < 4)
303  return;
304  const int count = (length - 4) / 28;
305 
306  for (int i = 0; i < count; i++)
307  {
308  const int id = msg.readInt32("position id");
309  const std::string name = msg.readString(24, "position name");
310  taGuild->addPos(id, name);
311  }
312 }
313 
315 {
316  const int length = msg.readInt16("len");
317  if (length < 4)
318  return;
319  const int count = (length - 4) / 16;
320 
321  for (int i = 0; i < count; i++)
322  {
323  msg.readInt32("id");
324  msg.readInt32("mode");
325  msg.readInt32("same id");
326  msg.readInt32("exp mode");
327  }
328 }
329 
331 {
333  msg.readInt16("len");
334  msg.readInt32("id");
335  msg.readInt32("mode");
336  msg.readInt32("same ip");
337  msg.readInt32("exp mode");
338  msg.readString(24, "name");
339 }
340 
342 {
343  msg.readInt16("len");
344  const BeingId accountId = msg.readBeingId("account id");
345  const int charId = msg.readInt32("char id");
346  const int pos = msg.readInt32("position");
347  if (taGuild != nullptr)
348  {
349  GuildMember *const m = taGuild->getMember(accountId, charId);
350  if (m != nullptr)
351  m->setPos(pos);
352  }
353 }
354 
356 {
358  const int length = msg.readInt16("len");
359 
360  msg.readInt32("guild id");
361  msg.readInt32("emblem id");
362  if (length < 12)
363  return;
364  msg.skip(length - 12, "emblem data");
365 }
366 
368 {
369  const int count = (msg.readInt16("len") - 6) / 37;
370  msg.readInt16("skill points");
371 
372  if (skillDialog != nullptr)
374  for (int i = 0; i < count; i++)
375  {
376  const int skillId = msg.readInt16("skill id");
377  const SkillType::SkillType inf = static_cast<SkillType::SkillType>(
378  msg.readInt32("inf"));
379  const int level = msg.readInt16("skill level");
380  const int sp = msg.readInt16("sp");
381  const int range = msg.readInt16("range");
382  const std::string name = msg.readString(24, "skill name");
383  const Modifiable up = fromBool(msg.readUInt8("up flag"), Modifiable);
384  PlayerInfo::setSkillLevel(skillId, level);
385  if (skillDialog != nullptr)
386  {
387  if (!skillDialog->updateSkill(skillId, range, up, inf, sp))
388  {
390  skillId, name, level, range, up, inf, sp);
391  }
392  }
393  }
394  if (skillDialog != nullptr)
396 }
397 
399 {
400  if (guildTab != nullptr)
401  {
402  const std::string msg1 = msg.readString(60, "msg1");
403  const std::string msg2 = msg.readString(120, "msg2");
404  guildTab->chatLog(msg1,
408  guildTab->chatLog(msg2,
412  }
413  else
414  {
415  msg.readString(60, "msg1");
416  msg.readString(120, "msg2");
417  }
418 }
419 
421 {
422  const int guildId = msg.readInt32("guild id");
423 
424  if (socialWindow != nullptr)
425  {
426  const std::string guildName = msg.readString(24, "guild name");
427  socialWindow->showGuildInvite(guildName, guildId, "");
428  }
429  else
430  {
431  msg.readString(24, "guild name");
432  }
433 }
434 
436 {
437  const uint8_t flag = msg.readUInt8("flag");
438  if (guildTab == nullptr)
439  return;
440 
441  switch (flag)
442  {
443  case 0:
445  break;
446 
447  case 1:
449  break;
450 
451  case 2:
453  break;
454 
455  case 3:
457  break;
458 
459  default:
461  break;
462  }
463 }
464 
466 {
467  const std::string nick = msg.readString(24, "nick");
468  msg.readString(40, "message");
469 
470  if (taGuild != nullptr)
471  taGuild->removeMember(nick);
472 
473  if (localPlayer == nullptr)
474  return;
475 
476  if (nick == localPlayer->getName())
477  {
478  if (taGuild != nullptr)
479  {
480  taGuild->removeFromMembers();
481  taGuild->clearMembers();
482  localPlayer->removeGuild(taGuild->getId());
483  }
486 
487  if ((socialWindow != nullptr) && (taGuild != nullptr))
488  socialWindow->removeTab(taGuild);
489  if (actorManager != nullptr)
491  }
492  else
493  {
495  if (actorManager != nullptr)
496  {
497  Being *const b = actorManager->findBeingByName(
498  nick, ActorType::Player);
499 
500  if (b != nullptr)
501  b->clearGuilds();
502  if (taGuild != nullptr)
503  taGuild->removeMember(nick);
504  }
505  }
506 }
507 
509 {
510  const int charId = msg.readInt32("char id");
511  msg.readString(40, "message");
512  std::string nick;
513 
514  if (taGuild != nullptr)
515  {
516  const GuildMember *const member = taGuild->getMemberByCharId(charId);
517  if (member != nullptr)
518  {
519  nick = member->getName();
520  taGuild->removeMember(member);
521  }
522  }
523 
524  if (localPlayer == nullptr)
525  return;
526 
527  if (charId == PlayerInfo::getCharId())
528  {
529  if (taGuild != nullptr)
530  {
531  taGuild->removeFromMembers();
532  taGuild->clearMembers();
533  localPlayer->removeGuild(taGuild->getId());
534  }
537 
538  if ((socialWindow != nullptr) && (taGuild != nullptr))
539  socialWindow->removeTab(taGuild);
540  if (actorManager != nullptr)
542  }
543  else
544  {
546  if (actorManager != nullptr)
547  {
548  Being *const b = actorManager->findBeingByName(
549  nick, ActorType::Player);
550 
551  if (b != nullptr)
552  b->clearGuilds();
553  if (taGuild != nullptr)
554  taGuild->removeMember(nick);
555  }
556  }
557 }
558 
560 {
561  const int msgLength = msg.readInt16("len") - 4;
562 
563  if (msgLength <= 0)
564  return;
565  if (guildTab != nullptr)
566  {
567  std::string chatMsg = msg.readString(msgLength, "message");
568  const size_t pos = chatMsg.find(" : ", 0);
569  if (pos != std::string::npos)
570  {
571  const std::string sender_name = chatMsg.substr(0, pos);
572  chatMsg.erase(0, pos + 3);
573  trim(chatMsg);
574  guildTab->chatLog(sender_name, chatMsg);
575  }
576  else
577  {
578  guildTab->chatLog(chatMsg,
582  }
583  }
584  else
585  {
586  DEBUGLOGSTR("invisible guild?");
587  msg.readString(msgLength, "message");
588  }
589 }
590 
592 {
594  msg.readInt32("id");
595  msg.readString(24, "name");
596 }
597 
599 {
601  msg.readInt32("flag");
602 }
603 
605 {
607  msg.readInt32("guild id");
608  msg.readInt32("flag");
609 }
610 
612 {
614  msg.readUInt8("flag");
615 }
616 
618 {
620  msg.readInt32("flag");
621 }
622 
623 void GuildRecv::processGuildExpulsionContinue(const std::string &nick)
624 {
625  if (taGuild != nullptr)
626  taGuild->removeMember(nick);
627 
628  if (localPlayer == nullptr)
629  return;
630 
631  if (nick == localPlayer->getName())
632  {
633  if (taGuild != nullptr)
634  {
635  taGuild->removeFromMembers();
636  taGuild->clearMembers();
637  }
640 
641  if ((socialWindow != nullptr) && (taGuild != nullptr))
642  socialWindow->removeTab(taGuild);
643  if (actorManager != nullptr)
645  }
646  else
647  {
649  if (actorManager != nullptr)
650  {
651  Being *const b = actorManager->findBeingByName(
652  nick, ActorType::Player);
653 
654  if (b != nullptr)
655  b->clearGuilds();
656  if (taGuild != nullptr)
657  taGuild->removeMember(nick);
658  }
659  }
660 }
661 
663 {
664  const BeingId id = msg.readBeingId("account id");
665  const int x = msg.readInt16("x");
666  const int y = msg.readInt16("y");
667  if (taGuild != nullptr)
668  {
669  GuildMember *const m = taGuild->getMember(id);
670  if (m != nullptr)
671  {
672  m->setX(x);
673  m->setY(y);
674  }
675  }
676 }
677 
679 {
680  const int guildId = msg.readInt32("guild id");
681  const int emblem = msg.readInt32("elblem id");
683  static_cast<GuildPositionFlags::Type>(msg.readInt32("mode")));
684  msg.readUInt8("guild master");
685  msg.readInt32("unused");
686  std::string guildName = msg.readString(24, "guild name");
687 
688  Guild *const g = Guild::getGuild(CAST_S16(guildId));
689  if (g == nullptr)
690  return;
691 
692  g->setName(guildName);
693  g->setEmblemId(emblem);
694  if (taGuild == nullptr)
695  taGuild = g;
696  if ((guildTab == nullptr) && (chatWindow != nullptr))
697  {
699  if (config.getBoolValue("showChatHistory"))
700  guildTab->loadFromLogFile("#Guild");
701  if (localPlayer != nullptr)
702  localPlayer->addGuild(taGuild);
704  }
705 
706  if (localPlayer != nullptr)
707  {
708  localPlayer->setGuild(g);
710  }
711 }
712 
714 {
715  const BeingId accountId = msg.readBeingId("account id");
716  const int charId = msg.readInt32("char id");
717  const int online = msg.readInt32("flag");
718  const GenderT gender = Being::intToGender(CAST_U8(
719  msg.readInt16("sex")));
720  msg.readInt16("hair");
721  msg.readInt16("hair color");
722  if (taGuild != nullptr)
723  {
724  GuildMember *const m = taGuild->getMember(accountId, charId);
725  if (m != nullptr)
726  {
727  m->setOnline(online != 0);
728  if (online != 0)
729  m->setGender(gender);
730  if (guildTab != nullptr)
731  guildTab->showOnline(m->getName(), fromBool(online, Online));
732  if (socialWindow != nullptr)
734  }
735  }
736 }
737 
739 {
740  const std::string nick = msg.readString(24, "name");
741  msg.readString(40, "message");
742 
744 }
745 
747 {
748  msg.readString(40, "message");
749  const int charId = msg.readInt32("char id");
750 
751  std::string nick;
752 
753  if (taGuild != nullptr)
754  {
755  const GuildMember *const member = taGuild->getMemberByCharId(charId);
756  if (member != nullptr)
757  {
758  nick = member->getName();
760  }
761  }
762 }
763 
765 {
766  const int length = msg.readInt16("len");
767  if (length < 4)
768  return;
769 
770  int count;
771  if (msg.getVersion() < 20100803)
772  {
773  count = (length - 4) / 64;
774  for (int i = 0; i < count; i++)
775  {
776  msg.readString(24, "name");
777  msg.readString(40, "message");
778  }
779  }
780  else
781  {
782  count = (length - 4) / 40;
783  for (int i = 0; i < count; i++)
784  msg.readString(40, "message");
785  }
786 }
787 
789 {
791  msg.readBeingId("being id");
792  msg.readInt32("guild id");
793  msg.readInt16("emblem id");
794 }
795 
797 {
798  // look like unused packet
800  msg.readBeingId("being id");
801  msg.readInt32("char id");
802  msg.readInt32("online");
803 }
804 
806 {
807  const int positionLen = msg.readInt16("len") - 8;
808  const BeingId beingId = msg.readBeingId("being id");
809  std::string position;
810  if (positionLen > 0)
811  {
812  position = msg.readString(positionLen, "position");
813  }
814  Being *const dstBeing = actorManager->findBeing(beingId);
815  if (dstBeing != nullptr)
816  {
817  dstBeing->setGuildPos(position);
818  dstBeing->addToCache();
819  }
820 }
821 
822 } // namespace EAthena
void setGuildPositionFlags(const GuildPositionFlags::Type pos)
Definition: playerinfo.cpp:645
ChatWindow * chatWindow
Definition: chatwindow.cpp:89
std::string getName() const
Definition: avatar.h:52
unsigned char readUInt8(const char *const str)
Definition: messagein.cpp:103
#define _(s)
Definition: gettext.h:34
void log1(const char *const log_text)
Definition: logger.cpp:233
void updateModels()
#define CAST_U8
Definition: cast.h:26
void showGuildInvite(const std::string &guildName, const int guildId, const std::string &inviterName)
int16_t getId() const
Definition: guild.h:134
BeingId readBeingId(const char *const str)
Definition: messagein.cpp:223
void setExp(const int n)
Definition: avatar.h:146
void setPos(const int pos)
Definition: guild.h:49
void processGuildInvite(Net::MessageIn &msg)
Definition: guildrecv.cpp:420
bool removeTab(Guild *const guild)
void setLevel(const int level)
Definition: avatar.h:116
void setGuildName(const std::string &name)
Definition: being.cpp:1195
bool updateSkill(const int id, const int range, const Modifiable modifiable, const SkillType::SkillType type, const int sp)
Guild * taGuild
Definition: guildhandler.h:98
void setGuildPos(const std::string &pos)
Definition: being.cpp:1232
Configuration config
int BeingId
Definition: beingid.h:29
void setOnline(const bool online)
Definition: avatar.h:86
void clearMembers()
Definition: guild.h:154
GuildMember * addMember(const BeingId accountId, const int charId, const std::string &name)
Definition: guild.cpp:111
void processGuildMasterOrMember(Net::MessageIn &msg)
Definition: guildrecv.cpp:92
void addPos(const int id, const std::string &name)
Definition: guild.cpp:368
const bool TryRemoveColors_true
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
Definition: chattab.cpp:110
bool msg(InputEvent &event)
Definition: chat.cpp:38
void removeMember(const GuildMember *const member)
Definition: guild.cpp:203
void notify(const unsigned int message)
#define delete2(var)
Definition: delete2.h:24
Net::GuildHandler * guildHandler
Definition: net.cpp:89
virtual void memberList() const =0
void setY(const int y)
Definition: avatar.h:134
static GenderT intToGender(const uint8_t sex) A_CONST
Definition: being.h:942
void processGuildInviteAck(Net::MessageIn &msg)
Definition: guildrecv.cpp:435
void processGuildExpulsionContinue(const std::string &nick)
Definition: guildrecv.cpp:623
GuildMember * getMember(const BeingId id) const
Definition: guild.cpp:139
void hideSkills(const SkillOwner::Type owner)
void setName(const std::string &name)
Definition: guild.h:78
bool Modifiable
Definition: modifiable.h:29
void processGuildReqAlliance(Net::MessageIn &msg)
Definition: guildrecv.cpp:591
Logger * logger
Definition: logger.cpp:88
void loadFromLogFile(const std::string &name)
Definition: chattab.cpp:509
void addToCache() const
Definition: being.cpp:3513
void addGuild(Guild *const guild)
Definition: being.cpp:1236
void updatePlayerColors() const
int16_t readInt16(const char *const str)
Definition: messagein.cpp:130
bool getBoolValue(const std::string &key) const
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
void clearGuilds()
Definition: being.cpp:1288
void processGuildMemberLogin(Net::MessageIn &msg)
Definition: guildrecv.cpp:713
#define fromBool(val, name)
Definition: booldefines.h:48
void processGuildAlianceInfo(Net::MessageIn &msg)
Definition: guildrecv.cpp:187
#define DEBUGLOGSTR(str)
Definition: logger.h:44
int getVersion() const
Definition: messagein.h:133
LocalPlayer * localPlayer
void skip(const unsigned int length, const char *const str)
Definition: messagein.cpp:349
void processGuildLeave(Net::MessageIn &msg)
Definition: guildrecv.cpp:465
std::string trim(std::string const &str)
const bool IgnoreRecord_false
Definition: ignorerecord.h:29
void removeFromMembers()
Definition: guild.cpp:272
Being * findBeing(const BeingId id) const
void processGuildPositionInfo(Net::MessageIn &msg)
Definition: guildrecv.cpp:678
void processGuildPosNameList(Net::MessageIn &msg)
Definition: guildrecv.cpp:293
void processGuildMemberList(Net::MessageIn &msg)
Definition: guildrecv.cpp:202
SocialWindow * socialWindow
void setSkillLevel(const int id, const int value)
Definition: playerinfo.cpp:126
const std::string & getName() const
Definition: being.h:231
void processGuildLeave2(Net::MessageIn &msg)
Definition: guildrecv.cpp:508
int getCharId()
Definition: playerinfo.cpp:384
void processGuildNotice(Net::MessageIn &msg)
Definition: guildrecv.cpp:398
void processGuildDelAlliance(Net::MessageIn &msg)
Definition: guildrecv.cpp:604
void processGuildUpdateCoords(Net::MessageIn &msg)
Definition: guildrecv.cpp:662
Gender ::T GenderT
Definition: gender.h:35
void setCharId(const int id)
Definition: avatar.h:158
void processGuildSkillInfo(Net::MessageIn &msg)
Definition: guildrecv.cpp:367
void updateName()
Definition: being.cpp:3425
void setEmblemId(const int id)
Definition: guild.h:194
void processGuildMemberPosChange(Net::MessageIn &msg)
Definition: guildrecv.cpp:341
SkillDialog * skillDialog
Definition: skilldialog.cpp:65
void processGuildBasicInfo(Net::MessageIn &msg)
Definition: guildrecv.cpp:97
void setRace(const int r)
Definition: avatar.h:170
void updateGuildCounter(const int online, const int total)
void processGuildExpulsion2(Net::MessageIn &msg)
Definition: guildrecv.cpp:746
void showOnline(const std::string &nick, const Online online)
Definition: chattab.cpp:546
void processGuildPosInfoList(Net::MessageIn &msg)
Definition: guildrecv.cpp:314
GuildTab * guildTab
void sort()
Definition: guild.cpp:392
void processGuildCreateResponse(Net::MessageIn &msg)
Definition: guildrecv.cpp:59
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 removeGuild(const int id)
Definition: being.cpp:1247
void setGender(const GenderT g)
Definition: avatar.h:164
std::string readString(int length, const char *const dstr)
Definition: messagein.cpp:367
void processGuildReqAllianceAck(Net::MessageIn &msg)
Definition: guildrecv.cpp:598
Being * findBeingByName(const std::string &name, const ActorTypeT type) const
#define UNIMPLEMENTEDPACKET
Definition: logger.h:55
#define CAST_S16
Definition: cast.h:27
void processGuildPositionChanged(Net::MessageIn &msg)
Definition: guildrecv.cpp:330
virtual int getLevel() const
Definition: being.h:603
static Guild * getGuild(const int16_t id)
Definition: guild.cpp:373
GuildMember * getMemberByCharId(const int charId) const
Definition: guild.cpp:172
int32_t readInt32(const char *const str)
Definition: messagein.cpp:174
void processGuildOppositionAck(Net::MessageIn &msg)
Definition: guildrecv.cpp:611
void processGuildSetPosition(Net::MessageIn &msg)
Definition: guildrecv.cpp:805
Definition: being.h:93
void processOnlineInfo(Net::MessageIn &msg)
Definition: guildrecv.cpp:796
Definition: guild.h:68
#define reportAlways(...)
Definition: checkutils.h:252
void processGuildEmblem(Net::MessageIn &msg)
Definition: guildrecv.cpp:788
void processGuildBroken(Net::MessageIn &msg)
Definition: guildrecv.cpp:617
void processGuildEmblemData(Net::MessageIn &msg)
Definition: guildrecv.cpp:355
void setX(const int x)
Definition: avatar.h:128
void setGuild(Guild *const guild)
Definition: being.cpp:1353
void processGuildMessage(Net::MessageIn &msg)
Definition: guildrecv.cpp:559
ActorManager * actorManager
void updatePlayerGuild() const
void processGuildExpulsion(Net::MessageIn &msg)
Definition: guildrecv.cpp:738
const std::string & getName() const
Definition: guild.h:127
void setLevel(const int n)
Definition: being.h:600
void processGuildExpulsionList(Net::MessageIn &msg)
Definition: guildrecv.cpp:764
void setID(const BeingId id)
Definition: avatar.h:152
bool msg2(InputEvent &event)
Definition: chat.cpp:40