Planeshift
messages.h
Go to the documentation of this file.
1 /*
2  * messages.h
3  *
4  * Copyright (C) 2001-2002 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 #ifndef __MESSAGES_H__
20 #define __MESSAGES_H__
21 
22 #include "net/netbase.h"
23 #include "net/message.h"
24 #include <csutil/csstring.h>
25 #include <csutil/array.h>
26 #include <csutil/stringarray.h>
27 #include <csutil/strset.h>
28 #include <csutil/databuf.h>
29 #include <csutil/md5.h>
30 #include "util/psscf.h"
31 #include <csgeom/vector3.h>
32 #include "rpgrules/psmoney.h"
33 #include "util/psconst.h"
34 #include "util/skillcache.h"
35 #include <ivideo/graph3d.h>
36 
38 
43 struct iSpriteCal3DState;
44 struct iEngine;
45 
46 
47 class psLinearMovement;
48 class csStringHashReversible;
49 
50 // This holds the version number of the network code, remember to increase
51 // this each time you do an update which breaks compatibility
52 #define PS_NETVERSION 0x00B9
53 // Remember to bump the version in pscssetup.h, as well.
54 
55 
56 // NPC Networking version is separate so we don't have to break compatibility
57 // with clients to enhance the superclients. Made it a large number to ensure
58 // no inadvertent overlaps.
59 #define PS_NPCNETVERSION 0x1035
60 
62 {
67 
71 
75 };
76 
77 struct iSector;
78 
80 {
192 
193  // Movement
198 
199  // Char creation messages under this
216 
217  // Internal Server Events here
229  MSGTYPE_GENERIC_EVENT, // catchall for many Tutorial Events
230 
231  // Sound Events here
233 
234  // Char creation message
237 
238  // Pet Related Messages
241 
243 
247 
248  // Minigame messages
252 
253  // Entance message type
255 
256  // GM Event message
259 
262 
264 
270 
271  //Extra value made to new clients
273 
274  //music playing messages
278 
283 
284  // mechanisms
286 
289 
292 
296 };
297 
298 class psMessageCracker;
299 
300 
301 // Types of system messages
302 #define MSG_ERROR 0x00000000 // Used for stuff that failed (By default, OnScreen Red)
303 #define MSG_INFO 0x00010000
304 #define MSG_INFO_SERVER 0x00010001
305 #define MSG_RESULT 0x00010002 // Used for things that the user might be interested in (By default, OnScreen Yellow)
306 #define MSG_OK 0x00010003 // Used for confimation that the action was accepted (By default, OnScreen Green)
307 #define MSG_WHO 0x00010004 // Used for the message with /who content
308 #define MSG_ACK 0x00010005 // Used for feedback localy (By default, OnScreen Blue)
309 #define MSG_INFO_BASE 0x00010006 // System messages that are shown on the "Main" tab
310 #define MSG_COMBAT 0x00020000
311 #define MSG_COMBAT_DODGE 0x00020001
312 #define MSG_COMBAT_BLOCK 0x00020002
313 #define MSG_COMBAT_HITYOU 0x00020003
314 #define MSG_COMBAT_HITOTHER 0x00020004
315 #define MSG_COMBAT_YOURHIT 0x00020005
316 #define MSG_COMBAT_OTHERHIT 0x00020006
317 #define MSG_COMBAT_MISS 0x00020007
318 #define MSG_COMBAT_OWN_DEATH 0x00020008
319 #define MSG_COMBAT_DEATH 0x00020009
320 #define MSG_COMBAT_VICTORY 0x0002000a
321 #define MSG_COMBAT_STANCE 0x0002000b
322 #define MSG_COMBAT_NEARLY_DEAD 0x0002000c
323 #define MSG_LOOT 0x00030000
324 #define MSG_SEC 0x00300000
325 #define SEC_LEVEL0 0x00300000
326 #define SEC_LEVEL1 0x00300001
327 #define SEC_LEVEL2 0x00300002
328 #define SEC_LEVEL3 0x00300003
329 #define SEC_LEVEL4 0x00300004
330 #define MSG_PURCHASE 0x00400000
331 
332 #define TOP_SHORT_INT_VAL 65535
333 
334 class PublishVector;
335 class MsgHandler;
336 
337 
344 {
345 public:
347 
348  csRef<MsgEntry> msg;
349  bool valid;
351 
353  : msg(NULL),valid(true)
354  {}
355 
356  virtual ~psMessageCracker() {}
357 
361  void SendMessage();
362 
366  void Multicast(csArray<PublishDestination> &multi, uint32_t except, float range);
367 
371  void FireEvent();
372 
381  virtual csString GetMessageTypeName() const = 0;
382 
394  virtual csString ToString(NetBase::AccessPointers* accessPointers) = 0;
395  //{ return "Not implemented"; }
396 };
397 
398 //-----------------------------------------------------------------------------
399 //-----------------------------------------------------------------------------
400 
401 // PSF MESSAGE FACTORY stuff
402 
403 typedef psMessageCracker* (*psfMsgFactoryFunc)(MsgEntry* me, NetBase::AccessPointers* accessPointers);
404 
405 csString GetMsgTypeName(int msgType);
406 void DecodeMessage(MsgEntry* me, NetBase::AccessPointers* accessPointers, bool filterhex, csString &msgText, int &filterNumber);
407 
408 void psfRegisterMsgFactoryFunction(psfMsgFactoryFunc factoryfunc, int msgtype, const char* msgtypename);
409 void psfUnRegisterMsgFactories(void);
411  MsgEntry* me,
412  NetBase::AccessPointers* accessPointers);
413 csString psfMsgTypeName(int msgType);
414 int psfMsgType(const char* msgTypeName);
415 
416 #define PSF_DECLARE_MSG_FACTORY() \
417  virtual csString GetMessageTypeName() const; \
418  static psMessageCracker* CreateMessage(MsgEntry* me, \
419  NetBase::AccessPointers* accessPointers)
420 
421 #define PSF_IMPLEMENT_MSG_FACTORY_REGISTER(Class,MsgType) \
422  class Class##_StaticInit \
423  { \
424  public: \
425  Class##_StaticInit() \
426  { \
427  psfRegisterMsgFactoryFunction (Class::CreateMessage, \
428  MsgType,#MsgType); \
429  } \
430  } Class##_static_init__
431 
432 
433 #define PSF_IMPLEMENT_MSG_FACTORY_CREATE1(Class) \
434  psMessageCracker* Class::CreateMessage(MsgEntry* me, \
435  NetBase::AccessPointers* /*accessPointers*/) \
436  { \
437  return (psMessageCracker*)new Class(me); \
438  }
439 
440 #define PSF_IMPLEMENT_MSG_FACTORY_TYPENAME(Class,MsgType) \
441  csString Class::GetMessageTypeName() const \
442  { \
443  return #MsgType; \
444  }
445 
446 #define PSF_IMPLEMENT_MSG_FACTORY(Class,MsgType) \
447  PSF_IMPLEMENT_MSG_FACTORY_TYPENAME(Class,MsgType) \
448  PSF_IMPLEMENT_MSG_FACTORY_CREATE1(Class) \
449  PSF_IMPLEMENT_MSG_FACTORY_REGISTER(Class,MsgType)
450 
451 #define PSF_IMPLEMENT_MSG_FACTORY_CREATE2(Class) \
452  psMessageCracker* Class::CreateMessage(MsgEntry* me, \
453  NetBase::AccessPointers* a_p) \
454  { \
455  return (psMessageCracker*)new Class(me, a_p); \
456  }
457 
458 #define PSF_IMPLEMENT_MSG_FACTORY_ACCESS_POINTER(Class,MsgType) \
459  PSF_IMPLEMENT_MSG_FACTORY_TYPENAME(Class,MsgType) \
460  PSF_IMPLEMENT_MSG_FACTORY_CREATE2(Class) \
461  PSF_IMPLEMENT_MSG_FACTORY_REGISTER(Class,MsgType)
462 
463 //-----------------------------------------------------------------------------
464 //-----------------------------------------------------------------------------
465 
468 {
469 public:
470  psMarriageMsgPropose(const char* charName, const char* proposeMessage,
471  uint32_t clientNum = 0);
472  psMarriageMsgPropose(MsgEntry* message);
473 
475 
482  virtual csString ToString(NetBase::AccessPointers* accessPointers);
483 
484  csString charName;
485  csString proposeMsg;
486 };
487 
490 {
491 public:
492  psMarriageMsgDivorce(const char* divorceMessage, uint32_t clientNum = 0);
493  psMarriageMsgDivorce(MsgEntry* message);
494 
496 
503  virtual csString ToString(NetBase::AccessPointers* accessPointers);
504 
505  csString divorceMsg;
506 };
507 
510 {
511 public:
512  psMarriageMsgDivorceConfirm(uint32_t clientNum = 0);
514 
516 
523  virtual csString ToString(NetBase::AccessPointers* accessPointers);
524 };
525 
526 
532 {
533 public:
534  psCharDeleteMessage(const char* charNameToDel, uint32_t clientNum);
535  psCharDeleteMessage(MsgEntry* message);
536 
538 
545  virtual csString ToString(NetBase::AccessPointers* accessPointers);
546 
547  csString charName;
548 };
549 
556 {
557 public:
558  uint32_t netversion;
562  psPreAuthenticationMessage(uint32_t clientnum,uint32_t version=PS_NETVERSION);
569 
570 
572 
579  virtual csString ToString(NetBase::AccessPointers* accessPointers);
580 
581  bool NetVersionOk();
582 };
583 
588 {
589 public:
590  uint32_t netversion;
591  csString sAddr,
592  sUser,
593  sPassword,
594  sPassword256,
595  os_,
596  os_platform,
597  machine_type,
598  gfxcard_, gfxversion_;
599  uint16 os_ver_major,
600  os_ver_minor;
601 
607  psAuthenticationMessage(uint32_t clientnum,const char* userid,
608  const char* password, const char* os, uint16 os_ver_major, uint16 os_ver_minor, const char *os_platform, const char *machine_type, const char* gfxcard, const char* gfxversion, const char* sPassword256 = "", uint32_t version=PS_NETVERSION);
609 
616 
617 
619 
626  virtual csString ToString(NetBase::AccessPointers* accessPointers);
627 
628  bool NetVersionOk();
629 };
630 
632 {
633 public:
634  psCharacterPickerMessage(const char* character);
636 
638 
645  virtual csString ToString(NetBase::AccessPointers* accessPointers);
646 
648  csString characterName;
649 };
650 
652 {
653 public:
654  psCharacterApprovedMessage(uint32_t clientnum);
656 
658 
665  virtual csString ToString(NetBase::AccessPointers* accessPointers);
666 };
667 
672 {
673 public:
674 
675  uint32_t ClientNum;
677  psPreAuthApprovedMessage(uint32_t clientnum);
678 
681 
683 
690  virtual csString ToString(NetBase::AccessPointers* accessPointers);
691 
692 };
693 
698 {
699 public:
708 
710  uint8_t msgNumOfChars;
711 
716  psAuthApprovedMessage(uint32_t clientnum, PID playerID, uint8_t numCharacters);
717 
720 
722  void AddCharacter(const char* fullname, const char* race,
723  const char* mesh, const char* traits, const char* equipment);
724 
726  void GetCharacter(MsgEntry* message,csString &fullname, csString &race,
727  csString &mesh, csString &traits,csString &equipment);
728 
730  void ConstructMsg();
731 
733 
740  virtual csString ToString(NetBase::AccessPointers* accessPointers);
741 
742 private:
743  csStringArray contents;
744 };
745 
746 
751 {
752 public:
754  csString msgReason;
755 
757  psAuthRejectedMessage(uint32_t clientToken,const char* reason);
758 
761 
763 
770  virtual csString ToString(NetBase::AccessPointers* accessPointers);
771 
772 };
773 
774 enum
775 {
803 };
804 
809 {
810 public:
812  uint8_t iChatType;
813 
815  csString sPerson;
816 
824  csString sOther;
825 
827  csString sText;
828 
830  bool translate;
831 
833  EID actor;
834 
835  uint16_t channelID;
836 
840  psChatMessage(uint32_t cnum, EID actorid, const char* person, const char* other, const char* chatMessage,
841  uint8_t type, bool translate, uint16_t channelID = 0);
842 
847  psChatMessage(MsgEntry* message);
848 
849 
851 
858  virtual csString ToString(NetBase::AccessPointers* accessPointers);
859 
861  const char* GetTypeText();
862 };
863 
868 {
869 public:
870  csString channel;
871  psChannelJoinMessage(const char* name);
872  psChannelJoinMessage(MsgEntry* message);
873 
875 
882  virtual csString ToString(NetBase::AccessPointers* accessPointers);
883 };
884 
889 {
890 public:
891  uint16_t id;
892  csString channel;
893  psChannelJoinedMessage(uint32_t clientnum, const char* name, uint16_t id);
895 
897 
904  virtual csString ToString(NetBase::AccessPointers* accessPointers);
905 };
906 
911 {
912 public:
913  uint16_t chanID;
914  psChannelLeaveMessage(uint16_t id);
916 
918 
919 
926  virtual csString ToString(NetBase::AccessPointers* accessPointers);
927 };
928 
933 #define MAXSYSTEMMSGSIZE 1024
934 
936 {
937 protected:
939 public:
940  csString msgline;
941  uint32_t type;
942 
943  psSystemMessage(uint32_t clientnum, uint32_t msgtype, const char* fmt, ...);
944  psSystemMessage(uint32_t clientnum, uint32_t msgtype, const char* fmt, va_list args);
945  psSystemMessage(MsgEntry* message);
946 
948 
955  virtual csString ToString(NetBase::AccessPointers* accessPointers);
956 };
957 
963 {
964 public:
965  psSystemMessageSafe(uint32_t clientnum, uint32_t msgtype,
966  const char* text);
967 };
968 
973 {
974  int id;
975  csString petition;
976  csString status;
977  csString assignedgm;
978 
980  csString player;
981  csString created;
982  csString resolution;
983 
984  bool online;
985 };
986 
987 enum
988 {
998 };
999 
1004 {
1005 public:
1006  csArray<psPetitionInfo> petitions;
1007  bool success;
1008  csString error;
1009  int msgType;
1010  bool isGM;
1011 
1013  {
1014  msgType = PETITION_LIST;
1015  }
1016  psPetitionMessage(uint32_t clientnum, csArray<psPetitionInfo>* petitionArray, const char* errMsg,
1017  bool succeed = true, int type = PETITION_LIST, bool gm = false);
1018  psPetitionMessage(MsgEntry* message);
1019 
1021 
1028  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1029 };
1030 
1046 {
1047 public:
1048  bool isGM;
1049  csString request;
1050  csString desc;
1051  int id;
1052 
1053  psPetitionRequestMessage(bool gm, const char* requestCmd, int petitionID = -1, const char* petDesc = "");
1055 
1057 
1064  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1065 };
1066 
1071 {
1072 public:
1073 
1074  struct PlayerInfo
1075  {
1076  csString name;
1077  csString lastName;
1078  int gender;
1079  csString guild;
1080  csString sector;
1081  };
1082 
1084  csArray<PlayerInfo> players;
1085  int type;
1086 
1087  enum
1088  {
1091  TYPE_GETGMSETTINGS
1092  };
1093 
1094  psGMGuiMessage(uint32_t clientnum, int gmSets);
1095  psGMGuiMessage(uint32_t clientnum, csArray<PlayerInfo>* playerArray, int type);
1096  psGMGuiMessage(MsgEntry* message);
1097 
1099 
1106  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1107 };
1108 
1109 //--------------------------------------------------------------------------
1110 
1115 {
1116 public:
1117  csString command, subCmd, permission, guildname, player, levelname, accept, secret, web_page,motd, alliancename;
1118  int level;
1119 
1120 
1121  psGuildCmdMessage(const char* cmd);
1122  psGuildCmdMessage(MsgEntry* message);
1123 
1125 
1132  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1133 };
1134 
1135 //--------------------------------------------------------------------------
1136 
1144 {
1145 public:
1146  enum Command { SUBSCRIBE_GUILD_DATA,
1147  UNSUBSCRIBE_GUILD_DATA,
1149  SET_ONLINE,
1150 
1156 
1158 
1159  NOT_IN_GUILD,
1160 
1163 
1168 
1170  SET_ALLIANCE_NOTIFICATION
1171  };
1172 
1183  psGUIGuildMessage(uint32_t command,
1184  csString commandData);
1185 
1197  psGUIGuildMessage(uint32_t clientNum,
1198  uint32_t command,
1199  csString commandData);
1200 
1202  psGUIGuildMessage(MsgEntry* message);
1203 
1205 
1212  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1213 
1214  uint32_t command;
1215  csString commandData;
1216 };
1217 
1218 //--------------------------------------------------------------------------
1219 
1224 {
1225 public:
1226  csString command,player,accept;
1227 
1228  psGroupCmdMessage(const char* cmd);
1229  psGroupCmdMessage(uint32_t clientnum,const char* cmd);
1230  psGroupCmdMessage(MsgEntry* message);
1231 
1233 
1240  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1241 };
1242 
1243 //--------------------------------------------------------------------------
1244 
1250 {
1251 public:
1252  csString command,player,filter,action,text,target,attack;
1253  int dice,sides,dtarget;
1254  int level;
1255  csString stance;
1256 
1257  psUserCmdMessage(const char* cmd);
1258  psUserCmdMessage(MsgEntry* message);
1259 
1261 
1268  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1269 };
1270 
1271 //--------------------------------------------------------------------------
1272 
1278 {
1279 public:
1280  csString command;
1281  csString player;
1282  csString filter;
1283 
1284  csString repairSlotName;
1285 
1286  psWorkCmdMessage(const char* cmd);
1287  psWorkCmdMessage(MsgEntry* message);
1288 
1290 
1297  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1298 };
1299 
1300 //--------------------------------------------------------------------------
1301 
1307 {
1308 public:
1309  csString cmd;
1310 
1311  psAdminCmdMessage(const char* cmd);
1312  psAdminCmdMessage(const char* cmd, uint32_t client = 0);
1313 
1314  psAdminCmdMessage(MsgEntry* message);
1315 
1317 
1324  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1325 };
1326 
1327 //--------------------------------------------------------------------------
1328 
1334 {
1335 public:
1336  csString cmd;
1337 
1338  psGenericCmdMessage(const char* cmd);
1339  psGenericCmdMessage(const char* cmd, uint32_t client = 0);
1340 
1341  psGenericCmdMessage(MsgEntry* message);
1342 
1344 
1351  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1352 };
1353 
1354 //--------------------------------------------------------------------------
1356 {
1357 public:
1358  EID actor;
1359  csString msgReason;
1360 
1361  psDisconnectMessage(uint32_t clientnum, EID actorid, const char* reason);
1362  psDisconnectMessage(MsgEntry* message);
1363 
1365 
1372  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1373 };
1374 
1375 //--------------------------------------------------------------------------
1376 
1378 {
1379 public:
1380  EID target;
1381  csString action;
1382  csString dfltBehaviors;
1383 
1384  psUserActionMessage(uint32_t clientnum, EID target, const char* action, const char* dfltBehaviors="");
1385  psUserActionMessage(MsgEntry* message);
1386 
1388 
1395  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1396 };
1397 
1398 //---------------------------------------------------------------------------
1399 
1402 {
1403 public:
1404  psGUIInteractMessage(uint32_t clientnum, uint32_t options, csString command = "");
1405  psGUIInteractMessage(MsgEntry* message);
1406 
1408 
1415  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1416 
1418  {
1419  PICKUP = 0x00000001,
1420  EXAMINE = 0x00000002,
1421  UNLOCK = 0x00000004,
1422  LOOT = 0x00000008,
1423  BUYSELL = 0x00000010,
1424  GIVE = 0x00000020,
1425  CLOSE = 0x00000040,
1426  USE = 0x00000080,
1427  PLAYERDESC = 0x00000100,
1428  ATTACK = 0x00000200,
1429  COMBINE = 0x00000400,
1430  EXCHANGE = 0x00000800,
1431  TRAIN = 0x00001000,
1432  NPCTALK = 0x00002000,
1433  // Pet Commands
1434  VIEWSTATS = 0x00004000,
1435  DISMISS = 0x00008000,
1436  // Marriage
1437  MARRIAGE = 0x00010000,
1438  DIVORCE = 0x00020000,
1439  // Stuff
1440  PLAYGAME = 0x00040000,
1441  ENTER = 0x00080000,
1442  LOCK = 0x00100000,
1443  ENTERLOCKED = 0x00200000,
1444  BANK = 0x00400000,
1445  INTRODUCE = 0x00800000,
1446  CONSTRUCT = 0x01000000,
1447  MOUNT = 0x02000000,
1448  UNMOUNT = 0x04000000,
1449  STORAGE = 0x08000000,
1450  GENERIC = 0x10000000
1451  };
1452 
1453 public:
1455  uint32_t options;
1456  csString genericCommand;
1457 };
1458 
1459 //--------------------------------------------------------------------------
1460 
1465 {
1466 public:
1467 
1468  uint32_t command;
1470  {
1477  RELOAD_CACHE
1478  };
1479 
1480  csStringFast<1024> actionXML;
1481 
1482  // ctor
1483  psMapActionMessage(uint32_t clientnum, uint32_t cmd, const char* xml);
1484 
1485  // cracker
1486  psMapActionMessage(MsgEntry* message);
1487 
1489 
1496  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1497 };
1498 
1499 //---------------------------------------------------------------------------
1502 {
1503 public:
1504  struct AAttack
1505  {
1506  csString Name;
1507  csString Image;
1508  };
1510  psAttackQueueMessage(uint32_t clientnum);
1511  psAttackQueueMessage( MsgEntry* me, NetBase::AccessPointers* accessPointers );
1512 
1514 
1515  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1516 
1517  void AddAttack(const csString& name, const csString& image);
1518  void Construct(csStringSet* msgstrings);
1519 
1520  csArray<AAttack> attacks;
1521 private:
1522  uint32_t client;
1523  uint32_t size;
1524 
1525 };
1526 //---------------------------------------------------------------------------
1529 {
1530 public:
1531  psModeMessage(uint32_t clientnum, EID actorID, uint8_t mode, uint32_t value);
1532  psModeMessage(MsgEntry* message);
1533 
1535 
1542  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1543 
1545  {
1546  PEACE = 1,
1558  RUN
1559  };
1560 
1561 public:
1562  EID actorID;
1563  uint8_t mode;
1564  uint32_t value;
1565 };
1566 
1567 //---------------------------------------------------------------------------
1568 
1573 {
1574 public:
1575  psMoveLockMessage(uint32_t clientnum, bool locked);
1576  psMoveLockMessage(MsgEntry* message);
1577 
1579 
1586  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1587 
1588 public:
1589  bool locked;
1590 };
1591 
1592 //---------------------------------------------------------------------------
1593 
1596 {
1597 public:
1599  {
1600  DAYNIGHT = 1,
1601  WEATHER = 2
1602  };
1603 
1604  enum Weather
1605  {
1606  RAIN = 4,
1607  SNOW = 8,
1608  FOG = 16,
1609  LIGHTNING = 32
1610  };
1611 
1613  {
1616  bool has_fog;
1618  csString sector;
1619  int downfall_drops; // 0 = no downfall
1621  int fog_density; // 0 = no fog
1623  int r,g,b; // For fog
1624  };
1625 
1626  psWeatherMessage(uint32_t client, psWeatherMessage::NetWeatherInfo info , uint clientnum = 0);
1627  psWeatherMessage(uint32_t client, int minute, int hour, int day, int month, int year);
1628  psWeatherMessage(MsgEntry* message);
1629 
1631 
1638  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1639 
1640 public:
1642  int type;
1643 
1645  uint minute;
1646  uint hour;
1647  uint day;
1648  uint month;
1649  uint year;
1650 
1652 };
1653 
1654 
1655 //---------------------------------------------------------------------------
1656 
1673 {
1674 public:
1676  {
1680  UPDATE_LIST
1681  };
1682 
1683  // One of the commands as defined above.
1684  uint8_t command;
1685 
1695  psGUIInventoryMessage(uint8_t command = REQUEST, uint32_t size=0);
1696 
1697 
1712  psGUIInventoryMessage(uint32_t clientNum,
1713  uint8_t command,
1714  uint32_t totalItems,
1715  uint32_t totalEmptiedSlots,
1716  float maxWeight,
1717  uint32_t cache_version,
1718  size_t msgsize);
1719 
1720 
1727  psGUIInventoryMessage(MsgEntry* message, NetBase::AccessPointers* accessPointers);
1728 
1730 
1737  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1738 
1739 
1741  void AddItem(const char* name,
1742  const char* meshName,
1743  const char* materialName,
1744  int containerID,
1745  int slot,
1746  int stackcount,
1747  float weight,
1748  float size,
1749  const char* icon,
1750  int purifyStatus,
1751  csStringSet* msgstrings);
1752 
1754  void AddEmptySlot(int containerID, int slotID);
1755 
1757  void AddMoney(const psMoney &money);
1758 
1759  // Used in a move message.
1760 
1763  {
1764  csString name;
1765  csString meshName;
1766  csString materialName;
1767  int slot;
1768  float weight;
1769  float size;
1771  csString iconImage;
1774  };
1775 
1776  // Item list
1777  csArray<ItemDescription> items;
1778  size_t totalItems;
1780  float maxWeight;
1782  uint32 version;
1783 };
1784 
1785 //---------------------------------------------------------------------------
1786 
1789 {
1790 public:
1791  psNewSectorMessage(const csString &oldSector, const csString &newSector, csVector3 pos, bool use_yrot = false, float yrot = 0.0);
1792  psNewSectorMessage(MsgEntry* message);
1793 
1795 
1802  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1803 
1804 public:
1806  csString oldSector, newSector;
1807  csVector3 pos;
1808  float yrot;
1809  bool use_yrot;
1810 };
1811 
1812 //---------------------------------------------------------------------------
1813 
1816 {
1817 public:
1818  enum
1819  {
1821  LOOT_ROLL
1822  };
1823  psLootItemMessage(int client, EID entity, int item, int action);
1824  psLootItemMessage(MsgEntry* message);
1825 
1827 
1834  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1835 
1836  EID entity;
1839 };
1840 
1841 //---------------------------------------------------------------------------
1842 
1845 {
1846 public:
1847  psLootMessage();
1848  psLootMessage(MsgEntry* message);
1849 
1851 
1858  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1859 
1860  void Populate(EID entity, csString &lootstr, int cnum);
1861 
1863  csString lootxml;
1864 };
1865 
1866 //---------------------------------------------------------------------------
1867 
1870 {
1871 public:
1873  psQuestListMessage(MsgEntry* message);
1874 
1876 
1883  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1884 
1885  void Populate(csString &queststr, int cnum);
1886 
1887  csString questxml;
1888 };
1889 
1890 //---------------------------------------------------------------------------
1891 
1894 {
1895 public:
1896  enum
1897  {
1900  CMD_DISCARD
1901  };
1902  psQuestInfoMessage(int cnum, int cmd, int id, const char* name,const char* info);
1903  psQuestInfoMessage(MsgEntry* message);
1904 
1906 
1913  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1914 
1915  int command,id;
1916  csString xml;
1917 };
1918 
1919 //---------------------------------------------------------------------------
1920 
1923 {
1924 public:
1925  psOverrideActionMessage(int client, EID entity, const char* action, int duration = 0);
1927 
1929 
1936  virtual csString ToString(NetBase::AccessPointers* accessPointers);
1937 
1939  csString action;
1941 };
1942 
1943 //---------------------------------------------------------------------------
1944 
1945 
1946 //--------------------------------------------------------------------------
1947 
1956 {
1957 public:
1958  enum Command { EQUIP, DEEQUIP };
1959 
1978  psEquipmentMessage(uint32_t clientNum,
1979  EID actorid,
1980  uint8_t type,
1981  int slot,
1982  csString &mesh,
1983  csString &part,
1984  csString &texture,
1985  csString &partMesh,
1986  csString &removedMesh);
1987 
1988 
1990  psEquipmentMessage(MsgEntry* message);
1991 
1993 
2000  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2001 
2002  uint8_t type;
2003  int player;
2004  csString mesh;
2005  int slot;
2006  csString part;
2007  csString texture;
2008  csString partMesh; /* Set if the body part given by pattern given in part
2009  should be replaced with this */
2010  csString removedMesh;
2011 };
2012 
2013 //--------------------------------------------------------------------------
2014 
2020 //--------------------------------------------------------------------------
2021 
2028 {
2029 public:
2039  CANCEL
2040  };
2041 
2053  psGUIMerchantMessage(uint32_t clientNum,
2054  uint8_t command,
2055  csString commandData);
2056 
2057  psGUIMerchantMessage(uint8_t command,
2058  csString commandData);
2059 
2061  psGUIMerchantMessage(MsgEntry* message);
2062 
2064 
2071  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2072 
2073  uint8_t command;
2074  csString commandData;
2075 };
2076 
2077 //--------------------------------------------------------------------------
2078 
2084 {
2085 public:
2095  CANCEL
2096  };
2097 
2109  psGUIStorageMessage(uint32_t clientNum,
2110  uint8_t command,
2111  csString commandData);
2112 
2113  psGUIStorageMessage(uint8_t command,
2114  csString commandData);
2115 
2117  psGUIStorageMessage(MsgEntry* message);
2118 
2120 
2127  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2128 
2129  uint8_t command;
2130  csString commandData;
2131 };
2132 
2133 //--------------------------------------------------------------------------
2134 
2141 {
2142 public:
2143  enum Command { GROUP,
2145  LEAVE
2146  };
2147 
2159  psGUIGroupMessage(uint32_t clientNum,
2160  uint8_t command,
2161  csString commandData);
2162 
2163  psGUIGroupMessage(uint8_t command,
2164  csString commandData);
2165 
2167  psGUIGroupMessage(MsgEntry* message);
2168 
2170 
2177  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2178 
2179  uint8_t command;
2180  csString commandData;
2181 };
2182 
2184 {
2185 public:
2187  {
2188  msg.AttachNew(new MsgEntry());
2189  msg->SetType(MSGTYPE_SPELL_CANCEL);
2190  msg->clientnum = 0;
2191  }
2192  psSpellCancelMessage(MsgEntry* /*message*/) {};
2193 
2195 
2202  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2203 };
2204 
2205 //--------------------------------------------------------------------------
2211 {
2212 public:
2214  {
2215  msg.AttachNew(new MsgEntry());
2216  msg->SetType(MSGTYPE_CRAFT_CANCEL);
2217  msg->clientnum = 0;
2218  }
2220  {
2221  craftTime = message->GetInt32();
2222  }
2223 
2225 
2229  void SetCraftTime(int craftTime, uint32_t client);
2236  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2237 
2239 };
2240 
2241 //--------------------------------------------------------------------------
2242 
2244 {
2245 public:
2247  {
2248  csString name;
2249  csString description;
2250  csString type;
2251  csString image;
2252  };
2253 
2255  psAttackBookMessage( uint32_t client );
2256  psAttackBookMessage( MsgEntry* me, NetBase::AccessPointers* accessPointers );
2257 
2259 
2260 
2267  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2268 
2269  void AddAttack(const csString& name, const csString& description, const csString& type, const csString& image);
2270  void Construct(csStringSet* msgstrings);
2271 
2272  csArray<NetworkAttack> attacks;
2273 
2274 private:
2275  uint32_t size;
2276  uint32_t client;
2277 };
2278 //--------------------------------------------------------------------------
2280 {
2281 public:
2283  {
2284  csString name;
2285  csString description;
2286  csString way;
2287  int realm;
2288  csString glyphs[4];
2289  csString image;
2290  };
2291 
2293  psSpellBookMessage(uint32_t client);
2294  psSpellBookMessage(MsgEntry* me, NetBase::AccessPointers* accessPointers);
2295 
2297 
2304  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2305 
2306  void AddSpell(const csString &name, const csString &description, const csString &way, int realm, const csString &glyph0, const csString &glyph1, const csString &glyph2, const csString &glyph3, const csString &image);
2307  void Construct(csStringSet* msgstrings);
2308 
2309  csArray<NetworkSpell> spells;
2310 
2311 private:
2312  uint32_t size;
2313  uint32_t client;
2314 };
2315 
2316 //--------------------------------------------------------------------------
2317 
2319 {
2320 public:
2321  psPurifyGlyphMessage(uint32_t glyphID);
2323 
2325 
2332  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2333 
2334  uint32_t glyph;
2335 };
2336 
2337 //--------------------------------------------------------------------------
2338 
2343 {
2344 public:
2345  psSpellCastMessage(csString &spellName, float kFactor);
2347 
2349 
2356  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2357 
2358  csString spell;
2359  float kFactor;
2360 };
2361 
2362 
2363 //--------------------------------------------------------------------------
2365 {
2366 public:
2368 
2369  psGlyphAssembleMessage(int slot0, int slot1, int slot2, int slot3, bool info = false);
2370  psGlyphAssembleMessage(uint32_t clientNum,
2371  csString spellName, csString image, csString description);
2373  void FromClient(MsgEntry* me);
2374  void FromServer(MsgEntry* me);
2375 
2377 
2384  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2385 
2386  int glyphs[4];
2387  bool info;
2388  csString description;
2389  csString name;
2390  csString image;
2391 
2392 private:
2393  bool msgFromServer;
2394 };
2395 
2396 
2397 
2399 {
2400 public:
2402  {
2403  csString name;
2404  csString image;
2405  uint32_t purifiedStatus;
2406  uint32_t way;
2407  uint32_t statID;
2408  };
2409 
2410 
2411  psRequestGlyphsMessage(uint32_t client = 0);
2413  virtual ~psRequestGlyphsMessage();
2414 
2416 
2423  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2424 
2425  void AddGlyph(csString name, csString image, int purifiedStatus,
2426  int way, int statID);
2427 
2428  void Construct();
2429 
2430  csArray<NetworkGlyph> glyphs;
2431 private:
2432  size_t size;
2433  uint32_t client;
2434 
2435 };
2436 
2437 
2438 //--------------------------------------------------------------------------
2440 {
2441 public:
2442  psStopEffectMessage(uint32_t clientNum, uint32_t uid)
2443  {
2444  msg.AttachNew(new MsgEntry(sizeof(uint32_t)));
2445 
2446  msg->SetType(MSGTYPE_EFFECT_STOP);
2447  msg->clientnum = clientNum;
2448  msg->Add(uid);
2449  valid = !(msg->overrun);
2450  }
2451 
2452  psStopEffectMessage(uint32_t uid)
2453  {
2454  msg.AttachNew(new MsgEntry(sizeof(uint32_t)));
2455 
2456  msg->SetType(MSGTYPE_EFFECT_STOP);
2457  msg->clientnum = 0;
2458  msg->Add(uid);
2459  valid = !(msg->overrun);
2460  }
2461 
2463  {
2464  if(!message)
2465  return;
2466 
2467  uid = message->GetUInt32();
2468  }
2469 
2471  csString ToString(NetBase::AccessPointers* /*accessPointers*/)
2472  {
2473  csString msgtext;
2474  msgtext.AppendFmt("Effect ID: %d", uid);
2475  return msgtext;
2476  }
2477 
2478  uint32_t uid;
2479 };
2480 
2481 
2488 {
2489 public:
2490 
2503  psEffectMessage(uint32_t clientNum, const csString &effectName,
2504  const csVector3 &effectOffset, EID anchorID,
2505  EID targetID, uint32_t uid, float scale1 = 0.0, float scale2 = 0.0, float scale3 = 0.0, float scale4 = 0.0);
2506 
2520  psEffectMessage(uint32_t clientNum, const csString &effectName,
2521  const csVector3 &effectOffset, EID anchorID,
2522  EID targetID, uint32_t duration, uint32_t uid, float scale1 = 0.0, float scale2 = 0.0, float scale3 = 0.0, float scale4 = 0.0);
2523 
2527  psEffectMessage(MsgEntry* message);
2528 
2530 
2537  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2538 
2539  csString name;
2540  csVector3 offset;
2543  uint32_t duration;
2544  uint32_t uid;
2545  float scale[4]; // Scales of the effect, not sent on network if 0.
2546 };
2547 
2548 //--------------------------------------------------------------------------
2549 
2555 {
2556 public:
2564  psGUITargetUpdateMessage(uint32_t clientNum, EID targetID);
2565 
2567 
2569 
2576  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2577 
2578  uint32_t clientNum;
2580 };
2581 
2582 
2587 {
2588 public:
2593  csStringHashReversible* msgstrings;
2594 
2597 
2599  psMsgStringsMessage(uint32_t clientnum, csMD5::Digest &digest);
2600 
2602  psMsgStringsMessage(uint32_t clientnum, csMD5::Digest &digest, char* stringsdata,
2603  unsigned long size, uint32_t num_strings);
2604 
2606  psMsgStringsMessage(MsgEntry* message);
2607 
2609 
2616  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2617 
2618  csMD5::Digest* digest;
2620 
2621 private:
2622  uint32_t nstrings;
2623 };
2624 
2625 #if 0
2626 
2629 class psCharacterDataMessage : public psMessageCracker
2630 {
2631 public:
2632  csString fullname;
2633  csString race_name;
2634  csString mesh_name;
2635  csString traits;
2636  csString equipment;
2637 
2639  psCharacterDataMessage(uint32_t clientnum,
2640  csString fullname,
2641  csString race_name,
2642  csString mesh_name,
2643  csString traits,
2644  csString equipment);
2645 
2647  psCharacterDataMessage(MsgEntry* message);
2648 
2650 
2657  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2658 };
2659 #endif
2660 
2666 {
2667 public:
2672 
2674  psSpecialCombatEventMessage(uint32_t clientnum,
2675  EID attacker,
2676  EID target,
2677  int attack_anim,
2678  int defense_anim);
2679 
2680  void SetClientNum(int cnum);
2681 
2684 
2686 
2693  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2694 };
2700 {
2701 public:
2705  int target_location; // Where on the target the attack hit/miss
2706  float damage;
2709  enum
2710  {
2717  COMBAT_DAMAGE_NEARLY_DEAD // This is equal to COMBAT_DAMAGE plus the target is nearly dead
2718  };
2719 
2721  psCombatEventMessage(uint32_t clientnum,
2722  int event_type,
2723  EID attacker,
2724  EID target,
2725  int target_location,
2726  float damage,
2727  int attack_anim,
2728  int defense_anim);
2729 
2730  void SetClientNum(int cnum);
2731 
2733  psCombatEventMessage(MsgEntry* message);
2734 
2736 
2743  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2744 };
2745 
2746 //--------------------------------------------------------------------------
2747 
2756 {
2757 public:
2758  uint32_t type;
2760  psSoundEventMessage(uint32_t clientnum, uint32_t type);
2761 
2763  psSoundEventMessage(MsgEntry* message);
2764 
2766 
2773  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2774 };
2775 //--------------------------------------------------------------------------
2776 
2778 {
2779 public:
2780  psStatDRMessage(uint32_t clientnum, EID eid, csArray<float> fVitals, csArray<uint32_t> uiVitals, uint8_t version, int flags);
2781 
2783  psStatDRMessage();
2784 
2787 
2789 
2796  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2797 
2798  bool request; // Set to true if this is a request
2800  uint32_t statsDirty;
2801  uint8_t counter;
2802 
2803  float hp,hp_rate,mana,mana_rate,pstam,pstam_rate;
2804  float mstam,mstam_rate,exp,prog;
2805 };
2806 
2807 //--------------------------------------------------------------------------
2808 
2812 {
2813 public:
2821  psStatsMessage(uint32_t client, float maxHP, float maxMana, float maxWeight, float maxCapacity);
2822 
2824  psStatsMessage(MsgEntry* me);
2825 
2827  psStatsMessage();
2828 
2830 
2837  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2838 
2839  bool request; // True if this is a request for stats
2840  float hp;
2841  float mana;
2842  float weight;
2843  float capacity;
2844 };
2845 
2846 
2847 
2848 
2849 //--------------------------------------------------------------------------
2850 
2858 {
2859 public:
2865  QUIT
2866  };
2867 
2868  static const char* SkillCommandString[];
2869 
2881  psGUISkillMessage(uint8_t command,
2882  csString commandData);
2883 
2884  psGUISkillMessage(uint32_t clientNum,
2885  uint8_t command,
2886  csString commandData,
2887  psSkillCache* skills,
2888  uint32_t str,
2889  uint32_t end,
2890  uint32_t agi,
2891  uint32_t inl,
2892  uint32_t wil,
2893  uint32_t chr,
2894  uint32_t hp,
2895  uint32_t man,
2896  uint32_t physSta,
2897  uint32_t menSta,
2898  uint32_t hpMax,
2899  uint32_t manMax,
2900  uint32_t physStaMax,
2901  uint32_t menStaMax,
2902  bool open,
2903  int32_t focus,
2904  int32_t selSkillCat,
2905  bool isTraining);
2906 
2908  psGUISkillMessage(MsgEntry* message);
2909 
2911 
2918  virtual csString ToString(NetBase::AccessPointers* accessPointers);
2919 
2920  uint8_t command;
2921  csString commandData;
2923 
2924  unsigned int strength;
2925  unsigned int endurance;
2926  unsigned int agility;
2927  unsigned int intelligence;
2928  unsigned int will;
2929  unsigned int charisma;
2930  unsigned int hitpoints;
2931  unsigned int mana;
2932  unsigned int physStamina;
2933  unsigned int menStamina;
2934 
2935  unsigned int hitpointsMax;
2936  unsigned int manaMax;
2937  unsigned int physStaminaMax;
2938  unsigned int menStaminaMax;
2940  int32_t focusSkill;
2941  int32_t skillCat;
2942  bool trainingWindow; //Are we training or not?
2943 
2944 private:
2945  bool includeStats;
2946 };
2947 
2948 
2949 //--------------------------------------------------------------------------
2950 
2958 {
2959 public:
2963  VIEWBANK
2964  };
2965 
2966  // Used to display information in the bankwindow with psGUIBankingMessage::VIEWBANK
2967  psGUIBankingMessage(uint32_t clientNum,
2968  uint8_t command,
2969  bool guild,
2970  int circlesBanked,
2971  int octasBanked,
2972  int hexasBanked,
2973  int triasBanked,
2974  int circles,
2975  int octas,
2976  int hexas,
2977  int trias,
2978  int maxCircles,
2979  int maxOctas,
2980  int maxHexas,
2981  int maxTrias,
2982  float exchangeFee,
2983  bool forceOpen);
2984 
2985  // Used to withdraw or deposit with psGUIBankingMessage::WITHDRAWFUNDS or psGUIBankingMessage::DEPOSITFUNDS
2986  psGUIBankingMessage(uint8_t command,
2987  bool guild,
2988  int circles,
2989  int octas,
2990  int hexas,
2991  int trias);
2992 
2993  // Used to exchange coins with psGUIBankingMessage::EXCHANGECOINS
2994  psGUIBankingMessage(uint8_t command,
2995  bool guild,
2996  int coins,
2997  int coin);
2998 
3000  psGUIBankingMessage(MsgEntry* message);
3001 
3003 
3010  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3011 
3012  uint8_t command;
3013  bool guild;
3018  int circles;
3019  int octas;
3020  int hexas;
3021  int trias;
3026  int coins;
3027  int coin;
3030 
3031 private:
3032  bool sendingFull;
3033  bool sendingExchange;
3034 };
3035 
3036 //--------------------------------------------------------------------------
3037 
3045 {
3046 public:
3052  QUIT
3053  };
3054 
3066  psPetSkillMessage(uint8_t command,
3067  csString commandData);
3068 
3069  psPetSkillMessage(uint32_t clientNum,
3070  uint8_t command,
3071  csString commandData,
3072  uint32_t str,
3073  uint32_t end,
3074  uint32_t agi,
3075  uint32_t inl,
3076  uint32_t wil,
3077  uint32_t chr,
3078  uint32_t hp,
3079  uint32_t man,
3080  uint32_t physSta,
3081  uint32_t menSta,
3082  uint32_t hpMax,
3083  uint32_t manMax,
3084  uint32_t physStaMax,
3085  uint32_t menStaMax,
3086  bool open,
3087  int32_t focus);
3088 
3090  psPetSkillMessage(MsgEntry* message);
3091 
3093 
3100  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3101 
3102  uint8_t command;
3103  csString commandData;
3104 
3105  unsigned int strength;
3106  unsigned int endurance;
3107  unsigned int agility;
3108  unsigned int intelligence;
3109  unsigned int will;
3110  unsigned int charisma;
3111  unsigned int hitpoints;
3112  unsigned int mana;
3113  unsigned int physStamina;
3114  unsigned int menStamina;
3115 
3116  unsigned int hitpointsMax;
3117  unsigned int manaMax;
3118  unsigned int physStaminaMax;
3119  unsigned int menStaminaMax;
3121  int32_t focusSkill;
3122 
3123 private:
3124  bool includeStats;
3125 };
3126 
3127 //-----------------------------------------------------------------------------
3128 
3130 {
3131 protected:
3132  void WriteDRInfo(uint32_t client, EID mappedid,
3133  bool on_ground, uint8_t mode, uint8_t counter,
3134  const csVector3 &pos, float yrot, iSector* sector,
3135  csString sectorName, const csVector3 &vel, csVector3 &worldVel,
3136  float ang_vel, csStringSet* msgstrings, bool donewriting=true);
3137  void ReadDRInfo(MsgEntry* me, NetBase::AccessPointers* accessPointers);
3138  void CreateMsgEntry(uint32_t client, NetBase::AccessPointers* accessPointers, iSector* sector, csString sectorName);
3139 
3142  {
3143  NOT_MOVING = 0,
3144  ACTOR_MODE = 1 << 0,
3145  ANG_VELOCITY = 1 << 1,
3146  X_VELOCITY = 1 << 2,
3147  Y_VELOCITY = 1 << 3,
3148  Z_VELOCITY = 1 << 4,
3149  X_WORLDVELOCITY = 1 << 5,
3150  Y_WORLDVELOCITY = 1 << 6,
3151  Z_WORLDVELOCITY = 1 << 7,
3152  ALL_DATA = ~0
3153  };
3154 
3155  enum { ON_GOUND = 128 };
3156 
3157  static uint8_t GetDataFlags(const csVector3 &v, const csVector3 &wv, float yrv, uint8_t mode);
3158 
3159 public:
3160  uint8_t counter;
3161  bool on_ground;
3162  uint8_t mode;
3163  csVector3 pos,
3164  vel,
3165  worldVel;
3166  float yrot;
3167  iSector* sector;
3168  csString sectorName;
3169  float ang_vel;
3170  EID entityid;
3171 
3173  psDRMessage(uint32_t client, EID mappedid, uint8_t counter,
3174  NetBase::AccessPointers* accessPointers,
3175  psLinearMovement* linmove, uint8_t mode=0);
3176  psDRMessage(uint32_t client, EID mappedid,
3177  bool on_ground, uint8_t mode, uint8_t counter,
3178  const csVector3 &pos, float yrot, iSector* sector, csString sectorName,
3179  const csVector3 &vel, csVector3 &worldVel, float ang_vel,
3180  NetBase::AccessPointers* accessPointers);
3181  psDRMessage(void* data, int size, NetBase::AccessPointers* accessPointers);
3182  psDRMessage(MsgEntry* me, NetBase::AccessPointers* accessPointers);
3183 
3185  bool IsNewerThan(uint8_t oldCounter);
3186 
3188 
3189  void operator=(psDRMessage &other);
3190 
3197  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3198 };
3199 
3200 //-----------------------------------------------------------------------------
3201 
3203 {
3204 public:
3205  csVector3 pos;
3206  float yrot;
3207  iSector* sector;
3208  csString sectorName;
3209  csString backgroundname;
3210  uint32_t loadTime;
3211  csVector2 start;
3212  csVector2 dest;
3213  csString loadWidget;
3214  float vel;
3215 
3217  psForcePositionMessage(uint32_t client, uint8_t sequence,
3218  const csVector3 &pos, float yRot, iSector* sector, float vel,
3219  csStringSet* msgstrings, uint32_t time = 0, csString loadBackground = "", csVector2 start = 0, csVector2 dest = 0, csString loadWidget = "");
3221 
3223 
3224  void operator=(psForcePositionMessage &other);
3225 
3232  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3233 };
3234 
3235 //-----------------------------------------------------------------------------
3236 
3238 {
3239 public:
3241  psPersistWorldRequest(MsgEntry* message);
3242 
3244 
3251  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3252 };
3253 
3255 {
3256 public:
3258  psRequestAllObjects(MsgEntry* message);
3259 
3261 
3268  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3269 };
3270 
3272 {
3273 public:
3274  psPersistWorld(uint32_t clientNum, csVector3 pos, const char* sectorName);
3275  psPersistWorld(MsgEntry* me);
3276 
3278 
3285  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3286 
3287  csString sector;
3288  csVector3 pos;
3289 };
3290 
3292 {
3293 public:
3295  {
3296  msg.AttachNew(new MsgEntry());
3298  msg->clientnum = 0;
3299  }
3300 
3302 
3304 
3311  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3312 
3313 };
3314 
3315 
3317 {
3318 public:
3319  psPersistAllEntities(uint32_t client)
3320  {
3321  msg.AttachNew(new MsgEntry(60000));
3323  msg->clientnum = client;
3324  }
3325 
3327 
3329 
3336  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3337 
3344  bool AddEntityMessage(MsgEntry* newEnt);
3345 
3351  MsgEntry* GetEntityMessage();
3352 };
3353 
3354 
3356 {
3357 public:
3358  enum Flags
3359  {
3360  NONE = 0,
3361  INVISIBLE = 1 << 0,
3362  INVINCIBLE = 1 << 1,
3364  NPC = 1 << 2,
3365  NAMEKNOWN = 1 << 3,
3366  IS_ALIVE = 1 << 4
3367  };
3368 
3369  psPersistActor(uint32_t clientnum,
3370  int type,
3371  int masqueradeType,
3372  bool control,
3373  const char* name,
3374  const char* guild,
3375  const char* factname,
3376  const char* matname,
3377  const char* race,
3378  const char* mountFactname,
3379  const char* MounterAnim,
3380  unsigned short int gender,
3381  float scale,
3382  float mountscale,
3383  const char* helmGroup,
3384  const char* BracerGroup,
3385  const char* BeltGroup,
3386  const char* CloakGroup,
3387  csVector3 collTop, csVector3 collBottom, csVector3 collOffset,
3388  const char* texParts,
3389  const char* equipmentParts,
3390  uint8_t counter,
3391  EID mappedid, csStringSet* msgstrings, psLinearMovement* linmove,
3392  uint8_t movementMode,
3393  uint8_t serverMode,
3394  PID playerID = 0, uint32_t groupID = 0, EID ownerEID = 0,
3395  uint32_t flags = NONE, PID masterID = 0, bool forNPClient = false);
3396 
3397  psPersistActor(MsgEntry* me, NetBase::AccessPointers* accessPointers, bool forNPClient = false);
3398 
3400 
3407  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3408 
3412  void SetInstance(InstanceID instance);
3413 
3417  static uint32_t PeekEID(MsgEntry* me);
3418 
3419  csString name;
3420  csString guild;
3421  csString factname;
3422  csString matname;
3423  csString race;
3424  csString mountFactname;
3425  csString MounterAnim;
3426  unsigned short int gender;
3427  csString helmGroup;
3428  csString bracerGroup;
3429  csString beltGroup;
3430  csString cloakGroup;
3431  csVector3 top, bottom, offset;
3432  csString texParts;
3433  csString equipment;
3434  int type;
3436  uint8_t serverMode;
3438  uint32_t groupID;
3440  bool control;
3442  uint32_t flags;
3444 
3447  float scale;
3448  float mountScale;
3449 };
3450 
3451 
3453 {
3454 public:
3455  enum Flags
3456  {
3457  NONE = 0,
3458  NOPICKUP = 1 << 0,
3459  COLLIDE = 1 << 1,
3460  TRIBEID = 1 << 2,
3461  ITEM_UID = 1 << 3
3462  };
3463 
3464  psPersistItem(uint32_t clientnum,
3465  EID id,
3466  int type,
3467  const char* name,
3468  const char* factname,
3469  const char* matname,
3470  const char* sector,
3471  csVector3 pos,
3472  float xRot,
3473  float yRot,
3474  float zRot,
3475  uint32_t flags,
3476  csStringSet* msgstrings,
3477  uint32_t tribeid = 0,
3478  uint32_t uid = 0
3479  );
3480 
3481  psPersistItem(MsgEntry* me, NetBase::AccessPointers* accessPointers);
3482 
3484 
3491  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3492 
3493  csString name;
3494  csString factname;
3495  csString matname;
3496  csString sector;
3497  csVector3 pos;
3498  float xRot;
3499  float yRot;
3500  float zRot;
3501  uint32_t tribeID;
3502  EID eid;
3503  uint32_t type;
3504  uint32_t flags;
3505  uint32_t uid;
3506 };
3507 
3509 {
3510 public:
3511  psPersistActionLocation(uint32_t clientNum,
3512  EID eid,
3513  int type,
3514  const char* name,
3515  const char* sector,
3516  const char* mesh
3517  );
3518 
3520 
3522 
3529  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3530 
3531  csString name;
3532  csString sector;
3533  csString mesh;
3534  EID eid;
3535  uint32_t type;
3536 };
3537 
3539 {
3540 public:
3541  psRemoveObject(uint32_t clientNum, EID objectEID);
3542  psRemoveObject(MsgEntry* me);
3543 
3545 
3552  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3553 
3555 };
3556 
3557 
3558 
3560 {
3561 public:
3562  struct BuddyData
3563  {
3564  csString name;
3565  bool online;
3566  };
3567 
3568  psBuddyListMsg(uint32_t clientNum, int totalBuddies);
3569  psBuddyListMsg(MsgEntry* me);
3570 
3572 
3579  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3580 
3581  void AddBuddy(int num, const char* name, bool onlineStatus);
3582  void Build();
3583 
3584  csArray<BuddyData> buddies;
3585 };
3586 
3587 
3588 
3590 {
3591 public:
3592  psBuddyStatus(uint32_t clientNum, csString &buddyName, bool online)
3593  {
3594  msg.AttachNew(new MsgEntry(buddyName.Length()+1 + sizeof(bool)));
3595 
3596  msg->SetType(MSGTYPE_BUDDY_STATUS);
3597  msg->clientnum = clientNum;
3598 
3599  msg->Add(buddyName);
3600  msg->Add(online);
3601  }
3602 
3604  {
3605  buddy = me->GetStr();
3606  onlineStatus = me->GetBool();
3607  }
3608 
3610 
3617  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3618 
3619  csString buddy;
3621 };
3622 
3624 {
3625 public:
3626  psMOTDMessage(uint32_t clientNum, const csString &tipMsg, const csString &motdMsg, const csString &guildMsg, const csString &guild)
3627  {
3628  msg.AttachNew(new MsgEntry(tipMsg.Length()+1 + motdMsg.Length()+1 + guildMsg.Length()+1 + guild.Length() +1));
3629 
3630  msg->SetType(MSGTYPE_MOTD);
3631  msg->clientnum = clientNum;
3632 
3633  msg->Add(tipMsg);
3634  msg->Add(motdMsg);
3635  msg->Add(guildMsg);
3636  msg->Add(guild);
3637  }
3638 
3640  {
3641  tip = me->GetStr();
3642  motd = me->GetStr();
3643  guildmotd = me->GetStr();
3644  guild = me->GetStr();
3645  }
3646 
3648 
3655  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3656 
3657  csString tip;
3658  csString motd;
3659  csString guildmotd;
3660  csString guild;
3661 };
3662 
3664 {
3665 public:
3667  {
3668  msg.AttachNew(new MsgEntry());
3669  msg->SetType(MSGTYPE_MOTDREQUEST);
3670  msg->clientnum = 0;
3671  }
3673 
3674 
3676 
3683  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3684 };
3685 
3687 {
3688 public:
3689  uint32_t questionID;
3690  csString answer;
3691 
3692  psQuestionResponseMsg(int clientnum,uint32_t questionID,const csString &answer)
3693  {
3694  msg.AttachNew(new MsgEntry(sizeof(questionID)+answer.Length()+1));
3695  msg->SetType(MSGTYPE_QUESTIONRESPONSE);
3696  msg->clientnum = clientnum;
3697  msg->Add(questionID);
3698  msg->Add(answer);
3699  }
3701  {
3702  questionID = me->GetUInt32();
3703  answer = me->GetStr();
3704  valid = true;
3705  }
3706 
3708 
3715  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3716 };
3717 
3719 {
3720 public:
3727  {
3731  marriageConfirm
3732  };
3733 
3734  uint32_t questionID;
3735  csString question; // some string - its format depends on 'type'
3737 
3738  psQuestionMessage(int clientnum,
3739  uint32_t questionID,
3740  const char* question,
3741  questionType_t type)
3742  {
3743  msg.AttachNew(new MsgEntry(sizeof(questionID) +strlen(question)+1 +2));
3744  msg->SetType(MSGTYPE_QUESTION);
3745  msg->clientnum = clientnum;
3746 
3747  msg->Add(questionID);
3748  msg->Add(question);
3749  msg->Add((uint16_t)type);
3750  valid=!(msg->overrun);
3751  }
3753  {
3754  questionID = me->GetUInt32();
3755  question = me->GetStr();
3756  type = (questionType_t)me->GetInt16();
3757  valid = true;
3758  }
3759 
3761 
3768  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3769 };
3770 
3772 {
3773 public:
3774  csString sCommand;
3775  csString sTarget;
3776  csString sMessage;
3777 
3778  psAdviceMessage(int clientNum, const char* command, const char* target, const char* message)
3779  {
3780  size_t msgSize = 0;
3781 
3782  if(message) msgSize = strlen(message);
3783 
3784  msg.AttachNew(new MsgEntry(strlen(command) + strlen(target) + msgSize + 3));
3785  msg->SetType(MSGTYPE_ADVICE);
3786  msg->clientnum = clientNum;
3787  msg->Add(command);
3788  msg->Add(target);
3789  msg->Add(message?message:"");
3790  valid = !(msg->overrun);
3791  };
3792 
3794  {
3795  sCommand = me->GetStr();
3796  sTarget = me->GetStr();
3797  sMessage = me->GetStr();
3798  valid = true;
3799  };
3800 
3802 
3809  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3810 };
3811 
3813 
3820 {
3821 public:
3822 
3823  enum commandType { Add, Remove, List };
3824 
3825  psGUIActiveMagicMessage(uint32_t clientNum, csArray<ActiveSpell*>& spells, uint32_t index, csTicks serverTime )
3826  {
3827  // MSGTYPE_ACTIVEMAGIC + clientNum + command + valid + index + spellCount;
3828  size_t msgSize = sizeof(uint8_t) + sizeof(uint32_t) + sizeof(uint8_t) + sizeof(bool) + sizeof(uint32_t) + sizeof(uint32_t);
3829 
3830  size_t numSpells = spells.GetSize();
3831 
3832  for( size_t i=0; i<numSpells; i++ )
3833  {
3834  msgSize += sizeof(uint8_t); //SPELL_TYPE
3835  msgSize += sizeof(uint32_t); //duration
3836  msgSize += spells[i]->Name().Length() + 1;
3837  msgSize += spells[i]->Image().Length() + 1;
3838  msgSize += sizeof(uint32_t); //registrationTime
3839  msgSize += sizeof(uint32_t); //serverTime
3840  }
3841 
3842  msg.AttachNew(new MsgEntry(msgSize));
3843  msg->SetType(MSGTYPE_ACTIVEMAGIC);
3844  msg->clientnum = clientNum;
3845  msg->Add((uint8_t)psGUIActiveMagicMessage::List);
3846  msg->Add((uint32_t)index);
3847  msg->Add((uint32_t)numSpells);
3848  for( size_t i=0; i<numSpells; i++ )
3849  {
3850  msg->Add((uint8_t)spells[i]->Type());
3851  msg->Add((uint32_t)spells[i]->Duration());
3852  msg->Add(spells[i]->Name().GetData());
3853  msg->Add(spells[i]->Image().GetData());
3854  msg->Add((uint32_t)spells[i]->RegistrationTime());
3855  msg->Add((uint32_t)serverTime);
3856  }
3857  valid = !(msg->overrun);
3858  }
3859 
3862  {
3863  //what type of message : Add, Remove or List. retained so older style messages won't make the system crash.
3864  command = (commandType)message->GetUInt8();
3865  if( command != List )
3866  {
3867  valid = false;
3868  return;
3869  }
3870 
3871  //what is the index number of this message?
3872  index = message->GetUInt32();
3873 
3874  //how many spells are in the message?
3875  size_t totalSpells = message->GetUInt32();
3876 
3877  //read the spells
3878  for( size_t i=0; i<totalSpells; i++ )
3879  {
3880  type.Push( (SPELL_TYPE) message->GetUInt8() );
3881  duration.Push( message->GetUInt32());
3882  name.Push( message->GetStr()); //if there was no name when the message was sent, this should read a null string
3883  image.Push( message->GetStr()); //if there was no name when the message was sent, this should read a null string
3884  registrationTime.Push( message->GetUInt32());
3885  serverTime=message->GetUInt32();
3886  }
3887  valid = true;
3888  }
3889 
3891 
3898  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3899 
3900  uint32_t index;
3902  csArray<SPELL_TYPE> type;
3903  csArray<uint32> duration;
3904  csArray<uint32> registrationTime;
3905  uint32 serverTime;
3906  csArray<csString> name;
3907  csArray<csString> image;
3908 };
3909 
3910 //-----------------------------------------------------------------------------
3912 {
3913 public:
3914  psSlotMovementMsg(int fromContainerID,
3915  int fromSlotID,
3916  int toContainerID,
3917  int toSlotID,
3918  int stackCount,
3919  csVector3* pt3d=NULL,
3920  csVector3* rot=NULL,
3921  bool guarded=true,
3922  bool inplace=true)
3923  {
3924  msg.AttachNew(new MsgEntry(sizeof(int32_t) * 5 + 3 * sizeof(float) + 3 * sizeof(float) + 2 * sizeof(bool)));
3925 
3926  msg->SetType(MSGTYPE_SLOT_MOVEMENT);
3927  msg->clientnum = 0;
3928 
3929  msg->Add((int32_t) fromContainerID);
3930  msg->Add((int32_t) fromSlotID);
3931  msg->Add((int32_t) toContainerID);
3932  msg->Add((int32_t) toSlotID);
3933  msg->Add((int32_t) stackCount);
3934  if(pt3d != NULL)
3935  msg->Add(*pt3d);
3936  else
3937  {
3938  csVector3 v = 0;
3939  msg->Add(v); // Add dummy zeroes if not specified.
3940  }
3941  if(rot != NULL)
3942  {
3943  msg->Add(rot->y);
3944  }
3945  else
3946  {
3947  msg->Add(0.f); // Add 0 rotation if not specified.
3948  }
3949  msg->Add(guarded);
3950  msg->Add(inplace);
3951  if(rot != NULL)
3952  {
3953  msg->Add(rot->x);
3954  msg->Add(rot->z);
3955  }
3956  else
3957  {
3958  msg->Add(0.f);
3959  msg->Add(0.f);
3960  }
3961  }
3962 
3964  {
3965  fromContainer = me->GetInt32();
3966  fromSlot = me->GetInt32();
3967  toContainer = me->GetInt32();
3968  toSlot = me->GetInt32();
3969  stackCount = me->GetInt32();
3970  posWorld = me->GetVector3();
3971  rot.y = me->GetFloat();
3972  guarded = me->GetBool();
3973  inplace = me->GetBool();
3974  rot.x = me->GetFloat();
3975  rot.z = me->GetFloat();
3976  }
3977 
3979 
3986  virtual csString ToString(NetBase::AccessPointers* accessPointers);
3987 
3991  int toSlot;
3993  csVector3 posWorld;
3994  csVector3 rot;
3995  bool guarded;
3996  bool inplace; // drop at the character's position.
3997 };
3998 
4000 {
4001 public:
4002  psCmdDropMessage(int quantity, csString &itemName, bool container, bool guarded, bool inplace);
4004 
4006 
4013  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4014 
4016  csString itemName;
4017 
4019  bool guarded;
4020  bool inplace;
4021 };
4022 
4024 {
4025 public:
4026  uint32_t questionID;
4027 
4028  psQuestionCancelMessage(int clientnum, uint32_t id)
4029  {
4030  msg.AttachNew(new MsgEntry(sizeof(id)));
4031  msg->SetType(MSGTYPE_QUESTIONCANCEL);
4032  msg->clientnum = clientnum;
4033 
4034  msg->Add(id);
4035  }
4037  {
4038  questionID = me->GetUInt32();
4039  valid = true;
4040  }
4041 
4043 
4050  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4051 };
4052 
4054 {
4055 public:
4056  psGuildMOTDSetMessage(csString &guildMsg,csString &guild)
4057  {
4058  msg.AttachNew(new MsgEntry(guildMsg.Length()+1 + guild.Length() +1));
4059 
4060  msg->SetType(MSGTYPE_GUILDMOTDSET);
4061  msg->clientnum = 0;
4062  msg->Add(guildMsg);
4063  msg->Add(guild);
4064  }
4065 
4067  {
4068  guildmotd = me->GetStr();
4069  if(!guildmotd.Length())
4070  guildmotd = "(No message of the day.)";
4071  guild = me->GetStr();
4072  if(!guild.Length())
4073  valid = false;
4074  }
4075 
4077 
4084  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4085 
4086  csString guildmotd;
4087  csString guild;
4088 };
4089 
4091 {
4092 public:
4094  {
4096  csString text;
4097  };
4098 
4099  psCharacterDetailsMessage(int clientnum, const csString &name2s,unsigned short int gender2s,const csString &race2s,
4100  const csString &desc2s, const csArray<NetworkDetailSkill> &skills2s, const csString &desc_ooc, const csString &creationinfo, const csString &requestor);
4102 
4104 
4111  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4112 
4113  csString name;
4114  unsigned short int gender;
4115  csString race;
4116  csString desc;
4117  csString desc_ooc;
4118  csString creationinfo;
4119  csArray<NetworkDetailSkill> skills;
4120 
4121  csString requestor; // Identifies which part of system initiated this
4122 };
4123 
4125 {
4126 public:
4127  psCharacterDetailsRequestMessage(bool myself, bool simple, const csString &requestor)
4128  {
4129  //If myself = true, the server sends the information about the player
4130  //If myself = false, the server sends the information about the target
4131 
4132  msg.AttachNew(new MsgEntry(sizeof(myself) + sizeof(simple) + requestor.Length() + 1));
4133  msg->SetType(MSGTYPE_CHARDETAILSREQUEST);
4134  msg->clientnum = 0;
4135  msg->Add(myself);
4136  msg->Add(simple);
4137  msg->Add(requestor.GetData());
4138  }
4139 
4141  {
4142  isMe = me->GetBool();
4143  isSimple = me->GetBool();
4144  requestor = me->GetStr();
4145  }
4146 
4148 
4155  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4156 
4157  bool isMe;
4158  bool isSimple;
4159  csString requestor;
4160 };
4161 
4163 {
4164  DESC_IC = 1,
4167 };
4168 
4170 {
4171 public:
4172  psCharacterDescriptionUpdateMessage(csString &newValue, DESCTYPE desctype)
4173  {
4174 
4175  msg.AttachNew(new MsgEntry(newValue.Length() +1 + sizeof(uint8_t)));
4176  msg->SetType(MSGTYPE_CHARDESCUPDATE);
4177 
4178  msg->clientnum = 0;
4179  msg->Add(newValue);
4180  msg->Add((uint8_t)desctype);
4181  }
4182 
4184  {
4185  newValue = me->GetStr();
4186  desctype = (DESCTYPE) me->GetUInt8();
4187  }
4188 
4190 
4197  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4198 
4199  csString newValue;
4201 };
4202 
4203 //------------------------------------------------------------------------------
4204 
4206 {
4207 public:
4208  psViewActionLocationMessage(uint32_t clientnum, const char* actname, const char* desc);
4210 
4212 
4219  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4220 
4221  const char* name;
4222  const char* description;
4223 };
4224 
4225 //------------------------------------------------------------------------------
4226 
4241 {
4242 public:
4250  psViewItemDescription(int containerID, int slotID);
4251 
4265  psViewItemDescription(uint32_t to, const char* itemName, const char* description, const char* icon,
4266  uint32_t stackCount);
4267 
4273 
4275 
4282  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4283 
4285  const char* itemName;
4286 
4288  const char* itemDescription;
4289 
4291  const char* itemIcon;
4292 
4294  uint32_t stackCount;
4295 
4298 
4301 
4303  int slotID;
4304 
4306  int msgSize;
4307 
4310 
4312  int to;
4313 
4314 private:
4315  enum
4316  {
4317  REQUEST,
4318  DESCR
4319  };
4320  int format;
4321 };
4322 
4323 
4324 //------------------------------------------------------------------------------
4325 
4340 {
4341 public:
4349  psViewContainerDescription(int containerID, int slotID);
4350 
4364  psViewContainerDescription(uint32_t to, const char* itemName, const char* description, const char* icon,
4365  uint32_t stackCount);
4366 
4372 
4374 
4381  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4382 
4384  const char* itemName;
4385 
4387  const char* itemDescription;
4388 
4390  const char* itemIcon;
4391 
4393  uint32_t stackCount;
4394 
4397 
4400 
4402  int slotID;
4403 
4405  int msgSize;
4406 
4409 
4412 
4415 
4417  int to;
4418 
4420  void AddContents(const char* name, const char* meshName, const char* materialName, const char* icon, int purifyStatus, int slot, int stack);
4421 
4423  void ConstructMsg(csStringSet* msgstrings);
4424 
4426  {
4427  csString name;
4428  csString icon;
4429  csString meshName;
4430  csString materialName;
4431  int slotID;
4434  };
4435 
4436  csArray<ContainerContents> contents;
4437 
4438 private:
4439  enum
4440  {
4441  REQUEST,
4442  DESCR
4443  };
4444  int format;
4445 };
4446 
4447 
4448 
4450 {
4451 public:
4467  psViewItemUpdate(uint32_t to, EID containerID, uint32_t slotID, bool clearSlot, const char* itemName, const char* icon, const char* meshName, const char* materialName, uint32_t stackCount, EID ownerID, csStringSet* msgstrings);
4468 
4470  psViewItemUpdate(MsgEntry* me, NetBase::AccessPointers* accessPointers);
4471 
4473 
4480  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4481 
4482 // /// Running count of message size. Used for constructing the outgoing message.
4483 // int msgSize;
4484 
4487 
4490 
4492  csString name;
4493  csString icon;
4494  csString meshName;
4495  csString materialName;
4496  int slotID;
4498  EID ownerID;
4499 };
4500 
4501 
4503 {
4504 public:
4509  psWriteBookMessage(int slotID, int containerID);
4513  psWriteBookMessage(int slotID, int containerID, csString &title, csString &content);
4517  psWriteBookMessage(uint32_t clientNum, csString &title, csString &content, bool success, int slotID, int containerID);
4521  psWriteBookMessage(uint32_t clientNum, csString &title, bool success);
4522 
4524 
4526 
4527  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4528 
4529  uint8_t messagetype;
4530  csString title, content;
4531  int slotID;
4533  bool success;
4534 
4535  enum
4536  {
4540  SAVERESPONSE
4541  };
4542 };
4543 
4545 {
4546 public:
4547  psReadBookTextMessage(uint32_t clientNum, csString &itemName, csString &bookText, bool canWrite, int slotID, int containerID, csString backgroundImg);
4548 
4554 
4556 
4563  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4564 
4565  csString name;
4566  csString text;
4568  bool canWrite;
4570  int slotID;
4573  csString backgroundImg;
4574 };
4575 
4576 //--------------------------------------------------------------------------
4577 
4579 {
4580 public:
4581  enum
4582  {
4584  selectReward
4585  };
4586 
4587  psQuestRewardMessage(uint32_t clientnum, csString &newValue, uint8_t type)
4588  {
4589  msg.AttachNew(new MsgEntry(newValue.Length() + 1 + sizeof(uint8_t)));
4590  msg->SetType(MSGTYPE_QUESTREWARD);
4591  msg->clientnum = clientnum;
4592  msg->Add(newValue);
4593  msg->Add(type);
4594  }
4595 
4597  {
4598  newValue = me->GetStr();
4599  msgType = me->GetUInt8();
4600  }
4601 
4603 
4610  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4611 
4612  int msgType;
4613  csString newValue;
4614 };
4615 
4616 //--------------------------------------------------------------------------
4617 
4619 {
4620 public:
4621  psExchangeMoneyMsg(uint32_t client, int container,
4622  int trias, int hexas, int circles,int octas);
4623 
4625 
4627 
4634  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4635 
4637 
4638  int trias;
4639  int octas;
4640  int hexas;
4641  int circles;
4642 };
4643 
4647 {
4648 public:
4652  psExchangeRequestMsg(bool withPlayer);
4653 
4655  psExchangeRequestMsg(uint32_t client, csString &name, bool withPlayer);
4656 
4658 
4665  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4666 
4667 
4669 
4670  csString player;
4672 };
4673 
4674 
4679 {
4680 public:
4681  psExchangeAddItemMsg(uint32_t clientNum,
4682  const csString &name,
4683  const csString &meshFactName,
4684  const csString &materialName,
4685  int containerID,
4686  int slot,
4687  int stackcount,
4688  const csString &icon,
4689  csStringSet* msgstrings);
4690 
4692 
4694 
4701  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4702 
4703  csString name;
4704  csString meshFactName;
4705  csString materialName;
4707  int slot;
4709  csString icon;
4710 };
4711 
4712 //------------------------------------------------------------------------------
4713 
4718 {
4719 public:
4720  psExchangeRemoveItemMsg(uint32_t client, int container, int slot, int newStack);
4722 
4724 
4731  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4732 
4733  int container; // CONTAINER_EXCHANGE_*
4734  int slot;
4736 };
4737 
4738 //------------------------------------------------------------------------------
4739 
4741 {
4742 public:
4743  psExchangeAcceptMsg(uint32_t client = 0);
4745 
4747 
4754  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4755 };
4756 
4757 //------------------------------------------------------------------------------
4758 
4760 {
4761 public:
4762  psExchangeStatusMsg(uint32_t client, bool playerAccept, bool otherPlayerAccept);
4764 
4766 
4773  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4774 
4777 };
4778 //------------------------------------------------------------------------------
4779 
4780 
4782 {
4783 public:
4784  psExchangeEndMsg(uint32_t client = 0);
4786 
4788 
4795  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4796 };
4797 
4798 
4799 //------------------------------------------------------------------------------
4800 
4802 {
4803 public:
4804  psUpdateObjectNameMessage(uint32_t client, EID eid, const char* newName);
4806 
4808 
4815  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4816 
4818  csString newObjName;
4819 };
4820 
4821 /*
4822  * Used to send the information to the clients that a player or multiple players have changed their guild
4823  * The client will then update the second line of text (containing the guild's name) above the player's head.
4824  */
4826 {
4827 public:
4828  psUpdatePlayerGuildMessage(uint32_t client, int total, const char* newGuild);
4829  psUpdatePlayerGuildMessage(uint32_t client, EID entity, const char* newGuild); // shortcut for only 1 entity
4831 
4833 
4840  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4841 
4842  void AddPlayer(EID id); // Adds an object
4843 
4844  csArray<uint32_t> objectID; // Array with objects
4845  csString newGuildName;
4846 };
4847 
4848 
4850 {
4851 public:
4852  psUpdatePlayerGroupMessage(int clientnum, EID objectID, uint32_t groupID);
4854 
4856 
4863  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4864 
4866  uint32_t groupID;
4867 };
4868 
4869 //------------------------------------------------------------------------------
4870 
4874 {
4875 public:
4877  psNameCheckMessage(const char* name);
4884  psNameCheckMessage(const char* firstName, const char* lastName);
4885  psNameCheckMessage(uint32_t client, bool accepted, const char* reason);
4887 
4888  void FromClient(MsgEntry* me);
4889  void FromServer(MsgEntry* me);
4890 
4892 
4899  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4900 
4901  csString firstName;
4902  csString lastName;
4903  csString reason;
4904  bool accepted;
4905 
4906 private:
4907  bool msgFromServer;
4908 };
4909 
4910 //-----------------------------------------------------------------------------
4911 
4912 #define PINGFLAG_REQUESTFLAGS 0x0001
4913 #define PINGFLAG_READY 0x0002
4914 #define PINGFLAG_HASBEENREADY 0x0004
4915 #define PINGFLAG_SERVERFULL 0x0008
4916 
4918 {
4919 public:
4920  psPingMsg(uint32_t client, uint32_t id, uint8_t flags);
4921  psPingMsg(MsgEntry* me);
4922 
4924 
4931  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4932 
4933  uint32_t id;
4934  uint8_t flags;
4935 };
4936 
4937 //-----------------------------------------------------------------------------
4938 
4940 {
4941 public:
4942  psHeartBeatMsg(uint32_t client);
4943  psHeartBeatMsg(MsgEntry* me);
4944 
4946 
4953  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4954 };
4955 
4956 //-----------------------------------------------------------------------------
4957 
4959 {
4960 public:
4961  psLockpickMessage(const char* password); // Password is for future use
4963 
4965 
4972  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4973 
4974  csString password;
4975 };
4976 
4977 //-----------------------------------------------------------------------------
4978 
4980 {
4981 public:
4982  psGMSpawnItems(uint32_t client,const char* type,unsigned int size);
4983  psGMSpawnItems(const char* type);
4984  psGMSpawnItems(MsgEntry* me);
4985 
4987 
4994  virtual csString ToString(NetBase::AccessPointers* accessPointers);
4995 
4996  bool request;
4997 
4998  struct Item
4999  {
5000  csString name;
5001  csString mesh;
5002  csString icon;
5003  };
5004 
5005  csArray<Item> items;
5006 
5007  csString type;
5008 };
5009 
5011 {
5012 public:
5013  psGMSpawnTypes(uint32_t client,unsigned int size);
5014  psGMSpawnTypes(MsgEntry* me);
5015 
5017 
5024  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5025 
5026  csArray<csString> types;
5027 };
5028 
5029 /*
5030  * Request item modifiers for a given item.
5031  */
5033 {
5034 public:
5035  psGMSpawnGetMods(const char *itemname);
5037 
5039 
5046  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5047 
5048  csString item;
5049 };
5050 
5051 /*
5052  * Returns the list of item modifiers for the last request.
5053  */
5055 {
5056 public:
5061  ITEM_NUM_TYPES
5062  };
5063 
5065  {
5066  csString name;
5067  uint32_t id;
5068  uint32_t type;
5069  };
5070 
5071  psGMSpawnMods(uint32_t client, csArray<ItemModifier>& imods);
5072  psGMSpawnMods(MsgEntry* me);
5073 
5075 
5082  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5083 
5084  csArray<ItemModifier> mods;
5085 };
5086 
5088 {
5089 public:
5090  psGMSpawnItem(
5091  const char* item,
5092  unsigned int count,
5093  bool lockable,
5094  bool locked,
5095  const char* lskill,
5096  int lstr,
5097  bool pickupable,
5098  bool collidable,
5099  bool Unpickable,
5100  bool Transient,
5101  bool SettingItem,
5102  bool NPCOwned,
5103  bool pickupableWeak,
5104  bool random = false,
5105  float quality = 0.0f,
5106  csArray<uint32_t>* mods = 0
5107  );
5108 
5109  psGMSpawnItem(MsgEntry* me);
5110 
5112 
5119  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5120 
5121  csString item;
5122  unsigned int count;
5123  bool lockable,locked,pickupable,collidable,Unpickable,SettingItem,NPCOwned,Transient, pickupableWeak;
5124 
5125  csString lskill;
5126  int lstr;
5127  bool random;
5128  float quality;
5129  csArray<uint32_t> mods;
5130 };
5131 
5133 {
5134 public:
5135  psLootRemoveMessage(uint32_t client,int item);
5137 
5139 
5146  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5147 
5148  int id;
5149 };
5150 
5152 {
5153 public:
5154  psCharCreateTraitsMessage(uint32_t client, csString &string)
5155  {
5156  msg.AttachNew(new MsgEntry(string.Length()+1));
5157 
5158  msg->SetType(MSGTYPE_CHAR_CREATE_TRAITS);
5159  msg->clientnum = client;
5160  msg->Add(string);
5161  }
5162 
5163  psCharCreateTraitsMessage(csString &string)
5164  {
5165  msg.AttachNew(new MsgEntry(string.Length()+1));
5166 
5167  msg->SetType(MSGTYPE_CHAR_CREATE_TRAITS);
5168  msg->clientnum = 0;
5169  msg->Add(string);
5170  }
5171 
5173  {
5174  string = me->GetStr();
5175  if(!string.Length())
5176  valid = false;
5177  }
5178 
5180 
5187  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5188 
5189  const csString &GetString() const
5190  {
5191  return string;
5192  }
5193 
5194 private:
5195  csString string;
5196 };
5197 
5199 {
5200 public:
5201  psClientStatusMessage(bool ready);
5203 
5205 
5212  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5213 
5214  bool ready;
5215 
5217  {
5218  READY = 0x1
5219  };
5220 };
5221 
5223 {
5224 public:
5225  enum ModType
5226  {
5227  NONE = 0,
5231  PUSH
5232  };
5233 
5234  psMoveModMsg(uint32_t client, ModType type, const csVector3 &move, float Yrot);
5235  psMoveModMsg(MsgEntry* me);
5236 
5238 
5245  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5246 
5248  csVector3 movementMod;
5250 };
5251 
5253 {
5254 public:
5257 
5259 
5266  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5267 };
5268 
5270 {
5271 public:
5272  psMovementInfoMessage(size_t modes, size_t moves);
5274 
5276 
5277  void AddMode(uint32 id, const char* name, csVector3 move_mod, csVector3 rotate_mod, const char* idle_anim);
5278  void AddMove(uint32 id, const char* name, csVector3 base_move, csVector3 base_rotate);
5279 
5280  void GetMode(uint32 &id, const char* &name, csVector3 &move_mod, csVector3 &rotate_mod, const char* &idle_anim);
5281  void GetMove(uint32 &id, const char* &name, csVector3 &base_move, csVector3 &base_rotate);
5282 
5289  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5290 
5291  // Count of each object
5292  size_t modes, moves;
5293 };
5294 
5295 //-----------------------------------------------------------------------------
5296 
5300 //-----------------------------------------------------------------------------
5301 
5303 {
5304 public:
5306  {
5307  msg.AttachNew(new MsgEntry(1));
5308  msg->SetType(MSGTYPE_CRAFT_INFO);
5309  }
5310 
5311  psMsgCraftingInfo(uint32_t client, csString craftinfo)
5312  {
5313  msg.AttachNew(new MsgEntry(craftinfo.Length()+1));
5314 
5315  msg->SetType(MSGTYPE_CRAFT_INFO);
5316  msg->clientnum = client;
5317  msg->Add(craftinfo.GetData());
5318  }
5319 
5321  {
5322  craftInfo = me->GetStr();
5323  if(!craftInfo.Length())
5324  valid = false;
5325  }
5326 
5328 
5335  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5336 
5337  csString craftInfo;
5338 };
5339 
5340 //-----------------------------------------------------------------------------
5341 
5346 {
5347 public:
5348  psTraitChangeMessage(uint32_t client, EID targetID, csString &string)
5349  {
5350  msg.AttachNew(new MsgEntry(string.Length()+1 + sizeof(uint32_t)));
5351 
5352  msg->SetType(MSGTYPE_CHANGE_TRAIT);
5353  msg->clientnum = client;
5354  msg->Add(targetID.Unbox());
5355  msg->Add(string);
5356  }
5357 
5359  {
5360  target = EID(me->GetUInt32());
5361  string = me->GetStr();
5362  if(!string.Length())
5363  valid = false;
5364  }
5365 
5367 
5374  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5375 
5376  EID target;
5377  csString string;
5378 };
5379 
5380 //-----------------------------------------------------------------------------
5381 
5386 {
5387 public:
5388  psTutorialMessage(uint32_t client, uint32_t which, const char* instructions)
5389  {
5390  msg.AttachNew(new MsgEntry(sizeof(uint32_t) + strlen(instructions)+1));
5391 
5392  msg->SetType(MSGTYPE_TUTORIAL);
5393  msg->clientnum = client;
5394  msg->Add(which);
5395  msg->Add(instructions);
5396  }
5397 
5399  {
5400  whichMessage = me->GetUInt32();
5401  instrs = me->GetStr();
5402  }
5403 
5405 
5412  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5413 
5415  csString instrs;
5416 };
5417 
5422 {
5423 public:
5424  psSketchMessage(uint32_t client, uint32_t itemID, uint8_t flags, const char* limitxml,const char* sketch_def, bool rightToEditFlag, const char* sketch_name, const char* backgroundImg)
5425  {
5426  msg.AttachNew(new MsgEntry(sizeof(uint32_t)+1+strlen(limitxml)+1+strlen(sketch_def)+1+sizeof(bool)+strlen(sketch_name)+1+strlen(backgroundImg)+1));
5427 
5428  msg->SetType(MSGTYPE_VIEW_SKETCH);
5429  msg->clientnum = client;
5430  msg->Add(itemID);
5431  msg->Add(flags);
5432  msg->Add(limitxml);
5433  msg->Add(sketch_def);
5434  msg->Add(rightToEditFlag);
5435  msg->Add(sketch_name);
5436  msg->Add(backgroundImg);
5437  }
5438 
5440  {
5441  ItemID = me->GetUInt32();
5442  Flags = me->GetUInt8();
5443  limits = me->GetStr();
5444  Sketch = me->GetStr();
5445  rightToEdit = me->GetBool();
5446  name = me->GetStr();
5447  backgroundImg = me->GetStr();
5448  }
5449 
5451 
5458  virtual csString ToString(NetBase::AccessPointers* accessPointers)
5459  {
5460  (void)accessPointers; // NOT USED
5461  return csString("not implemented");
5462  }
5463 
5464  uint32_t ItemID;
5465  uint8_t Flags;
5466  csString Sketch;
5467  csString limits;
5469  csString name;
5470  csString backgroundImg;
5471 };
5472 
5477 {
5478 public:
5488  psMusicalSheetMessage(uint32_t client, uint32_t itemID, bool readOnly, bool play, const char* songTitle, const char* musicalSheet);
5489 
5495 
5496  // From psMesageCracker
5497  //----------------------
5499 
5500  virtual csString ToString(NetBase::AccessPointers* /*accessPointers*/)
5501  {
5502  return csString("not implemented");
5503  }
5504 
5505  uint32_t itemID;
5506  bool readOnly;
5507  bool play;
5508  csString songTitle;
5509  csString musicalSheet;
5510 };
5511 
5516 {
5517 public:
5527  psPlaySongMessage(uint32_t client, uint32_t songID, bool toPlayer,
5528  const char* instrName, uint32_t scoreSize, const char* musicalScore);
5529 
5535 
5536 
5537  // From psMesageCracker
5538  //----------------------
5540 
5541  virtual csString ToString(NetBase::AccessPointers* /*accessPointers*/)
5542  {
5543  return csString("not implemented");
5544  }
5545 
5546  uint32_t songID;
5547  bool toPlayer;
5548  csString instrName;
5549  csString musicalScore;
5550 };
5551 
5552 
5558 {
5559 public:
5560 
5561  enum
5562  {
5563  NO_SONG_ERROR = 1,
5565  NO_INSTRUMENT
5566  };
5567 
5572 
5580  psStopSongMessage(uint32_t client, uint32_t songID, bool toPlayer, int8_t errorCode);
5581 
5587 
5588 
5589  // From psMesageCracker
5590  //----------------------
5592 
5593  virtual csString ToString(NetBase::AccessPointers* /*accessPointers*/)
5594  {
5595  return csString("not implemented");
5596  }
5597 
5598  uint32_t songID;
5599  bool toPlayer;
5600  int8_t errorCode;
5601 };
5602 
5607 {
5608 
5609 public:
5610  psMGStartStopMessage(uint32_t client, bool start);
5611 
5613 
5615 
5622  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5623 
5625  bool msgStart;
5626 };
5627 
5632 {
5633 
5634 public:
5635  psMGBoardMessage(uint32_t client, uint8_t counter,
5636  uint32_t gameID, uint16_t options, int8_t cols, int8_t rows, uint8_t* layout,
5637  uint8_t numOfPieces, uint8_t piecesSize, uint8_t* pieces);
5638 
5640 
5642 
5649  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5650 
5652  bool IsNewerThan(uint8_t oldCounter);
5653 
5655  uint8_t msgCounter;
5656 
5658  uint32_t msgGameID;
5659 
5661  uint16_t msgOptions;
5662 
5664  int8_t msgCols;
5665 
5667  int8_t msgRows;
5668 
5677  uint8_t* msgLayout;
5678 
5681 
5683  uint8_t* msgPieces;
5684 
5685 };
5686 
5691 {
5692 
5693 public:
5694  psMGUpdateMessage(uint32_t client, uint8_t counter,
5695  uint32_t gameID, uint8_t numUpdates, uint8_t* updates);
5696 
5698 
5700 
5707  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5708 
5710  bool IsNewerThan(uint8_t oldCounter);
5711 
5713  uint8_t msgCounter;
5714 
5716  uint32_t msgGameID;
5717 
5719  uint8_t msgNumUpdates;
5720 
5727  uint8_t* msgUpdates;
5728 };
5729 
5734 {
5735 
5736 public:
5742  psEntranceMessage(EID entranceID);
5743 
5745 
5747 
5754  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5755 
5758 };
5759 
5760 //--------------------------------------------------------------------------
5761 
5770 {
5771 public:
5772 
5775 
5777 
5778  void Populate(csString &gmeventStr, int clientnum);
5779 
5786  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5787 
5788  csString gmEventsXML;
5789 };
5790 
5791 //---------------------------------------------------------------------------
5792 
5795 {
5796 public:
5797  enum
5798  {
5802  CMD_EVAL
5803  };
5804  psGMEventInfoMessage(int cnum, int cmd, int id, const char* name,const char* info, bool Evaluatable = false);
5805  psGMEventInfoMessage(MsgEntry* message);
5806 
5808 
5815  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5816 
5817  int command,id;
5819  csString xml;
5820 };
5821 
5822 
5823 
5828 {
5829 public:
5830  // Structure to hold faction name/faction value pairs.
5832  {
5833  csString faction; // Name of the faction.
5834  int rating; // Rating with that faction.
5835  };
5836 
5838  enum
5839  {
5840  MSG_FULL_LIST, // Data is the full faction list.
5841  MSG_UPDATE // Data is an update faction list.
5842  };
5843 
5848  psFactionMessage(int cnum, int cmd);
5849 
5854  void AddFaction(csString factionName, int rating);
5855 
5857  void BuildMsg();
5858 
5860  psFactionMessage(MsgEntry* message);
5861 
5863  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5864 
5865  int cmd;
5866  int client;
5867  csPDelArray<FactionPair> factionInfo;
5868 };
5869 
5870 //---------------------------------------------------------------------------
5871 
5874 {
5875 public:
5876  enum // Should use same values as in the NPC client SequenceOperation
5877  {
5878  CMD_START = 1,
5879  CMD_STOP = 2,
5880  CMD_LOOP = 3
5881  };
5882  psSequenceMessage(int cnum, const char* name, int cmd, int count);
5883  psSequenceMessage(MsgEntry* message);
5884 
5886 
5893  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5894 
5895  csString name;
5896  int command,count;
5897 };
5898 
5899 
5908 {
5909 public:
5910  csString sound;
5912  psPlaySoundMessage(uint32_t clientnum, csString snd);
5913 
5915  psPlaySoundMessage(MsgEntry* message);
5916 
5924  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5925 };
5926 
5927 //-----------------------------------------------------------------------------
5928 
5933 {
5934 public:
5935  psCharCreateCPMessage(uint32_t client, int32_t rID, int32_t CPVal);
5936  psCharCreateCPMessage(MsgEntry* message);
5937 
5939 
5946  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5947 
5948  int32_t raceID;
5949  int32_t CPValue;
5950 };
5951 
5952 //-----------------------------------------------------------------------------
5953 
5958 {
5959 public:
5961  psCharIntroduction(MsgEntry* message);
5962 
5964 
5971  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5972 };
5973 
5974 
5979 {
5980 
5981 public:
5982  csString hash;
5983  csRef<iDataBuffer> databuf;
5984 
5985  psCachedFileMessage(uint32_t client, uint8_t sequence, const char* pathname, iDataBuffer* contents);
5987 
5989 
5996  virtual csString ToString(NetBase::AccessPointers* accessPointers);
5997 
5998 };
5999 
6000 //-----------------------------------------------------------------------------
6001 
6006 {
6007 public:
6008  csString xml;
6009 
6011  psDialogMenuMessage(MsgEntry* message);
6012 
6014 
6015 
6016  void BuildMsg(int clientnum);
6017 
6024  virtual csString ToString(NetBase::AccessPointers* accessPointers);
6025 
6027  {
6028  uint32_t id;
6029  csString menuText;
6030  csString triggerText;
6031  uint32_t flags;
6032  };
6033 
6034  void AddResponse(uint32_t id, const csString &menuText, const csString &triggerText, uint32_t flags = 0x00);
6035 
6036  csArray<DialogResponse> responses;
6037 };
6038 
6043 {
6044 
6045 public:
6046  csString str;
6047 
6048  psSimpleStringMessage(uint32_t client,MSG_TYPES type, const char* string);
6050 
6052 
6059  virtual csString ToString(NetBase::AccessPointers* accessPointers)
6060  {
6061  (void)accessPointers; // NOT USED
6062  return csString("Str: ") + str;
6063  }
6064 
6065 };
6066 
6071 {
6072 
6073 public:
6074  iSector* sector;
6075  csString name;
6076  uint16_t index;
6077  uint16_t count;
6078  csSimpleRenderMesh simpleRenderMesh;
6079 
6080  psSimpleRenderMeshMessage(uint32_t client, NetBase::AccessPointers* accessPointers, const char* name, uint16_t index, uint16_t count, const iSector* sector, const csSimpleRenderMesh &simpleRenderMesh);
6082 
6084 
6091  virtual csString ToString(NetBase::AccessPointers* accessPointers);
6092 };
6093 
6098 {
6099 public:
6107  psMechanismActivateMessage(uint32_t client, const char* meshName,
6108  const char* move, const char* rot);
6109 
6115 
6116  // From psMessageCracker
6118 
6119  virtual csString ToString(NetBase::AccessPointers* /*accessPointers*/)
6120  {
6121  return csString("not implemented");
6122  }
6123 
6124  csString meshName;
6125  csString move;
6126  csString rot;
6127 };
6128 
6129 
6134 {
6135 
6136 public:
6137  int value;
6138 
6139  psOrderedMessage(uint32_t client, int valueToSend, int sequenceNumber);
6141 
6143 
6150  virtual csString ToString(NetBase::AccessPointers* accessPointers);
6151 
6152 };
6153 
6157 {
6158 
6159 public:
6160  // Hired NPC Script Commands
6161  enum
6162  {
6174  WORK_LOCATION_UPDATE
6175  };
6176 
6177  uint8_t command;
6179  bool choice;
6180  csString workLocation;
6182  csString script;
6183  csString locationType;
6184  csString locationName;
6185  csString errorMessage;
6186 
6190  psHiredNPCScriptMessage(uint32_t client, uint8_t command, EID hiredEID);
6191 
6195  psHiredNPCScriptMessage(uint32_t client, uint8_t command, EID hiredEID,
6196  bool choice, const char* errorMsg);
6197 
6202  psHiredNPCScriptMessage(uint32_t client, uint8_t command, EID hiredEID,
6203  const char* script);
6204 
6208  psHiredNPCScriptMessage(uint32_t client, uint8_t command, EID hiredEID,
6209  const char* locationType, const char* locationName);
6210 
6214  psHiredNPCScriptMessage(uint32_t client, uint8_t command, EID hiredEID,
6215  const char* workLocation, bool workLocationValid,
6216  const char* script);
6217 
6222 
6224 
6231  virtual csString ToString(NetBase::AccessPointers* accessPointers);
6232 
6233 };
6234 
6235 
6238 #endif
csString backgroundImg
Definition: messages.h:5470
unsigned int strength
Definition: messages.h:2924
Character life additional data provided by players.
Definition: messages.h:4166
csArray< Item > items
Definition: messages.h:5005
csString questxml
Definition: messages.h:1887
bool online
is the player online?
Definition: messages.h:984
uint32_t ItemID
Definition: messages.h:5464
unsigned int agility
Definition: messages.h:2926
virtual csString ToString(NetBase::AccessPointers *accessPointers)
Converts the message into human readable string.
Definition: messages.h:5458
csString backgroundname
Name of the background to use instead of the normal one in delay.
Definition: messages.h:3209
uint minute
For Day/Night events.
Definition: messages.h:1645
Sound Message.
Definition: messages.h:5907
uint8_t iChatType
type of message this is
Definition: messages.h:812
psSlotMovementMsg(MsgEntry *me)
Definition: messages.h:3963
csString proposeMsg
Name of the character that we have to Propose.
Definition: messages.h:485
uint32 InstanceID
Definition: psconst.h:64
bool msgStart
Indicates that this is a request to start the game.
Definition: messages.h:5625
csString musicalScore
Definition: messages.h:5549
GUI Merchant Message.
Definition: messages.h:2083
Defines all the info about crafting for an item.
Definition: messages.h:5302
Message from the server to setup/update the minigame board on the client side.
Definition: messages.h:5631
unsigned int agility
Definition: messages.h:3107
unsigned int manaMax
Definition: messages.h:2936
uint32_t statsDirty
Definition: messages.h:2800
csString texture
Definition: messages.h:2007
uint32_t flags
Definition: messages.h:3442
EID entityid
The mapped id of the entity in question.
Definition: messages.h:3170
csString type
Definition: messages.h:5007
csString sText
the text the message contains
Definition: messages.h:827
psGUIActiveMagicMessage(MsgEntry *message)
Crack this message off the network.
Definition: messages.h:3861
uint8_t flags
Definition: messages.h:4934
csString sector
Definition: messages.h:3287
const csString & GetString() const
Definition: messages.h:5189
psCharCreateTraitsMessage(uint32_t client, csString &string)
Definition: messages.h:5154
psMsgCraftingInfo(uint32_t client, csString craftinfo)
Definition: messages.h:5311
Message from a client for a request to leave a chat channel.
Definition: messages.h:910
csString player
Definition: messages.h:1226
csString buddy
Definition: messages.h:3619
Sends messages to the client indicating player combat stance.
Definition: messages.h:1528
Message sent from server to client if login was not valid.
Definition: messages.h:750
uint32_t uid
Definition: messages.h:3505
csString partMesh
Definition: messages.h:2008
DRDataFlags
Flags indicating what components are packed in this message.
Definition: messages.h:3141
csString psfMsgTypeName(int msgType)
csVector3 posWorld
Definition: messages.h:3993
csString meshFactName
Definition: messages.h:4704
uint8_t msgNumOfPieces
Number of available pieces.
Definition: messages.h:5680
psQuestionResponseMsg(int clientnum, uint32_t questionID, const csString &answer)
Definition: messages.h:3692
uint8_t msgNumOfChars
The number of characters for this account.
Definition: messages.h:710
csString Sketch
Definition: messages.h:5466
Message sent from server to client that holds random number (clientnum).
Definition: messages.h:671
psCharCreateTraitsMessage(MsgEntry *me)
Definition: messages.h:5172
uint8_t msgNumUpdates
Number of updates in this message.
Definition: messages.h:5719
csString tip
Definition: messages.h:3657
Used to check to see if a name chosen is a valid name to be picked from.
Definition: messages.h:4873
unsigned int menStaminaMax
Definition: messages.h:2938
int psfMsgType(const char *msgTypeName)
psTraitChangeMessage(MsgEntry *me)
Definition: messages.h:5358
uint16_t count
The index in the collection.
Definition: messages.h:6077
uint8_t messagetype
Definition: messages.h:4529
csString factname
Definition: messages.h:3421
virtual ~psMessageCracker()
Definition: messages.h:356
Class to send client directions on how to render a Sketch.
Definition: messages.h:5421
csString race
Definition: messages.h:3423
psTraitChangeMessage(uint32_t client, EID targetID, csString &string)
Definition: messages.h:5348
float capacity
Definition: messages.h:2843
Struct used by MessageCracker and ToString to distribute a number of access pointers.
Definition: netbase.h:125
Add this to movements.
Definition: messages.h:5228
csArray< SPELL_TYPE > type
Definition: messages.h:3902
csString GetMsgTypeName(int msgType)
uint32_t tribeID
Definition: messages.h:3501
void FireEvent()
Publishes the message to the local program.
csString resolution
resolution of a closed petition
Definition: messages.h:982
bool hasContents
True if this item is a container and has contents.
Definition: messages.h:4309
csString commandData
Definition: messages.h:2130
csString MounterAnim
The anim to be used by the mounter.
Definition: messages.h:3425
Sends messages to the server to indicate what to loot.
Definition: messages.h:1815
csString sectorName
Name of the sector.
Definition: messages.h:3208
psStopEffectMessage(MsgEntry *message)
Definition: messages.h:2462
Sets the amount of guild points assigned to a member.
Definition: messages.h:1164
Messages with system information sent to user.
Definition: messages.h:962
Server sends back result of close petition.
Definition: messages.h:991
DESCTYPE
Definition: messages.h:4162
csString commandData
Definition: messages.h:3103
csString msgline
Definition: messages.h:940
csString sCommand
Definition: messages.h:3774
Message to change a character&#39;s trait.
Definition: messages.h:5345
bool on_ground
Helps determine whether gravity applies.
Definition: messages.h:3161
csString limits
Definition: messages.h:5467
virtual csString ToString(NetBase::AccessPointers *accessPointers)=0
Converts the message into human readable string.
Admin commands.
Definition: messages.h:1306
psQuestRewardMessage(MsgEntry *me)
Definition: messages.h:4596
csString player
Definition: messages.h:1281
uint32_t questionID
Definition: messages.h:3734
unsigned int strength
Definition: messages.h:3105
csString beltGroup
Used for belt groupings.
Definition: messages.h:3429
csString sector
Definition: messages.h:3496
csString factname
Definition: messages.h:3494
int client
The command type of message.
Definition: messages.h:5866
const char * itemIcon
The 2D graphic GUI image.
Definition: messages.h:4291
psGuildMOTDSetMessage(csString &guildMsg, csString &guild)
Definition: messages.h:4056
uint32_t msgGameID
Game ID (from action location ID).
Definition: messages.h:5658
const char * itemDescription
The description of this item or container.
Definition: messages.h:4387
bool Evaluatable
Stores if an event can be evaluated.
Definition: messages.h:5818
The structure of 1 queue entry (pointer to a message)
Definition: message.h:143
Messages sent from server to client containing each detailed combat event.
Definition: messages.h:2699
unsigned int mana
Definition: messages.h:2931
The message sent from client to server to request a char deletion.
Definition: messages.h:531
psTutorialMessage(uint32_t client, uint32_t which, const char *instructions)
Definition: messages.h:5388
int16_t GetInt16()
Get a signed 16bit Integer from the current psMessageBytes buffer.
Definition: message.h:755
Message used by to send a musical sheet.
Definition: messages.h:5476
General Message for sending information about an item to a client.
Definition: messages.h:4240
unsigned int will
Definition: messages.h:2928
sends a message tot he client with the attack queue list
Definition: messages.h:1501
virtual csString GetMessageTypeName() const =0
Gets the name of the message type.
Class to send a possibly cached file to the client.
Definition: messages.h:5978
csString motd
Definition: messages.h:3658
csArray< BuddyData > buddies
Definition: messages.h:3584
iSector * sector
Ptr to sector for mesh.
Definition: messages.h:3167
Effect Message.
Definition: messages.h:2487
ModType type
Definition: messages.h:5247
This message is used by the server to activate one mechanism client side.
Definition: messages.h:6097
Message sent from server to client if login was valid.
Definition: messages.h:697
Messages sent to user with petition information.
Definition: messages.h:1003
bool CanTransform
indicates whether the container can auto transform or not
Definition: messages.h:4414
int32_t GetInt32()
Get a signed 32Bit Integer from the current psMessageBytes buffer.
Definition: message.h:792
csString sOther
Name of the other person involved in this chat message (used only with some chat types) ...
Definition: messages.h:824
Class to implement sequential delivery of net messages.
Definition: messages.h:6133
csString petition
petition text
Definition: messages.h:975
uint32_t value
stance if COMBAT, duration if SPELL_CASTING, ...
Definition: messages.h:1564
Spell Cast Message.
Definition: messages.h:2342
float scale
Stores the scale of the actor. Total model scale.
Definition: messages.h:3447
uint8_t * msgUpdates
Array with updates for the game board.
Definition: messages.h:5727
void Multicast(csArray< PublishDestination > &multi, uint32_t except, float range)
Multicasts the message to all current connections.
This message class deals with the inventory messages.
Definition: messages.h:1672
Message from a client for a request to join a chat channel.
Definition: messages.h:867
GUI Group Message.
Definition: messages.h:2140
csArray< NetworkDetailSkill > skills
Definition: messages.h:4119
csString name
Definition: messages.h:3419
uint8_t mode
Definition: messages.h:1563
General Message for sending information about an containter to a client.
Definition: messages.h:4339
Sound Events Message.
Definition: messages.h:2755
The message sent from client to server on login.
Definition: messages.h:587
csString removedMesh
Lists the mesh which should be removed when this item is equipped.
Definition: messages.h:2010
Server sends client basic data about guild.
Definition: messages.h:1152
uint32_t groupID
Definition: messages.h:3438
psCharacterDescriptionUpdateMessage(MsgEntry *me)
Definition: messages.h:4183
float vel
The velocity of the actor.
Definition: messages.h:3214
unsigned short int gender
Definition: messages.h:4114
csArray< ItemDescription > items
Definition: messages.h:1777
csString sTarget
Definition: messages.h:3775
csString assignedgm
the currently assigned GM
Definition: messages.h:977
bool hasContents
True if this item is a container and has contents.
Definition: messages.h:4408
Movement related class.
Definition: linmove.h:68
questionType_t type
Definition: messages.h:3736
csSimpleRenderMesh simpleRenderMesh
The total number of meshes in this collection.
Definition: messages.h:6078
uint16_t index
Name of this collection of meshes.
Definition: messages.h:6076
const char * itemName
The name of the item or container.
Definition: messages.h:4384
csString sPerson
name of person this chat message comes from
Definition: messages.h:815
csString cloakGroup
Used for cloak groupings.
Definition: messages.h:3430
MSG_TYPES
Definition: messages.h:79
#define PSF_DECLARE_MSG_FACTORY()
Definition: messages.h:416
csArray< PlayerInfo > players
Definition: messages.h:1084
Sends messages to the client to control sequences.
Definition: messages.h:5873
int craftTime
The time when the crafting shall be ready.
Definition: messages.h:2238
This is a request for entire inventory.
Definition: messages.h:1678
unsigned int hitpointsMax
Definition: messages.h:3116
uint32_t songID
Definition: messages.h:5598
This message is sent to the client to let it know the basic stats of the player.
Definition: messages.h:2811
csString item
Definition: messages.h:5121
psTutorialMessage(MsgEntry *me)
Definition: messages.h:5398
Contains data for one petition.
Definition: messages.h:972
uint32_t type
Definition: messages.h:3503
int slotID
Where this item is in the container.
Definition: messages.h:4303
Server sends back result of descalation of petition.
Definition: messages.h:996
csVector3 pos
Position vector.
Definition: messages.h:3205
The message sent from server to client when a menu of possible responses is available.
Definition: messages.h:6005
int containerID
The container ID for this item.
Definition: messages.h:4396
csString bracerGroup
Used for bracers groupings.
Definition: messages.h:3428
csString created
date and time of creation
Definition: messages.h:981
unsigned int hitpoints
Definition: messages.h:2930
csString web_page
Definition: messages.h:1117
psCraftCancelMessage(MsgEntry *message)
Definition: messages.h:2219
psAdviceMessage(int clientNum, const char *command, const char *target, const char *message)
Definition: messages.h:3778
psStopEffectMessage(uint32_t clientNum, uint32_t uid)
Definition: messages.h:2442
Server sends back result of change petition.
Definition: messages.h:992
csMD5::Digest * digest
Definition: messages.h:2618
psCharacterDetailsRequestMessage(MsgEntry *me)
Definition: messages.h:4140
unsigned int charisma
Definition: messages.h:3110
Server sends back result of escalation of petition.
Definition: messages.h:995
csString status
status of the petition
Definition: messages.h:976
Notification of an item removed from an exchange.
Definition: messages.h:4717
#define PS_NETVERSION
Definition: messages.h:52
psSketchMessage(uint32_t client, uint32_t itemID, uint8_t flags, const char *limitxml, const char *sketch_def, bool rightToEditFlag, const char *sketch_name, const char *backgroundImg)
Definition: messages.h:5424
The psSkillCache class implements the skill cache both on the server and on the client.
Definition: skillcache.h:158
csVector3 offset
Definition: messages.h:2540
unsigned int physStaminaMax
Definition: messages.h:2937
uint32_t duration
Definition: messages.h:2543
The message sent from client to server to request a cp value for creation.
Definition: messages.h:5932
Duration
The number associated to each duration is the number of sixteenths in that note.
Definition: pawssheetline.h:46
csString mountFactname
Definition: messages.h:3424
NetWeatherInfo weather
Definition: messages.h:1651
This message is used by both server and client to stop a song.
Definition: messages.h:5557
GUI Skill Message.
Definition: messages.h:2857
uint16_t channelID
Definition: messages.h:835
this tell came from the server, not from another player
Definition: messages.h:791
Used to hide members of secret guilds.
Definition: messages.h:3729
uint8_t serverMode
Definition: messages.h:3436
The message sent to the player being proposed for marriage.
Definition: messages.h:467
bool GetBool()
Get a bool from the current psMessageBytes buffer.
Definition: message.h:885
csVector2 start
Start point of anmiation.
Definition: messages.h:3211
unsigned int endurance
Definition: messages.h:3106
psGuildMOTDSetMessage(MsgEntry *me)
Definition: messages.h:4066
uint8_t msgCounter
Message counter for versioning.
Definition: messages.h:5655
bool translate
is the text supposed to be translated by psLocalization on target client ?
Definition: messages.h:830
unsigned int menStamina
Definition: messages.h:2933
uint32_t options
Holds the options that the window should display.
Definition: messages.h:1455
Message sent from server to client containing the message strings hash table.
Definition: messages.h:2586
csString genericCommand
Definition: messages.h:1456
psBuddyStatus(MsgEntry *me)
Definition: messages.h:3603
psCharacterDescriptionUpdateMessage(csString &newValue, DESCTYPE desctype)
Definition: messages.h:4172
The message sent from client to server to request a new introduction.
Definition: messages.h:5957
InstanceID instance
Definition: messages.h:3443
uint8_t Flags
Definition: messages.h:5465
Asks the user if they would like to duel.
Definition: messages.h:3730
csString name
Item info.
Definition: messages.h:4492
csString firstName
Definition: messages.h:4901
Add this to velocity until told otherwise.
Definition: messages.h:5230
Handle scripting of hired NPCs.
Definition: messages.h:6156
A general question that may concern anything.
Definition: messages.h:3728
psMessageCracker * psfCreateMsg(int msgtype, MsgEntry *me, NetBase::AccessPointers *accessPointers)
int slotID
to identify which item this is later
Definition: messages.h:4570
csString filter
Definition: messages.h:1282
csString dfltBehaviors
Definition: messages.h:1382
csString lskill
Definition: messages.h:5125
csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
Definition: messages.h:2471
command to get informations on the specific event (description, evaluatable status) ...
Definition: messages.h:5800
unsigned int physStamina
Definition: messages.h:2932
GUI Active Magic Message.
Definition: messages.h:3819
The message is sent when someone requests marriage details of a player.
Definition: messages.h:509
csVector3 GetVector3()
Definition: message.h:922
csString equipment
Definition: messages.h:3433
Sends messages to the client listing the assigned quests for the player.
Definition: messages.h:1869
Class to send instructions from server to client on a tutorial event.
Definition: messages.h:5385
csVector3 top
Definition: messages.h:3431
uint32_t stackCount
Stack count of the item.
Definition: messages.h:4294
csArray< NetworkAttack > attacks
Definition: messages.h:2272
const char * GetStr()
Get a null-terminated string from the current psMessageBytes buffer.
Definition: message.h:702
Autoaway tell message, should be handled as CHAT_TELL, except for warning.
Definition: messages.h:801
uint32_t command
Definition: messages.h:1468
psSpellCancelMessage(MsgEntry *)
Definition: messages.h:2192
csVector2 dest
Destination point of animation.
Definition: messages.h:3212
All net messages inherit from this class.
Definition: messages.h:343
csString texParts
Definition: messages.h:3432
int msgSize
Running count of message size. Used for constructing the outgoing message.
Definition: messages.h:4306
psMOTDMessage(uint32_t clientNum, const csString &tipMsg, const csString &motdMsg, const csString &guildMsg, const csString &guild)
Definition: messages.h:3626
Pet Skill Message.
Definition: messages.h:3044
This is a list of items.
Definition: messages.h:1677
csString itemName
Definition: messages.h:4016
uint32_t songID
Definition: messages.h:5546
float mountScale
Stores the scale of the mounted actor.
Definition: messages.h:3448
csString backgroundImg
The image which will be shown as a background of this book.
Definition: messages.h:4573
csString commandData
Definition: messages.h:2921
float rotationMod
Definition: messages.h:5249
This object represents each NPC managed by this superclient.
Definition: npc.h:126
int slotID
Where this item is in the container.
Definition: messages.h:4402
csString helmGroup
Used for helm groupings.
Definition: messages.h:3427
Clients asks server to change the guild member login/logout notification setting. ...
Definition: messages.h:1169
psSketchMessage(MsgEntry *me)
Definition: messages.h:5439
void psfUnRegisterMsgFactories(void)
Sends messages to the client listing the available loot on a mob.
Definition: messages.h:1844
psQuestionCancelMessage(MsgEntry *me)
Definition: messages.h:4036
csArray< uint32 > duration
Definition: messages.h:3903
csString instrs
Definition: messages.h:5415
EID containerID
The EID for the container we&#39;re updating.
Definition: messages.h:4489
psMessageCracker *(* psfMsgFactoryFunc)(MsgEntry *me, NetBase::AccessPointers *accessPointers)
Definition: messages.h:403
uint8_t * msgLayout
Array with the game board layout.
Definition: messages.h:5677
psSkillCache skillCache
Definition: messages.h:2922
Message from the server to handle entrances into and out of map instances.
Definition: messages.h:5733
csArray< uint32_t > objectID
Definition: messages.h:4844
Spell Cancel Message This message is used to send a cancel message, and to send the time left before ...
Definition: messages.h:2210
int posInstance
Remember the position of the instance field in the generated message.
Definition: messages.h:3446
uint32_t msgGameID
Game ID (from the action location ID)
Definition: messages.h:5716
csString meshName
Definition: messages.h:4494
psQuestionCancelMessage(int clientnum, uint32_t id)
Definition: messages.h:4028
Generic commands.
Definition: messages.h:1333
int to
The destination client for this message.
Definition: messages.h:4312
unsigned int hitpoints
Definition: messages.h:3111
psSlotMovementMsg(int fromContainerID, int fromSlotID, int toContainerID, int toSlotID, int stackCount, csVector3 *pt3d=NULL, csVector3 *rot=NULL, bool guarded=true, bool inplace=true)
Definition: messages.h:3914
csArray< ItemModifier > mods
Definition: messages.h:5084
csArray< AAttack > attacks
Definition: messages.h:1520
The message sent from client to server before login.
Definition: messages.h:555
uint8_t msgtype
Definition: message.h:56
csArray< psPetitionInfo > petitions
Definition: messages.h:1006
command to request the list of events
Definition: messages.h:5799
csString name
Definition: messages.h:3493
uint32_t GetUInt32()
Get an unsigned 4byte int from the current psMessageBytes buffer.
Definition: message.h:811
General Equipment Message.
Definition: messages.h:1955
csArray< csString > image
Definition: messages.h:3907
A request to start an exchange with your current target.
Definition: messages.h:4646
int8_t msgCols
Number of columns.
Definition: messages.h:5664
csString craftInfo
Definition: messages.h:5337
Server sends client data about guild levels.
Definition: messages.h:1153
uint32_t flags
Definition: messages.h:3504
int masqueradeType
Definition: messages.h:3435
server tells client to close GuildWindow
Definition: messages.h:1157
csVector3 pos
Definition: messages.h:3288
csString charName
Definition: messages.h:547
unsigned int menStamina
Definition: messages.h:3114
PID msgPlayerID
This is the ID which must be requested to instantiate the client player.
Definition: messages.h:707
Sends messages to the client indicating that a sector portal has been crossed.
Definition: messages.h:1788
csArray< DialogResponse > responses
Definition: messages.h:6036
Notification of an item added to an exchange.
Definition: messages.h:4678
csString question
Definition: messages.h:3735
float yrot
Rotation around Y-axis in radians.
Definition: messages.h:3166
bool renameable
indicates whether the container is renameable or not
Definition: messages.h:4411
This class is the client&#39;s and server&#39;s main interface for either sending network messages out or get...
Definition: msghandler.h:106
GUI Banking Message.
Definition: messages.h:2957
int id
unique id of the petition
Definition: messages.h:974
uint32_t loadTime
time to wait even if there is no need to load
Definition: messages.h:3210
const char * itemName
The name of the item or container.
Definition: messages.h:4285
unsigned int manaMax
Definition: messages.h:3117
csString msgReason
Definition: messages.h:1359
Messages that are sent to the GM GUI windowManager.
Definition: messages.h:1070
uint8_t msgCounter
Message counter for versioning.
Definition: messages.h:5713
Sends messages to the client listing the assigned events for the player.
Definition: messages.h:5794
Class to send a csSimpleRenderMesh to the client.
Definition: messages.h:6070
csVector3 rot
Definition: messages.h:3994
GUI Target Update This class is used to notify the client that data it is showing in the GUI target w...
Definition: messages.h:2554
Sends messages to the client listing the assigned quests for the player.
Definition: messages.h:1893
csVector3 worldVel
World velocity vector.
Definition: messages.h:3163
Server is returning a list of petitions.
Definition: messages.h:989
csRef< iDataBuffer > databuf
Definition: messages.h:5983
float maxWeight
The total max weight the player can carry.
Definition: messages.h:1780
command to discard an event
Definition: messages.h:5801
csStringFast< 1024 > actionXML
Definition: messages.h:1480
psCharCreateTraitsMessage(csString &string)
Definition: messages.h:5163
float ang_vel
Angular velocity of Yrot member changing.
Definition: messages.h:3169
Server sends back result of deassignation of petition.
Definition: messages.h:994
bool Unpickable
Definition: messages.h:5123
csString materialName
Definition: messages.h:4495
csString sectorName
Name of the sector.
Definition: messages.h:3168
csString icon
Definition: messages.h:4493
float yrot
Rotation around Y-axis in radians.
Definition: messages.h:1808
unsigned int physStaminaMax
Definition: messages.h:3118
psStopEffectMessage(uint32_t uid)
Definition: messages.h:2452
csArray< ContainerContents > contents
Definition: messages.h:4436
Server sends back result of assignation of petition.
Definition: messages.h:993
iSector * sector
Ptr to sector for mesh.
Definition: messages.h:3207
Class to send a single arbitrary string to the client or server.
Definition: messages.h:6042
uint32_t uid
Definition: messages.h:2544
int msgSize
Running count of message size. Used for constructing the outgoing message.
Definition: messages.h:4405
csArray< csString > name
Definition: messages.h:3906
void psfRegisterMsgFactoryFunction(psfMsgFactoryFunc factoryfunc, int msgtype, const char *msgtypename)
psMsgCraftingInfo(MsgEntry *me)
Definition: messages.h:5320
User commands.
Definition: messages.h:1249
csString characterName
The name of the character that the account user wants to use.
Definition: messages.h:648
Server sends client data about guild members.
Definition: messages.h:1154
int escalation
the escalation level of the petition
Definition: messages.h:979
Out of Character description.
Definition: messages.h:4165
csString stance
Definition: messages.h:1255
csString lootxml
Definition: messages.h:1863
csString commandData
Definition: messages.h:2074
Guild commands sent from client to server.
Definition: messages.h:1114
csString divorceMsg
Definition: messages.h:505
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
Definition: messages.h:5500
uint8_t * msgPieces
Available pieces (both white and black).
Definition: messages.h:5683
This is a request for inventory updates.
Definition: messages.h:1679
Normal character description.
Definition: messages.h:4164
Messages that are sent to/from the ActionManager.
Definition: messages.h:1464
psQuestionResponseMsg(MsgEntry *me)
Definition: messages.h:3700
psQuestionMessage(MsgEntry *me)
Definition: messages.h:3752
csArray< uint32_t > mods
Definition: messages.h:5129
void SendMessage()
Sends the message to the client/server.
System messages that are also shown on the "Main" tab.
Definition: messages.h:796
csString xml
Stores an xml string (various uses)
Definition: messages.h:5819
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
Definition: messages.h:5541
uint32_t msgClientValidToken
This must be returned by the client in all future messages to validate sender.
Definition: messages.h:703
A small struct to hold item info after read out of message.
Definition: messages.h:1762
csString requestor
Weather simple description or full is requested.
Definition: messages.h:4159
Server sends client data about guild alliance.
Definition: messages.h:1155
uint8_t counter
Definition: messages.h:2801
csString commandData
Definition: messages.h:1215
csString oldSector
Holds the options that the window should display.
Definition: messages.h:1806
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
Definition: messages.h:6119
uint8_t GetUInt8()
Get an unsigned 8Bit Integer from the current psMessageBytes buffer.
Definition: message.h:867
Message from the client to start a minigame.
Definition: messages.h:5606
Messages from the server to the client, similar to combat events below, but for special attacks...
Definition: messages.h:2665
Work commands.
Definition: messages.h:1277
csString command
Definition: messages.h:1280
csPDelArray< FactionPair > factionInfo
Destination client.
Definition: messages.h:5867
Sends messages to the client informing of server-side movement lockouts.
Definition: messages.h:1572
uint32_t stackCount
Stack count of the item.
Definition: messages.h:4393
csString repairSlotName
The name of the slot to repair.
Definition: messages.h:1284
csRef< MsgEntry > msg
Definition: messages.h:348
questionType_t
Various questions that are posed to the user.
Definition: messages.h:3726
unsigned int intelligence
Definition: messages.h:3108
Multiply this with movements.
Definition: messages.h:5229
csString commandData
Definition: messages.h:2180
triggered <on type="attack">
Definition: scripting.h:66
virtual csString ToString(NetBase::AccessPointers *accessPointers)
Converts the message into human readable string.
Definition: messages.h:6059
psAdviceMessage(MsgEntry *me)
Definition: messages.h:3793
Message sent with chat info.
Definition: messages.h:808
SPELL_TYPE
Definition: psconst.h:126
csString matname
Definition: messages.h:3422
EID actor
Keeps the eid of the originator client for chat bubbles.
Definition: messages.h:833
int maxContainerSlots
The maximum number of slots available in this container.
Definition: messages.h:4399
uint16_t msgOptions
Game options.
Definition: messages.h:5661
Sends messages to the client interaction window.
Definition: messages.h:1401
Faction Message to get faction info from the server.
Definition: messages.h:5827
uint8_t counter
sequence checker byte
Definition: messages.h:3160
bool canWrite
whether or not to display the &#39;edit&#39; button
Definition: messages.h:4568
csString lastName
Definition: messages.h:4902
psGUIActiveMagicMessage(uint32_t clientNum, csArray< ActiveSpell * > &spells, uint32_t index, csTicks serverTime)
Definition: messages.h:3825
bool onlineStatus
Definition: messages.h:3620
csString error
Definition: messages.h:1008
psBuddyStatus(uint32_t clientNum, csString &buddyName, bool online)
Definition: messages.h:3592
GM Event List Message.
Definition: messages.h:5769
Message from the client with a minigame board update.
Definition: messages.h:5690
const char * itemIcon
The 2D graphic GUI image.
Definition: messages.h:4390
unsigned short int gender
Definition: messages.h:3426
csString sMessage
Definition: messages.h:3776
csString guild
Definition: messages.h:3420
Slot_Containers
Definition: messages.h:61
csString name
Definition: messages.h:5469
unsigned int endurance
Definition: messages.h:2925
unsigned int mana
Definition: messages.h:3112
csArray< csString > types
Definition: messages.h:5026
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
Definition: messages.h:5593
int to
The destination client for this message.
Definition: messages.h:4417
int32_t focusSkill
Definition: messages.h:2940
csString gmEventsXML
Definition: messages.h:5788
Messages sent by the user to the server with requests for petition information.
Definition: messages.h:1045
The message sent when someone divorces someone.
Definition: messages.h:489
float GetFloat()
Get a float from the current psMessageBytes buffer.
Definition: message.h:737
csVector3 pos
Definition: messages.h:3497
uint32_t command
Definition: messages.h:1214
psCharacterDetailsRequestMessage(bool myself, bool simple, const csString &requestor)
Definition: messages.h:4127
psQuestRewardMessage(uint32_t clientnum, csString &newValue, uint8_t type)
Definition: messages.h:4587
uint32_t type
Definition: messages.h:941
Server informs client that their petition list is dirty.
Definition: messages.h:997
unsigned int charisma
Definition: messages.h:2929
const char * itemDescription
The description of this item or container.
Definition: messages.h:4288
csString materialName
Definition: messages.h:4705
csString instrName
Definition: messages.h:5548
unsigned int count
Definition: messages.h:5122
csArray< NetworkGlyph > glyphs
Definition: messages.h:2430
bool clearSlot
indicates if the slot should be cleared
Definition: messages.h:4486
uint8_t mode
Current character mode.
Definition: messages.h:3162
csVector3 movementMod
Definition: messages.h:5248
static MsgHandler * msghandler
Definition: messages.h:346
psQuestionMessage(int clientnum, uint32_t questionID, const char *question, questionType_t type)
Definition: messages.h:3738
Sends messages to the client indicating rain and time of day.
Definition: messages.h:1595
float yrot
Rotation around Y-axis in radians.
Definition: messages.h:3206
int32_t skillCat
Definition: messages.h:2941
int ContainerSlots
The slots available in this container.
Definition: messages.h:4300
csString loadWidget
The widget to replace the load window with.
Definition: messages.h:3213
unsigned int intelligence
Definition: messages.h:2927
csArray< NetworkSpell > spells
Definition: messages.h:2309
GUI Guild Message.
Definition: messages.h:1143
EID entranceID
The gem entity ID of the entrance object.
Definition: messages.h:5757
unsigned int hitpointsMax
Definition: messages.h:2935
uint32_t id
Definition: messages.h:4933
csString player
the player
Definition: messages.h:980
csString password
Definition: messages.h:4974
csString msgReason
This is something like "account not valid" or "password not valid.
Definition: messages.h:754
csString item
Definition: messages.h:5048
csStringHashReversible * msgstrings
Message strings hash table pointer (null for outbound) This hash table will be allocated during messa...
Definition: messages.h:2593
csArray< uint32 > registrationTime
Definition: messages.h:3904
GUI Exchange Message.
Definition: messages.h:2027
int posPlayerID
Remember the position the playerID in the generated message.
Definition: messages.h:3445
float pstam_rate
Definition: messages.h:2803
unsigned int menStaminaMax
Definition: messages.h:3119
int8_t msgRows
Number of rows.
Definition: messages.h:5667
int type
Holds the options that the window should display.
Definition: messages.h:1642
psMOTDRequestMessage(MsgEntry *)
Definition: messages.h:3672
csString guildmotd
Definition: messages.h:3659
unsigned int will
Definition: messages.h:3109
csString text
Definition: messages.h:1252
void DecodeMessage(MsgEntry *me, NetBase::AccessPointers *accessPointers, bool filterhex, csString &msgText, int &filterNumber)
int32_t focusSkill
Definition: messages.h:3121
Message from the server with a channel id.
Definition: messages.h:888
Group commands.
Definition: messages.h:1223
unsigned int physStamina
Definition: messages.h:3113
int containerID
The container ID for this item.
Definition: messages.h:4297
csString matname
Definition: messages.h:3495
psMOTDMessage(MsgEntry *me)
Definition: messages.h:3639
Server sends back result of cancel petition.
Definition: messages.h:990
csString name
Definition: messages.h:2539
float quality
Definition: messages.h:5128
Sets the maximum amount of guild points for the guild.
Definition: messages.h:1165
bool use_yrot
Use the yrot value to set the rotation.
Definition: messages.h:1809
Indicates that an OverrideAction is being done and not a loop as covered in DR msgs.
Definition: messages.h:1922
csString guild
Definition: messages.h:3660
Clients changes right for guild level.
Definition: messages.h:1162
This message is used by the server to make clients play a song.
Definition: messages.h:5515
psPersistAllEntities(uint32_t client)
Definition: messages.h:3319