19 #ifndef __MESSAGES_H__ 20 #define __MESSAGES_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> 31 #include <csgeom/vector3.h> 35 #include <ivideo/graph3d.h> 43 struct iSpriteCal3DState;
48 class csStringHashReversible;
52 #define PS_NETVERSION 0x00B9 59 #define PS_NPCNETVERSION 0x1035 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 332 #define TOP_SHORT_INT_VAL 65535 353 : msg(NULL),valid(true)
366 void Multicast(csArray<PublishDestination> &multi, uint32_t except,
float range);
416 #define PSF_DECLARE_MSG_FACTORY() \ 417 virtual csString GetMessageTypeName() const; \ 418 static psMessageCracker* CreateMessage(MsgEntry* me, \ 419 NetBase::AccessPointers* accessPointers) 421 #define PSF_IMPLEMENT_MSG_FACTORY_REGISTER(Class,MsgType) \ 422 class Class##_StaticInit \ 425 Class##_StaticInit() \ 427 psfRegisterMsgFactoryFunction (Class::CreateMessage, \ 430 } Class##_static_init__ 433 #define PSF_IMPLEMENT_MSG_FACTORY_CREATE1(Class) \ 434 psMessageCracker* Class::CreateMessage(MsgEntry* me, \ 435 NetBase::AccessPointers* ) \ 437 return (psMessageCracker*)new Class(me); \ 440 #define PSF_IMPLEMENT_MSG_FACTORY_TYPENAME(Class,MsgType) \ 441 csString Class::GetMessageTypeName() const \ 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) 451 #define PSF_IMPLEMENT_MSG_FACTORY_CREATE2(Class) \ 452 psMessageCracker* Class::CreateMessage(MsgEntry* me, \ 453 NetBase::AccessPointers* a_p) \ 455 return (psMessageCracker*)new Class(me, a_p); \ 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) 471 uint32_t clientNum = 0);
598 gfxcard_, gfxversion_;
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);
722 void AddCharacter(
const char* fullname,
const char* race,
723 const char* mesh,
const char* traits,
const char* equipment);
726 void GetCharacter(
MsgEntry* message,csString &fullname, csString &race,
727 csString &mesh, csString &traits,csString &equipment);
743 csStringArray contents;
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);
861 const char* GetTypeText();
933 #define MAXSYSTEMMSGSIZE 1024 1016 psPetitionMessage(uint32_t clientnum, csArray<psPetitionInfo>* petitionArray,
const char* errMsg,
1017 bool succeed =
true,
int type =
PETITION_LIST,
bool gm =
false);
1095 psGMGuiMessage(uint32_t clientnum, csArray<PlayerInfo>* playerArray,
int type);
1117 csString command, subCmd, permission, guildname, player, levelname, accept, secret,
web_page,motd, alliancename;
1147 UNSUBSCRIBE_GUILD_DATA,
1170 SET_ALLIANCE_NOTIFICATION
1184 csString commandData);
1199 csString commandData);
1252 csString command,player,filter,action,
text,target,attack;
1384 psUserActionMessage(uint32_t clientnum, EID target,
const char* action,
const char* dfltBehaviors=
"");
1419 PICKUP = 0x00000001,
1420 EXAMINE = 0x00000002,
1421 UNLOCK = 0x00000004,
1423 BUYSELL = 0x00000010,
1427 PLAYERDESC = 0x00000100,
1429 COMBINE = 0x00000400,
1430 EXCHANGE = 0x00000800,
1432 NPCTALK = 0x00002000,
1434 VIEWSTATS = 0x00004000,
1435 DISMISS = 0x00008000,
1437 MARRIAGE = 0x00010000,
1438 DIVORCE = 0x00020000,
1440 PLAYGAME = 0x00040000,
1443 ENTERLOCKED = 0x00200000,
1445 INTRODUCE = 0x00800000,
1446 CONSTRUCT = 0x01000000,
1448 UNMOUNT = 0x04000000,
1449 STORAGE = 0x08000000,
1450 GENERIC = 0x10000000
1517 void AddAttack(
const csString& name,
const csString& image);
1518 void Construct(csStringSet* msgstrings);
1531 psModeMessage(uint32_t clientnum, EID actorID, uint8_t mode, uint32_t value);
1627 psWeatherMessage(uint32_t client,
int minute,
int hour,
int day,
int month,
int year);
1714 uint32_t totalItems,
1715 uint32_t totalEmptiedSlots,
1717 uint32_t cache_version,
1741 void AddItem(
const char* name,
1742 const char* meshName,
1743 const char* materialName,
1751 csStringSet* msgstrings);
1754 void AddEmptySlot(
int containerID,
int slotID);
1757 void AddMoney(
const psMoney &money);
1791 psNewSectorMessage(
const csString &oldSector,
const csString &newSector, csVector3 pos,
bool use_yrot =
false,
float yrot = 0.0);
1860 void Populate(EID entity, csString &lootstr,
int cnum);
1885 void Populate(csString &queststr,
int cnum);
1986 csString &removedMesh);
2055 csString commandData);
2058 csString commandData);
2111 csString commandData);
2114 csString commandData);
2161 csString commandData);
2164 csString commandData);
2229 void SetCraftTime(
int craftTime, uint32_t client);
2269 void AddAttack(
const csString& name,
const csString& description,
const csString& type,
const csString& image);
2270 void Construct(csStringSet* msgstrings);
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);
2371 csString spellName, csString image, csString description);
2425 void AddGlyph(csString name, csString image,
int purifiedStatus,
2426 int way,
int statID);
2447 msg->clientnum = clientNum;
2474 msgtext.AppendFmt(
"Effect ID: %d", uid);
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);
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);
2603 unsigned long size, uint32_t num_strings);
2639 psCharacterDataMessage(uint32_t clientnum,
2644 csString equipment);
2647 psCharacterDataMessage(
MsgEntry* message);
2680 void SetClientNum(
int cnum);
2717 COMBAT_DAMAGE_NEARLY_DEAD
2725 int target_location,
2730 void SetClientNum(
int cnum);
2780 psStatDRMessage(uint32_t clientnum, EID eid, csArray<float> fVitals, csArray<uint32_t> uiVitals, uint8_t version,
int flags);
2821 psStatsMessage(uint32_t client,
float maxHP,
float maxMana,
float maxWeight,
float maxCapacity);
2868 static const char* SkillCommandString[];
2882 csString commandData);
2886 csString commandData,
2900 uint32_t physStaMax,
2904 int32_t selSkillCat,
3033 bool sendingExchange;
3067 csString commandData);
3071 csString commandData,
3084 uint32_t physStaMax,
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);
3138 void CreateMsgEntry(uint32_t client,
NetBase::AccessPointers* accessPointers, iSector* sector, csString sectorName);
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,
3155 enum { ON_GOUND = 128 };
3157 static uint8_t GetDataFlags(
const csVector3 &v,
const csVector3 &wv,
float yrv, uint8_t mode);
3173 psDRMessage(uint32_t client, EID mappedid, uint8_t counter,
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,
3185 bool IsNewerThan(uint8_t oldCounter);
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 =
"");
3274 psPersistWorld(uint32_t clientNum, csVector3 pos,
const char* sectorName);
3323 msg->clientnum = client;
3344 bool AddEntityMessage(
MsgEntry* newEnt);
3362 INVINCIBLE = 1 << 1,
3375 const char* factname,
3376 const char* matname,
3378 const char* mountFactname,
3379 const char* MounterAnim,
3380 unsigned short int gender,
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,
3392 uint8_t movementMode,
3394 PID playerID = 0, uint32_t groupID = 0, EID ownerEID = 0,
3395 uint32_t flags = NONE, PID masterID = 0,
bool forNPClient =
false);
3417 static uint32_t PeekEID(
MsgEntry* me);
3431 csVector3
top, bottom, offset;
3468 const char* factname,
3469 const char* matname,
3476 csStringSet* msgstrings,
3477 uint32_t tribeid = 0,
3581 void AddBuddy(
int num,
const char* name,
bool onlineStatus);
3594 msg.AttachNew(
new MsgEntry(buddyName.Length()+1 +
sizeof(bool)));
3597 msg->clientnum = clientNum;
3599 msg->Add(buddyName);
3626 psMOTDMessage(uint32_t clientNum,
const csString &tipMsg,
const csString &motdMsg,
const csString &guildMsg,
const csString &guild)
3628 msg.AttachNew(
new MsgEntry(tipMsg.Length()+1 + motdMsg.Length()+1 + guildMsg.Length()+1 + guild.Length() +1));
3631 msg->clientnum = clientNum;
3643 guildmotd = me->
GetStr();
3694 msg.AttachNew(
new MsgEntry(
sizeof(questionID)+answer.Length()+1));
3696 msg->clientnum = clientnum;
3697 msg->Add(questionID);
3739 uint32_t questionID,
3740 const char* question,
3743 msg.AttachNew(
new MsgEntry(
sizeof(questionID) +strlen(question)+1 +2));
3745 msg->clientnum = clientnum;
3747 msg->Add(questionID);
3749 msg->Add((uint16_t)type);
3778 psAdviceMessage(
int clientNum,
const char* command,
const char* target,
const char* message)
3782 if(message) msgSize = strlen(message);
3784 msg.AttachNew(
new MsgEntry(strlen(command) + strlen(target) + msgSize + 3));
3786 msg->clientnum = clientNum;
3789 msg->Add(message?message:
"");
3828 size_t msgSize =
sizeof(uint8_t) +
sizeof(uint32_t) +
sizeof(uint8_t) +
sizeof(
bool) +
sizeof(uint32_t) +
sizeof(uint32_t);
3830 size_t numSpells = spells.GetSize();
3832 for(
size_t i=0; i<numSpells; i++ )
3834 msgSize +=
sizeof(uint8_t);
3835 msgSize +=
sizeof(uint32_t);
3836 msgSize += spells[i]->Name().Length() + 1;
3837 msgSize += spells[i]->Image().Length() + 1;
3838 msgSize +=
sizeof(uint32_t);
3839 msgSize +=
sizeof(uint32_t);
3844 msg->clientnum = clientNum;
3846 msg->Add((uint32_t)index);
3847 msg->Add((uint32_t)numSpells);
3848 for(
size_t i=0; i<numSpells; i++ )
3850 msg->Add((uint8_t)spells[i]->Type());
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);
3865 if( command != List )
3875 size_t totalSpells = message->
GetUInt32();
3878 for(
size_t i=0; i<totalSpells; i++ )
3882 name.Push( message->
GetStr());
3883 image.Push( message->
GetStr());
3884 registrationTime.Push( message->
GetUInt32());
3919 csVector3* pt3d=NULL,
3920 csVector3* rot=NULL,
3924 msg.AttachNew(
new MsgEntry(
sizeof(int32_t) * 5 + 3 *
sizeof(
float) + 3 *
sizeof(
float) + 2 *
sizeof(
bool)));
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);
4002 psCmdDropMessage(
int quantity, csString &itemName,
bool container,
bool guarded,
bool inplace);
4032 msg->clientnum = clientnum;
4058 msg.AttachNew(
new MsgEntry(guildMsg.Length()+1 + guild.Length() +1));
4068 guildmotd = me->
GetStr();
4069 if(!guildmotd.Length())
4070 guildmotd =
"(No message of the day.)";
4100 const csString &desc2s,
const csArray<NetworkDetailSkill> &skills2s,
const csString &desc_ooc,
const csString &creationinfo,
const csString &requestor);
4132 msg.AttachNew(
new MsgEntry(
sizeof(myself) +
sizeof(simple) + requestor.Length() + 1));
4137 msg->Add(requestor.GetData());
4144 requestor = me->
GetStr();
4175 msg.AttachNew(
new MsgEntry(newValue.Length() +1 +
sizeof(uint8_t)));
4180 msg->Add((uint8_t)desctype);
4266 uint32_t stackCount);
4365 uint32_t stackCount);
4420 void AddContents(
const char* name,
const char* meshName,
const char* materialName,
const char* icon,
int purifyStatus,
int slot,
int stack);
4423 void ConstructMsg(csStringSet* msgstrings);
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);
4517 psWriteBookMessage(uint32_t clientNum, csString &title, csString &content,
bool success,
int slotID,
int containerID);
4547 psReadBookTextMessage(uint32_t clientNum, csString &itemName, csString &bookText,
bool canWrite,
int slotID,
int containerID, csString backgroundImg);
4589 msg.AttachNew(
new MsgEntry(newValue.Length() + 1 +
sizeof(uint8_t)));
4591 msg->clientnum = clientnum;
4622 int trias,
int hexas,
int circles,
int octas);
4682 const csString &name,
4683 const csString &meshFactName,
4684 const csString &materialName,
4688 const csString &icon,
4689 csStringSet* msgstrings);
4842 void AddPlayer(EID
id);
4912 #define PINGFLAG_REQUESTFLAGS 0x0001 4913 #define PINGFLAG_READY 0x0002 4914 #define PINGFLAG_HASBEENREADY 0x0004 4915 #define PINGFLAG_SERVERFULL 0x0008 4920 psPingMsg(uint32_t client, uint32_t
id, uint8_t flags);
4982 psGMSpawnItems(uint32_t client,
const char* type,
unsigned int size);
5071 psGMSpawnMods(uint32_t client, csArray<ItemModifier>& imods);
5103 bool pickupableWeak,
5104 bool random =
false,
5105 float quality = 0.0f,
5106 csArray<uint32_t>* mods = 0
5123 bool lockable,locked,pickupable,collidable,
Unpickable,SettingItem,NPCOwned,Transient, pickupableWeak;
5159 msg->clientnum = client;
5175 if(!
string.Length())
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);
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);
5313 msg.AttachNew(
new MsgEntry(craftinfo.Length()+1));
5316 msg->clientnum = client;
5317 msg->Add(craftinfo.GetData());
5322 craftInfo = me->
GetStr();
5323 if(!craftInfo.Length())
5350 msg.AttachNew(
new MsgEntry(
string.Length()+1 +
sizeof(uint32_t)));
5353 msg->clientnum = client;
5354 msg->Add(targetID.Unbox());
5362 if(!
string.Length())
5390 msg.AttachNew(
new MsgEntry(
sizeof(uint32_t) + strlen(instructions)+1));
5393 msg->clientnum = client;
5395 msg->Add(instructions);
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)
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));
5429 msg->clientnum = client;
5433 msg->Add(sketch_def);
5434 msg->Add(rightToEditFlag);
5435 msg->Add(sketch_name);
5436 msg->Add(backgroundImg);
5447 backgroundImg = me->
GetStr();
5460 (void)accessPointers;
5461 return csString(
"not implemented");
5488 psMusicalSheetMessage(uint32_t client, uint32_t itemID,
bool readOnly,
bool play,
const char* songTitle,
const char* musicalSheet);
5502 return csString(
"not implemented");
5528 const char* instrName, uint32_t scoreSize,
const char* musicalScore);
5543 return csString(
"not implemented");
5580 psStopSongMessage(uint32_t client, uint32_t songID,
bool toPlayer, int8_t errorCode);
5595 return csString(
"not implemented");
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);
5652 bool IsNewerThan(uint8_t oldCounter);
5695 uint32_t gameID, uint8_t numUpdates, uint8_t* updates);
5710 bool IsNewerThan(uint8_t oldCounter);
5778 void Populate(csString &gmeventStr,
int clientnum);
5804 psGMEventInfoMessage(
int cnum,
int cmd,
int id,
const char* name,
const char* info,
bool Evaluatable =
false);
5854 void AddFaction(csString factionName,
int rating);
5985 psCachedFileMessage(uint32_t client, uint8_t sequence,
const char* pathname, iDataBuffer* contents);
6016 void BuildMsg(
int clientnum);
6034 void AddResponse(uint32_t
id,
const csString &menuText,
const csString &triggerText, uint32_t flags = 0x00);
6061 (void)accessPointers;
6062 return csString(
"Str: ") + str;
6108 const char* move,
const char* rot);
6121 return csString(
"not implemented");
6174 WORK_LOCATION_UPDATE
6196 bool choice,
const char* errorMsg);
6203 const char* script);
6209 const char* locationType,
const char* locationName);
6215 const char* workLocation,
bool workLocationValid,
6216 const char* script);
Character life additional data provided by players.
bool online
is the player online?
virtual csString ToString(NetBase::AccessPointers *accessPointers)
Converts the message into human readable string.
csString backgroundname
Name of the background to use instead of the normal one in delay.
uint minute
For Day/Night events.
uint8_t iChatType
type of message this is
psSlotMovementMsg(MsgEntry *me)
csString proposeMsg
Name of the character that we have to Propose.
bool msgStart
Indicates that this is a request to start the game.
Defines all the info about crafting for an item.
Message from the server to setup/update the minigame board on the client side.
EID entityid
The mapped id of the entity in question.
csString sText
the text the message contains
psGUIActiveMagicMessage(MsgEntry *message)
Crack this message off the network.
const csString & GetString() const
psCharCreateTraitsMessage(uint32_t client, csString &string)
psMsgCraftingInfo(uint32_t client, csString craftinfo)
Message from a client for a request to leave a chat channel.
Sends messages to the client indicating player combat stance.
Message sent from server to client if login was not valid.
DRDataFlags
Flags indicating what components are packed in this message.
csString psfMsgTypeName(int msgType)
uint8_t msgNumOfPieces
Number of available pieces.
psQuestionResponseMsg(int clientnum, uint32_t questionID, const csString &answer)
uint8_t msgNumOfChars
The number of characters for this account.
Message sent from server to client that holds random number (clientnum).
psCharCreateTraitsMessage(MsgEntry *me)
uint8_t msgNumUpdates
Number of updates in this message.
Used to check to see if a name chosen is a valid name to be picked from.
unsigned int menStaminaMax
int psfMsgType(const char *msgTypeName)
psTraitChangeMessage(MsgEntry *me)
uint16_t count
The index in the collection.
virtual ~psMessageCracker()
Class to send client directions on how to render a Sketch.
psTraitChangeMessage(uint32_t client, EID targetID, csString &string)
Struct used by MessageCracker and ToString to distribute a number of access pointers.
csArray< SPELL_TYPE > type
csString GetMsgTypeName(int msgType)
void FireEvent()
Publishes the message to the local program.
csString resolution
resolution of a closed petition
bool hasContents
True if this item is a container and has contents.
csString MounterAnim
The anim to be used by the mounter.
Sends messages to the server to indicate what to loot.
csString sectorName
Name of the sector.
psStopEffectMessage(MsgEntry *message)
Sets the amount of guild points assigned to a member.
Messages with system information sent to user.
Server sends back result of close petition.
Message to change a character's trait.
bool on_ground
Helps determine whether gravity applies.
virtual csString ToString(NetBase::AccessPointers *accessPointers)=0
Converts the message into human readable string.
psQuestRewardMessage(MsgEntry *me)
csString beltGroup
Used for belt groupings.
int client
The command type of message.
const char * itemIcon
The 2D graphic GUI image.
psGuildMOTDSetMessage(csString &guildMsg, csString &guild)
uint32_t msgGameID
Game ID (from action location ID).
const char * itemDescription
The description of this item or container.
bool Evaluatable
Stores if an event can be evaluated.
The structure of 1 queue entry (pointer to a message)
Messages sent from server to client containing each detailed combat event.
The message sent from client to server to request a char deletion.
psTutorialMessage(uint32_t client, uint32_t which, const char *instructions)
int16_t GetInt16()
Get a signed 16bit Integer from the current psMessageBytes buffer.
Message used by to send a musical sheet.
General Message for sending information about an item to a client.
sends a message tot he client with the attack queue list
virtual csString GetMessageTypeName() const =0
Gets the name of the message type.
Class to send a possibly cached file to the client.
csArray< BuddyData > buddies
iSector * sector
Ptr to sector for mesh.
This message is used by the server to activate one mechanism client side.
Message sent from server to client if login was valid.
Messages sent to user with petition information.
bool CanTransform
indicates whether the container can auto transform or not
int32_t GetInt32()
Get a signed 32Bit Integer from the current psMessageBytes buffer.
csString sOther
Name of the other person involved in this chat message (used only with some chat types) ...
Class to implement sequential delivery of net messages.
csString petition
petition text
uint32_t value
stance if COMBAT, duration if SPELL_CASTING, ...
float scale
Stores the scale of the actor. Total model scale.
uint8_t * msgUpdates
Array with updates for the game board.
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.
Message from a client for a request to join a chat channel.
csArray< NetworkDetailSkill > skills
General Message for sending information about an containter to a client.
The message sent from client to server on login.
csString removedMesh
Lists the mesh which should be removed when this item is equipped.
Server sends client basic data about guild.
psCharacterDescriptionUpdateMessage(MsgEntry *me)
float vel
The velocity of the actor.
unsigned short int gender
csArray< ItemDescription > items
csString assignedgm
the currently assigned GM
bool hasContents
True if this item is a container and has contents.
csSimpleRenderMesh simpleRenderMesh
The total number of meshes in this collection.
uint16_t index
Name of this collection of meshes.
const char * itemName
The name of the item or container.
csString sPerson
name of person this chat message comes from
csString cloakGroup
Used for cloak groupings.
#define PSF_DECLARE_MSG_FACTORY()
csArray< PlayerInfo > players
Sends messages to the client to control sequences.
int craftTime
The time when the crafting shall be ready.
This is a request for entire inventory.
unsigned int hitpointsMax
This message is sent to the client to let it know the basic stats of the player.
psTutorialMessage(MsgEntry *me)
Contains data for one petition.
int slotID
Where this item is in the container.
Server sends back result of descalation of petition.
csVector3 pos
Position vector.
int containerID
The container ID for this item.
csString bracerGroup
Used for bracers groupings.
csString created
date and time of creation
psCraftCancelMessage(MsgEntry *message)
psAdviceMessage(int clientNum, const char *command, const char *target, const char *message)
psStopEffectMessage(uint32_t clientNum, uint32_t uid)
Server sends back result of change petition.
psCharacterDetailsRequestMessage(MsgEntry *me)
Server sends back result of escalation of petition.
csString status
status of the petition
Notification of an item removed from an exchange.
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)
The psSkillCache class implements the skill cache both on the server and on the client.
unsigned int physStaminaMax
The message sent from client to server to request a cp value for creation.
Duration
The number associated to each duration is the number of sixteenths in that note.
This message is used by both server and client to stop a song.
this tell came from the server, not from another player
Used to hide members of secret guilds.
The message sent to the player being proposed for marriage.
bool GetBool()
Get a bool from the current psMessageBytes buffer.
csVector2 start
Start point of anmiation.
psGuildMOTDSetMessage(MsgEntry *me)
uint8_t msgCounter
Message counter for versioning.
bool translate
is the text supposed to be translated by psLocalization on target client ?
uint32_t options
Holds the options that the window should display.
Message sent from server to client containing the message strings hash table.
psBuddyStatus(MsgEntry *me)
psCharacterDescriptionUpdateMessage(csString &newValue, DESCTYPE desctype)
The message sent from client to server to request a new introduction.
Asks the user if they would like to duel.
Add this to velocity until told otherwise.
Handle scripting of hired NPCs.
A general question that may concern anything.
psMessageCracker * psfCreateMsg(int msgtype, MsgEntry *me, NetBase::AccessPointers *accessPointers)
int slotID
to identify which item this is later
csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
command to get informations on the specific event (description, evaluatable status) ...
GUI Active Magic Message.
The message is sent when someone requests marriage details of a player.
Sends messages to the client listing the assigned quests for the player.
Class to send instructions from server to client on a tutorial event.
uint32_t stackCount
Stack count of the item.
csArray< NetworkAttack > attacks
const char * GetStr()
Get a null-terminated string from the current psMessageBytes buffer.
Autoaway tell message, should be handled as CHAT_TELL, except for warning.
psSpellCancelMessage(MsgEntry *)
csVector2 dest
Destination point of animation.
All net messages inherit from this class.
int msgSize
Running count of message size. Used for constructing the outgoing message.
psMOTDMessage(uint32_t clientNum, const csString &tipMsg, const csString &motdMsg, const csString &guildMsg, const csString &guild)
float mountScale
Stores the scale of the mounted actor.
csString backgroundImg
The image which will be shown as a background of this book.
This object represents each NPC managed by this superclient.
int slotID
Where this item is in the container.
csString helmGroup
Used for helm groupings.
Clients asks server to change the guild member login/logout notification setting. ...
psSketchMessage(MsgEntry *me)
void psfUnRegisterMsgFactories(void)
Sends messages to the client listing the available loot on a mob.
psQuestionCancelMessage(MsgEntry *me)
bool only_carrying_digest
csArray< uint32 > duration
EID containerID
The EID for the container we're updating.
psMessageCracker *(* psfMsgFactoryFunc)(MsgEntry *me, NetBase::AccessPointers *accessPointers)
uint8_t * msgLayout
Array with the game board layout.
Message from the server to handle entrances into and out of map instances.
csArray< uint32_t > objectID
Spell Cancel Message This message is used to send a cancel message, and to send the time left before ...
int posInstance
Remember the position of the instance field in the generated message.
uint32_t msgGameID
Game ID (from the action location ID)
psQuestionCancelMessage(int clientnum, uint32_t id)
int to
The destination client for this message.
psSlotMovementMsg(int fromContainerID, int fromSlotID, int toContainerID, int toSlotID, int stackCount, csVector3 *pt3d=NULL, csVector3 *rot=NULL, bool guarded=true, bool inplace=true)
csArray< ItemModifier > mods
csArray< AAttack > attacks
The message sent from client to server before login.
csArray< psPetitionInfo > petitions
command to request the list of events
uint32_t GetUInt32()
Get an unsigned 4byte int from the current psMessageBytes buffer.
General Equipment Message.
csArray< csString > image
A request to start an exchange with your current target.
int8_t msgCols
Number of columns.
Server sends client data about guild levels.
server tells client to close GuildWindow
PID msgPlayerID
This is the ID which must be requested to instantiate the client player.
Sends messages to the client indicating that a sector portal has been crossed.
Notification of an item added to an exchange.
float yrot
Rotation around Y-axis in radians.
bool renameable
indicates whether the container is renameable or not
This class is the client's and server's main interface for either sending network messages out or get...
int id
unique id of the petition
uint32_t loadTime
time to wait even if there is no need to load
const char * itemName
The name of the item or container.
Messages that are sent to the GM GUI windowManager.
uint8_t msgCounter
Message counter for versioning.
Sends messages to the client listing the assigned events for the player.
Class to send a csSimpleRenderMesh to the client.
GUI Target Update This class is used to notify the client that data it is showing in the GUI target w...
Sends messages to the client listing the assigned quests for the player.
csVector3 worldVel
World velocity vector.
Server is returning a list of petitions.
csRef< iDataBuffer > databuf
float maxWeight
The total max weight the player can carry.
command to discard an event
csStringFast< 1024 > actionXML
psCharCreateTraitsMessage(csString &string)
float ang_vel
Angular velocity of Yrot member changing.
Server sends back result of deassignation of petition.
csString sectorName
Name of the sector.
float yrot
Rotation around Y-axis in radians.
unsigned int physStaminaMax
psStopEffectMessage(uint32_t uid)
csArray< ContainerContents > contents
Server sends back result of assignation of petition.
iSector * sector
Ptr to sector for mesh.
Class to send a single arbitrary string to the client or server.
int msgSize
Running count of message size. Used for constructing the outgoing message.
void psfRegisterMsgFactoryFunction(psfMsgFactoryFunc factoryfunc, int msgtype, const char *msgtypename)
psMsgCraftingInfo(MsgEntry *me)
csString characterName
The name of the character that the account user wants to use.
Server sends client data about guild members.
int escalation
the escalation level of the petition
Out of Character description.
Guild commands sent from client to server.
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
uint8_t * msgPieces
Available pieces (both white and black).
This is a request for inventory updates.
Normal character description.
Messages that are sent to/from the ActionManager.
psQuestionResponseMsg(MsgEntry *me)
psQuestionMessage(MsgEntry *me)
void SendMessage()
Sends the message to the client/server.
System messages that are also shown on the "Main" tab.
csString xml
Stores an xml string (various uses)
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
uint32_t msgClientValidToken
This must be returned by the client in all future messages to validate sender.
A small struct to hold item info after read out of message.
csString requestor
Weather simple description or full is requested.
Server sends client data about guild alliance.
csString oldSector
Holds the options that the window should display.
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
uint8_t GetUInt8()
Get an unsigned 8Bit Integer from the current psMessageBytes buffer.
Message from the client to start a minigame.
Messages from the server to the client, similar to combat events below, but for special attacks...
csPDelArray< FactionPair > factionInfo
Destination client.
Sends messages to the client informing of server-side movement lockouts.
uint32_t stackCount
Stack count of the item.
csString repairSlotName
The name of the slot to repair.
questionType_t
Various questions that are posed to the user.
unsigned int intelligence
Multiply this with movements.
triggered <on type="attack">
virtual csString ToString(NetBase::AccessPointers *accessPointers)
Converts the message into human readable string.
psAdviceMessage(MsgEntry *me)
Message sent with chat info.
EID actor
Keeps the eid of the originator client for chat bubbles.
int maxContainerSlots
The maximum number of slots available in this container.
uint16_t msgOptions
Game options.
Sends messages to the client interaction window.
Faction Message to get faction info from the server.
uint8_t counter
sequence checker byte
bool canWrite
whether or not to display the 'edit' button
psGUIActiveMagicMessage(uint32_t clientNum, csArray< ActiveSpell * > &spells, uint32_t index, csTicks serverTime)
psBuddyStatus(uint32_t clientNum, csString &buddyName, bool online)
Message from the client with a minigame board update.
const char * itemIcon
The 2D graphic GUI image.
unsigned short int gender
csArray< csString > types
virtual csString ToString(NetBase::AccessPointers *)
Converts the message into human readable string.
int to
The destination client for this message.
Messages sent by the user to the server with requests for petition information.
The message sent when someone divorces someone.
float GetFloat()
Get a float from the current psMessageBytes buffer.
psCharacterDetailsRequestMessage(bool myself, bool simple, const csString &requestor)
psQuestRewardMessage(uint32_t clientnum, csString &newValue, uint8_t type)
Server informs client that their petition list is dirty.
const char * itemDescription
The description of this item or container.
csArray< NetworkGlyph > glyphs
bool clearSlot
indicates if the slot should be cleared
uint8_t mode
Current character mode.
static MsgHandler * msghandler
psQuestionMessage(int clientnum, uint32_t questionID, const char *question, questionType_t type)
Sends messages to the client indicating rain and time of day.
float yrot
Rotation around Y-axis in radians.
int ContainerSlots
The slots available in this container.
csString loadWidget
The widget to replace the load window with.
unsigned int intelligence
csArray< NetworkSpell > spells
EID entranceID
The gem entity ID of the entrance object.
unsigned int hitpointsMax
csString player
the player
csString msgReason
This is something like "account not valid" or "password not valid.
csStringHashReversible * msgstrings
Message strings hash table pointer (null for outbound) This hash table will be allocated during messa...
csArray< uint32 > registrationTime
int posPlayerID
Remember the position the playerID in the generated message.
unsigned int menStaminaMax
int8_t msgRows
Number of rows.
int type
Holds the options that the window should display.
psMOTDRequestMessage(MsgEntry *)
void DecodeMessage(MsgEntry *me, NetBase::AccessPointers *accessPointers, bool filterhex, csString &msgText, int &filterNumber)
Message from the server with a channel id.
int containerID
The container ID for this item.
psMOTDMessage(MsgEntry *me)
Server sends back result of cancel petition.
Sets the maximum amount of guild points for the guild.
bool use_yrot
Use the yrot value to set the rotation.
Indicates that an OverrideAction is being done and not a loop as covered in DR msgs.
Clients changes right for guild level.
This message is used by the server to make clients play a song.
psPersistAllEntities(uint32_t client)