Zona Server Plugin API Document

Terazona C++ Server Plugin API Documentation

1.3

Zona Client API Document

Feedback

Copyright ©2002 Zona, inc. All rights reserved


ZonaBaseEntity.h File Reference

Go to the source code of this file.

Classes

class | ZonaBaseEntity

Defines

#define | _ZONABASEENTITY_H_INCLUDED_

Typedefs

typedef ZVector< ZonaBaseEntity * > | ZonaBaseEntityPtrVector

Define Documentation

#define _ZONABASEENTITY_H_INCLUDED_

Definition at line 6 of file ZonaBaseEntity.h.

Typedef Documentation

typedef ZVector<ZonaBaseEntity *> ZonaBaseEntityPtrVector

Definition at line 113 of file ZonaBaseEntity.h.


ZonaCharacterValidate.h File Reference

Go to the source code of this file.

Defines

#define | ZONA_USER_ROLE_UNKNOWN 0
#define | ZONA_USER_ROLE_SYSTEMADMIN 1
#define | ZONA_USER_ROLE_OVERLORD 2
#define | ZONA_USER_ROLE_GAMEMASTER 4
#define | ZONA_USER_ROLE_NPC 8
#define | ZONA_USER_ROLE_PLAYER 16

Functions

bool | onValidateCreateCharacter (ZonaServerCharacter *newCharacter)
This method is called in response to client calling createCharacter.

bool | onValidateUpdateCharacter (ZonaServerCharacter *newCharacter, ZonaServerCharacter *previousCharacter)
This method is called in response to client calling updateCharacter.

bool | onValidateDeleteCharacter (ZonaServerCharacter *character)
This method is called in response to client calling deleteCharacter.

Define Documentation

#define ZONA_USER_ROLE_UNKNOWN 0

Definition at line 19 of file ZonaCharacterValidate.h.

#define ZONA_USER_ROLE_SYSTEMADMIN 1

Definition at line 21 of file ZonaCharacterValidate.h.

#define ZONA_USER_ROLE_OVERLORD 2

Definition at line 23 of file ZonaCharacterValidate.h.

#define ZONA_USER_ROLE_GAMEMASTER 4

Definition at line 25 of file ZonaCharacterValidate.h.

#define ZONA_USER_ROLE_NPC 8

Definition at line 27 of file ZonaCharacterValidate.h.

#define ZONA_USER_ROLE_PLAYER 16

Definition at line 29 of file ZonaCharacterValidate.h.


ZonaChatGuildValidate.h File Reference

Go to the source code of this file.

Functions

bool | onValidateCreateChatGuild (ZonaServerGuild *guild, int entityId)
Validate creation of chat guild.

bool | onValidateDeleteChatGuild (ZonaServerGuild *guild, int entityId)
Validated deletion of chat guild.

bool | onValidateAddMemberToChatGuild (ZonaServerGuild *guild, int entityId)
Validate addition to chat guild.

bool | onValidateRemoveMemberFromChatGuild (ZonaServerGuild *guild, int entityId)
Validated member removal from chat guild.

bool | onValidateAddChatGuildModerator (ZonaServerGuild *guild, int memberId, int moderatorId)
Validated moderator addition to chat guild.

bool | onValidateRemoveChatGuildModerator (ZonaServerGuild *guild, int moderatorId)
Validated moderator deletion from chat guild, A moderator can only be deleted by itself.


ZonaEntityValidate.h File Reference

Go to the source code of this file.

Defines

#define | TYPE_STATE_PROPS 64
#define | TYPE_DISPLAY_PROPS 128
#define | TYPE_PRIVATE_PROPS 256
#define | TYPE_SYSTEM_PROPS 512
#define | ENTITY_UPDATE_TYPE 1
#define | ENTITY_UPDATE_ROLE 2
#define | ENTITY_UPDATE_MODE 3
#define | ENTITY_UPDATE_REGION 4
#define | ENTITY_UPDATE_PROPERTY 5

Functions

int | onEntityJoinedGame (ZonaServerEntity *entity)
Called when the client calls enter on a ZonaClientCharacter.

bool | onEntityDepartedGame (ZonaServerEntity *entity)
Called when the client calls exit on a ZonaClientCharacter.

bool | onEnterEntity (ZonaServerEntity *entity)
Called by the server to inform the plugin that it should start tracking the entity.

bool | onExitEntity (ZonaServerEntity *entity)
Called the server to inform the plugin that it should no longer track the entity This method will be called for master as well as replicated/ghost entities.

void | onNotifyEntityUpdate (ZonaServerEntity *entity, int flags)
Called to update the properties of an entity.

bool | onValidateEntityPropertyUpdate (ZonaServerEntity *entity, ZonaServerEntity *previousEntity)
Called to validate any update to entity properties by the client.

bool | onValidateTransferEntity (int childEntityId, int currentParentId, int newParentId)
Called when a client invokes acquireChildEntity(...)/releaseChileEntity(...) This method is called on the GSS, where the new parent is a master.

void | onNotifyTransferEntity (int childEntityId, int prevParentId, int newParentId)
Called to update the parent id of a child entity.

bool | onValidateCreateChildEntity (ZonaServerEntity *newChildEntity)
Called when a client invokes createSingleChildEntity(..) or createMultipleChildEntities(..) The implementation must validate the creation and must return true.

bool | onValidateDeleteChildEntity (ZonaServerEntity *entity)
Called when a client invokes deleteChildEntity(...) The implementation must validate the deletion request and return true if valid.

bool | onValidateEntityTypeUpdate (ZonaServerEntity *entity, int newType)
Called when the client invokes hide(), show() attach() or detach() on an instance of ZonaClientEntity object.

void | onReceiveUpdateToEntity (ZonaServerEntity *entity, byte *gsm, short size)
Called when a GGS tried to invoke sendUpdateToEntity() This call will either happen in a GSS that owns entity which is online, or happen inside GGS if the entity if offline.

Variables

int | ET_DEFAULT = 0
int | ET_IS_HIDDEN = 1
Entity is not perceived by other entities, but will see other entities.

int | ET_IS_ATTACHED = 2
Entity's region id is always assumed to be that of its parent's.

int | ET_RESERVED_2 = 4
int | ET_RESERVED_3 = 8
int | ET_RESERVED_4 = 16
int | ET_RESERVED_5 = 32
int | ET_RESERVED_6 = 64
int | ET_RESERVED_7 = 128
int | ET_RESERVED_8 = 256


ZonaGameGuildValidate.h File Reference

Go to the source code of this file.

Classes

struct | GuildGameStateRecord
Structure used to represent a validated Game Guild state record. More...

Functions

bool | onValidateCreateGameGuild (ZonaServerGuild *guild, int entityId)
Called when an entity attempts to create a game guild.

bool | onValidateDeleteGameGuild (ZonaServerGuild *guild, int entityId)
Called when an entity attempts to delete a game guild.

bool | onValidateLoadGameGuild (ZonaServerGuild *guild)
Called when a guild is loaded into the GSS.

bool | onValidateInviteMember (ZonaServerGuild *guild, int inviterId, int inviteeId)
Called when a member tries to invite another entity to join the guild.

bool | onValidateKickMember (ZonaServerGuild *guild, int memberId, int targetId)
Called when a member tries to kick another member out of the guild.

bool | onValidateAddGameGuildModerator (ZonaServerGuild *guild, int memberId, int moderatorId)
Called when a member attempts to add a moderator to the guild.

bool | onValidateRemoveGameGuildModerator (ZonaServerGuild *guild, int moderatorId)
Called when a member attempts to remove a moderator from the guild.

bool | onValidateJoinGameGuild (ZonaServerGuild *guild, int entityId)
Called when an entity attempts to join a guild.

bool | onValidateLeaveGameGuild (ZonaServerGuild *guild, int entityId)
Called when a member attempts to leave a guild.

bool | onValidateEnterGameGuild (ZonaServerGuild *guild, int entityId)
Called when a member attempts to enter a guild.

bool | onValidateExitGameGuild (ZonaServerGuild *guild, int entityId)
Called when a member attempts to exits a guild.

bool | onValidateGameGuildGameState (ZonaServerGuild *guild, int entityId, char *stateData, int stateLength)
Called when a member sends a game state to the guild.

bool | onValidateGameGuildChat (ZonaServerGuild *guild, int entityId, char *chatSubject, int subjectLength, char *chatBody, int bodyLength)
Called when a member sends a chat message to the guild.

bool | onValidateGameGuildEntityPropertyUpdate (ZonaServerGuild *guild, ZonaServerEntity *entity, ZonaServerEntity *previousEntity)
Called when a member sends an entity Update to the guild.

Function Documentation

bool onValidateCreateGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when an entity attempts to create a game guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity that creates the guild.
Returns:
True, on success. False on failure.

bool onValidateDeleteGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when an entity attempts to delete a game guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The entity that requested the guild delete.
Returns:
True, on success. False on failure.

bool onValidateLoadGameGuild ( ZonaServerGuild * guild )

Called when a guild is loaded into the GSS.

This typically happens when a member tries to enter a guild which is dormant.

Parameters:
guild The server represntation of the guild object.
Returns:
True, on success. False on failure.

bool onValidateInviteMember | ( | ZonaServerGuild * | guild,
 |  | int | inviterId,
 |  | int | inviteeId
 | ) |

Called when a member tries to invite another entity to join the guild.

Parameters:
guild | The server represntation of the guild object.
inviterId | The id of the inviter entity.
inviteeId | The id of the invitee entity.
Returns:
True, on success. False on failure.

bool onValidateKickMember | ( | ZonaServerGuild * | guild,
 |  | int | memberId,
 |  | int | targetId
 | ) |

Called when a member tries to kick another member out of the guild.

Parameters:
guild | The server represntation of the guild object.
memberId | The id of the entity initiating the kick.
targetId | The id of the entity being kicked out.
Returns:
True, on success. False on failure.

bool onValidateAddGameGuildModerator | ( | ZonaServerGuild * | guild,
 |  | int | memberId,
 |  | int | moderatorId
 | ) |

Called when a member attempts to add a moderator to the guild.

Parameters:
guild | The server represntation of the guild object.
memberId | The id of the entity requesting an add moderator.
moderatorId | The id of the entity which is to be made a moderator.
Returns:
True, on success. False on failure.

bool onValidateRemoveGameGuildModerator | ( | ZonaServerGuild * | guild,
 |  | int | moderatorId
 | ) |

Called when a member attempts to remove a moderator from the guild.

A moderator can only unset itself.

Parameters:
guild | The server represntation of the guild object.
moderatorId | The id of the entity which is unset as moderator.
Returns:
True, on success. False on failure.

bool onValidateJoinGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when an entity attempts to join a guild.

An entity can only join in response to an invite.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity joining the guild.
Returns:
True, on success. False on failure.

bool onValidateLeaveGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when a member attempts to leave a guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity leaving the guild.
Returns:
True, on success. False on failure.

bool onValidateEnterGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when a member attempts to enter a guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity entering the guild.
Returns:
True, on success. False on failure.

bool onValidateExitGameGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Called when a member attempts to exits a guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity exiting the guild.
Returns:
True, on success. False on failure.

bool onValidateGameGuildGameState | ( | ZonaServerGuild * | guild,
 |  | int | entityId,
 |  | char * | stateData,
 |  | int | stateLength
 | ) |

Called when a member sends a game state to the guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity sending the gamestate.
stateData | The actual game state data
stateLength | The length of the game state data
Returns:
True, on success. False on failure.

bool onValidateGameGuildChat | ( | ZonaServerGuild * | guild,
 |  | int | entityId,
 |  | char * | chatSubject,
 |  | int | subjectLength,
 |  | char * | chatBody,
 |  | int | bodyLength
 | ) |

Called when a member sends a chat message to the guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity sending the chat message.
chatSubject | The body of the chat message.
subjectLength | The length of chat subject.
chatBody | The body of the chat message.
bodyLength | The length of chat message body.
Returns:
True, on success. False on failure.

bool onValidateGameGuildEntityPropertyUpdate | ( | ZonaServerGuild * | guild,
 |  | ZonaServerEntity * | entity,
 |  | ZonaServerEntity * | previousEntity
 | ) |

Called when a member sends an entity Update to the guild.

Parameters:
guild | The server represntation of the guild object.
entity | The ZonaServerEntity object associated with the entity
previousEntity | The previous ZonaServerEntity
Returns:
True, on success. False on failure.


ZonaGameStateValidate.h File Reference

Go to the source code of this file.

Classes

struct | GameStateRecord
Structure used to represent a validated state record. More...

Functions

void | onValidateGameStateMsg (ZonaServerEntity *entity, byte *gsm, short size)
Called when server receives new data from the client.

void | onNotifyGameStateMsgUpdate (ZonaServerEntity *entity, byte *gsm, short size)
Called to update the replicated copies (ghost) after the master server publishes the validated game state message for the master entity.


ZonaGSPublish.h File Reference

Go to the source code of this file.

Defines

#define | PUB_OP_DISCARD 1
Message will be discarded and not published.

#define | PUB_OP_CLIENT_PRIVATE 2
In addition to the message being published to all the entities within the sphere it is also sent back to the entity.

#define | PUB_QOM_0 0
The quality of the message QOM_3 being the highest quality.

#define | PUB_QOM_1 4
#define | PUB_QOM_2 8
#define | PUB_QOM_3 12
#define | PUB_OP_CLIENTS 16
#define | PUB_OP_SERVERS 32
#define | PUB_OP_MASTER_ENTITY 64

Typedefs

typedef unsigned char | byte

Functions

void | getZAFLibVersion (char *versionStr)
Returns string containing version in format of major.minor.patch (build#).

bool | deleteEntity (int entityId)
Deletes the entity permanently from the database and exits the entity from the database.

bool | publishGameStateMsgInSphere (int mapId, int regionId, int qos, int operation, byte *gsm, short size)
Publish a game state message to all the entities in the entity's sphere Only those clients subscribed to receive game states will receive the messages.

bool | publishGameStateMsgToEntity (int recipientEntityId, int qos, int operation, byte *gsm, short size)
Publish a game state message to the entity only.

bool | publishGameStateMsgToAllMasterEntities (int qos, int operation, byte *stateData, short dataSize)
Publish a game state message to the all the Master entities.

bool | publishGameStateMsgInGuild (int guildId, int entityId, int operation, int qos, byte *stateData, short stateSize)
Publish a game state message to game guild specified.

bool | sendUpdateToEntity (int guildId, int entityId, byte *stateData, short stateSize)
Send a game state message update to the master GSS that owns the entity.

int | getMillsSinceLogin (int anEntityId)
Get time since character has logged on.

GameStateRecord * getCurrentGameStateRecord ()
Get Current game state record.

GuildGameStateRecord * getCurrentGuildGameStateRecord ()
Get Current Guild Game state record.

GameStateRecord * | createNewGameStateRecord (int length, byte *entityDataPtr)
Get pointer to a new game state record allocated in shared memory.

int | setEntityLevelTimerEvent (int entityId, long delay, byte *eventData, short size, int period)
Called to set a timer event associated with an Entity.

int | setRegionLevelTimerEvent (int mapId, int regionId, long delay, byte *eventData, short size, int period)
Called to set a timer event for a Region .

int | setGSSLevelTimerEvent (long delay, byte *eventData, short size, int period)
Called to set a timer event for the local server .

int | setWorldLevelTimerEvent (long delay, byte *eventData, short size, int period)
Called to set a Global timer event.

bool | cancelTimerEvent (int eventId)
Called to cancel a previously set timer event.

ZonaServerEntity * | getEntityWithId (int entityId)
Called retrieve entity object from Entity Manager.

int | getAllEntities (ZonaBaseEntityPtrVector *zbepv)
Called to retrieve all entity objects in the Entity Manager The returned method returns all entities including ghost (replicated) entities.

ZonaServerGuild * | getGuildWithId (int guildId)
Called retrieve server guild object from Entity Manager.

void | setGlobalProperty (char *key, char *value, short size)
Called to set or update a property in global property cache This will cause onNotifyPropertyUpdate to be called on other GSSes.

void | deleteGlobalProperty (char *key)
Called to delete a property in global property cache This will cause onNotifyPropertyDelete to be called on other GSSes.

void | setMapSize (int mapId, int maxSizeX, int maxSizeY, int maxSizeZ)
This function is only used for visualization.

void | updatePlayerPosition (int eid, int x, int y, int z)
This function is only used for visualization.

void | updatePlayerScore (int eid, int score)
This function to display high scores in ZonaAdmin.

bool | isGuildMemberOnLine (int eid)
This function returns if the guild member entity is online This method should only be called on the Guild Server plugin instance.

void | _createNewZMORecord (short classId, short dataLen, char *data, int operation)
void | _createNewZMO (ZonaModelerObject *zmo)
void | createNewGuildMembership (ZonaServerGuildMembership *membership)
void | removeMembership (ZonaServerGuildMembership *membership)

Function Documentation

void _createNewZMORecord | ( | short | classId,
 |  | short | dataLen,
 |  | char * | data,
 |  | int | operation
 | ) |

void _createNewZMO ( ZonaModelerObject * zmo )

void createNewGuildMembership ( ZonaServerGuildMembership * membership )

void removeMembership ( ZonaServerGuildMembership * membership )


ZonaRegionValidate.h File Reference

Go to the source code of this file.

Functions

bool | onPlaceEntityInRegion (ZonaServerEntity *entity, int mapId, int regionId)
Called during initial placement of entity in a region.

void | onLoadMap (int mapId)
Called by the server to load a particular map.

int | onGetRegionCount (int mapId)
Called immediately after a map is loaded.

int * | onGetRegionNeighbors (int mapId, int regionId, byte regionCoverage, unsigned int *numIds)
The server lazily (as is required) loads the neighbors for each region.

int | onGetMapDimensionX (int mapId)
Called immediately after a map is loaded for region visualization.

int | onGetMapDimensionY (int mapId)
Called immediately after a map is loaded for region visualization.

int | onGetMapDimensionZ (int mapId)
Called immediately after a map is loaded for region visualization.


ZonaServerCharacter.h File Reference

Go to the source code of this file.

Classes

class | ZonaServerCharacter

Defines

#define | AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_

Define Documentation

#define AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_

Definition at line 6 of file ZonaServerCharacter.h.


ZonaServerEntity.h File Reference

Go to the source code of this file.

Classes

class | ZonaServerEntity

Defines

#define | AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_

Define Documentation

#define AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_

Definition at line 6 of file ZonaServerEntity.h.


ZonaSystem.h File Reference

Go to the source code of this file.

Typedefs

typedef unsigned char | byte

Functions

bool | onInitialization ()
Called once during server startup.

bool | onDestruction ()
Called once during server shutdown.

char * | onGetGamePluginVersion ()
This function should return a string that marks the version of server side game code.

bool | onValidateClientVersion (byte *clientVersion, short size)
Called when the client logs in to verify client version.

void | onNotifyGlobalPropertyUpdate (const char *key, char *value, short size)
Called when a remote GSS updates the Global property cache.

void | onNotifyGlobalPropertyDelete (const char *key)
Called when a remote GSS deletes a property from Global property cache.

void | onDebugCmd (const char *cmd)
Upon typing a "plugin {cmd}" in the gss console, the {cmd} string is passed into plugin to help developers assist in their debugging efforts during run-time.

void | zprintf (const char *fmt,...)
Will print a message to the console just like printf Checks for g_debug == true and will call fflush(stdout) to force the print.

Variables

bool | g_zonaDebug


ZonaTimerEvents.h File Reference

Go to the source code of this file.

Functions

void | onEntityTimerEvent (int eventId, ZonaServerEntity *entity, byte *eventData, short eventDataSize)
Called when a timer event for an Entity is fired.

void | onLoggedOutEntityTimerEvent (int eventId, ZonaServerEntity *entity, byte *eventData, short eventDataSize)
Called when a timer event for an Entity that already has logged out is fired.

void | onRegionTimerEvent (int eventId, int mapId, int regionId, byte *eventData, short size)
Called when timer event for Region is fired.

void | onGSSTimerEvent (int eventId, byte *eventData, short size)
Called when timer event for local GSS server is fired.

void | onWorldTimerEvent (int eventId, byte *eventData, short size)
Called when a Global/World timer event in fired.


GameStateRecord Struct Reference
[ZonaGameStateValidate]

Structure used to represent a validated state record. More...

List of all members.

Public Attributes

int | recordType
int | entityId
int | entityType
int | entityRegionId
int | entityMapId
int | stateDataOffset
int | operation
int | stateDataLen
char * | stateData

Detailed Description

Structure used to represent a validated state record.

Definition at line 24 of file ZonaGameStateValidate.h.

Member Data Documentation

int recordType

Definition at line 25 of file ZonaGameStateValidate.h.

int entityId

Definition at line 26 of file ZonaGameStateValidate.h.

int entityType

Definition at line 27 of file ZonaGameStateValidate.h.

int entityRegionId

Definition at line 28 of file ZonaGameStateValidate.h.

int entityMapId

Definition at line 29 of file ZonaGameStateValidate.h.

int stateDataOffset

Definition at line 30 of file ZonaGameStateValidate.h.

int operation

Definition at line 32 of file ZonaGameStateValidate.h.

int stateDataLen

Definition at line 37 of file ZonaGameStateValidate.h.

char* stateData

Definition at line 40 of file ZonaGameStateValidate.h.

The documentation for this struct was generated from the following file:
  • ZonaGameStateValidate.h


GuildGameStateRecord Struct Reference

Structure used to represent a validated Game Guild state record. More...

List of all members.

Public Attributes

int | recordType
int | guildId
int | entityId
int | stateDataOffset
int | operation
int | stateDataLen
char * | stateData

Detailed Description

Structure used to represent a validated Game Guild state record.

Definition at line 196 of file ZonaGameGuildValidate.h.

Member Data Documentation

int recordType

Definition at line 198 of file ZonaGameGuildValidate.h.

int guildId

Definition at line 199 of file ZonaGameGuildValidate.h.

int entityId

Definition at line 200 of file ZonaGameGuildValidate.h.

int stateDataOffset

Definition at line 201 of file ZonaGameGuildValidate.h.

int operation

Definition at line 203 of file ZonaGameGuildValidate.h.

int stateDataLen

Definition at line 206 of file ZonaGameGuildValidate.h.

char* stateData

Definition at line 209 of file ZonaGameGuildValidate.h.

The documentation for this struct was generated from the following file:
  • ZonaGameGuildValidate.h


ZonaBaseEntity Class Reference

Inheritance diagram for ZonaBaseEntity:

ZonaServerEntity ZonaServerCharacter List of all members.

Public Member Functions

ZonaBaseEntity (int type)
Constructor.

ZonaBaseEntity ()
Constructor.

virtual | ~ZonaBaseEntity ()
Destructor.

virtual int | getEntityId ()=0
Return current Entity Id.

virtual int | getParentId ()=0
Return parent's entity id.

virtual int | getEntityType ()=0
Return entity's type.

virtual int | getEntityInfo ()=0
Return user defined entity information.

virtual int | getMapId ()=0
Return entity's mapId.

virtual void | setEntityId (int value)=0
Set the Id of current entity.

virtual void | setParentId (int value)=0
Set Parent Entity Id.

virtual void | setEntityType (int value)=0
Set Entity Type.

virtual void | setEntityInfo (int value)=0
Set Entity Info.

virtual void | setMapId (int value)=0
Set Entity's Map Id.

virtual void | setIsMaster (bool value)=0
virtual bool | getIsMaster ()=0

Constructor & Destructor Documentation

ZonaBaseEntity ( int type )

Constructor.

ZonaBaseEntity ( )

Constructor.

virtual ~ZonaBaseEntity ( ) [virtual]

Destructor.

Member Function Documentation

virtual int getEntityId ( ) [pure virtual]

Return current Entity Id.

Returns:
entity id

virtual int getParentId ( ) [pure virtual]

Return parent's entity id.

Returns:
entity parent id

virtual int getEntityType ( ) [pure virtual]

Return entity's type.

Returns:
entity's type

virtual int getEntityInfo ( ) [pure virtual]

Return user defined entity information.

Returns:
user defined entity information

virtual int getMapId ( ) [pure virtual]

Return entity's mapId.

Returns:
entity map Id

virtual void setEntityId ( int value ) [pure virtual]

Set the Id of current entity.

Parameters:
value Entity id of current entity

virtual void setParentId ( int value ) [pure virtual]

Set Parent Entity Id.

Parameters:
value Entity id of parent entity

virtual void setEntityType ( int value ) [pure virtual]

Set Entity Type.

Parameters:
value | Entity type
value | Entity type of parent entity

virtual void setEntityInfo ( int value ) [pure virtual]

Set Entity Info.

Parameters:
value user defined Entity Info,

virtual void setMapId ( int value ) [pure virtual]

Set Entity's Map Id.

Parameters:
value Map id of entity

virtual void setIsMaster ( bool value ) [pure virtual]

virtual bool getIsMaster ( ) [pure virtual]

The documentation for this class was generated from the following file:
  • ZonaBaseEntity.h


ZonaServerCharacter Class Reference

Inheritance diagram for ZonaServerCharacter:

ZonaServerEntity ZonaBaseEntity List of all members.

Public Member Functions

ZonaServerCharacter (int type)
Constructor.

ZonaServerCharacter ()
Constructor.

virtual | ~ZonaServerCharacter ()
Destructor.

virtual char * | getName (int &len)=0
Get the name for this character.

virtual void | setName (char *name, int len)=0
Set the name for this character.

virtual void | setMaster (bool val)
Specify whether this entity is Master entity.

virtual bool | getMaster ()
Check if this entity is master entity.

virtual int | getRegionId ()=0
Get the region id of this entity.

virtual void | setRegionId (int value)=0
Set the region id of this entity.

void | save (bool shouldAudit)
Save the entity to database.

void | exit ()
void | _setZMBlob (char *memPtr)
Internal method.

char * | _getZMBlob ()
Internal method.

void | _updatePropertiesFromSharedArea ()
Internal method.

void | _copyDirtyPropertiesToSharedArea ()
Internal method.

virtual int | getEntityId ()=0
Return current Entity Id.

virtual int | getParentId ()=0
Return parent's entity id.

virtual int | getEntityType ()=0
Return entity's type.

virtual int | getEntityInfo ()=0
Return user defined entity information.

virtual int | getMapId ()=0
Return entity's mapId.

virtual void | setEntityId (int value)=0
Set the Id of current entity.

virtual void | setParentId (int value)=0
Set Parent Entity Id.

virtual void | setEntityType (int value)=0
Set Entity Type.

virtual void | setEntityInfo (int value)=0
Set Entity Info.

virtual void | setMapId (int value)=0
Set Entity's Map Id.

virtual void | setIsMaster (bool value)=0
virtual bool | getIsMaster ()=0

Protected Member Functions

virtual void | setProperty (int fieldIndex, SlicedByteArray *val)
over-ridden to call publish,

virtual void | publish ()
This function notifies the server, that the entity updates are ready to be published It provides a mechanism to group together entity property updates, before commiting it to the system.

Constructor & Destructor Documentation

ZonaServerCharacter ( int type )

Constructor.

ZonaServerCharacter ( ) [inline]

Constructor.

Definition at line 35 of file ZonaServerCharacter.h.

virtual ~ZonaServerCharacter ( ) [virtual]

Destructor.

Member Function Documentation

virtual char* getName ( int & len ) [pure virtual]

Get the name for this character.

Parameters:
len Reference of int for return of string length
Returns:
char pointer to name

virtual void setName | ( | char * | name,
 |  | int | len
 | ) | [pure virtual]

Set the name for this character.

Parameters:
name | char pointer to name
len | Size of char*

virtual void setMaster ( bool val ) [virtual, inherited]

Specify whether this entity is Master entity.

Parameters:
val true if this entity is in Master GSS, else false

virtual bool getMaster ( ) [virtual, inherited]

Check if this entity is master entity.

Returns:
true if it is Master entity, else false.

virtual int getRegionId ( ) [pure virtual, inherited]

Get the region id of this entity.

Returns:
region id

virtual void setRegionId ( int value ) [pure virtual, inherited]

Set the region id of this entity.

Parameters:
value region id

void save ( bool shouldAudit ) [inherited]

Save the entity to database.

Parameters:
shouldAudit if true, the content will be audited by Audit server.

void exit ( ) [inherited]

void _setZMBlob ( char * memPtr ) [inherited]

Internal method.

Should not be called by game code.

char* _getZMBlob ( ) [inherited]

Internal method.

Should not be called by game code.

void _updatePropertiesFromSharedArea ( ) [inherited]

Internal method.

Should not be called by game code.

void _copyDirtyPropertiesToSharedArea ( ) [inherited]

Internal method.

Should not be called by game code.

virtual void setProperty | ( | int | fieldIndex,
 |  | SlicedByteArray * | val
 | ) | [protected, virtual, inherited]

over-ridden to call publish,

virtual void publish ( ) [protected, virtual, inherited]

This function notifies the server, that the entity updates are ready to be published It provides a mechanism to group together entity property updates, before commiting it to the system.

Returns:
void

virtual int getEntityId ( ) [pure virtual, inherited]

Return current Entity Id.

Returns:
entity id

virtual int getParentId ( ) [pure virtual, inherited]

Return parent's entity id.

Returns:
entity parent id

virtual int getEntityType ( ) [pure virtual, inherited]

Return entity's type.

Returns:
entity's type

virtual int getEntityInfo ( ) [pure virtual, inherited]

Return user defined entity information.

Returns:
user defined entity information

virtual int getMapId ( ) [pure virtual, inherited]

Return entity's mapId.

Returns:
entity map Id

virtual void setEntityId ( int value ) [pure virtual, inherited]

Set the Id of current entity.

Parameters:
value Entity id of current entity

virtual void setParentId ( int value ) [pure virtual, inherited]

Set Parent Entity Id.

Parameters:
value Entity id of parent entity

virtual void setEntityType ( int value ) [pure virtual, inherited]

Set Entity Type.

Parameters:
value | Entity type
value | Entity type of parent entity

virtual void setEntityInfo ( int value ) [pure virtual, inherited]

Set Entity Info.

Parameters:
value user defined Entity Info,

virtual void setMapId ( int value ) [pure virtual, inherited]

Set Entity's Map Id.

Parameters:
value Map id of entity

virtual void setIsMaster ( bool value ) [pure virtual, inherited]

virtual bool getIsMaster ( ) [pure virtual, inherited]

The documentation for this class was generated from the following file:
  • ZonaServerCharacter.h


ZonaServerEntity Class Reference

Inheritance diagram for ZonaServerEntity:

ZonaBaseEntity ZonaServerCharacter List of all members.

Public Member Functions

ZonaServerEntity (int type)
Constructor.

ZonaServerEntity ()
Constructor.

virtual | ~ZonaServerEntity ()
Destructor.

virtual void | setMaster (bool val)
Specify whether this entity is Master entity.

virtual bool | getMaster ()
Check if this entity is master entity.

virtual int | getRegionId ()=0
Get the region id of this entity.

virtual void | setRegionId (int value)=0
Set the region id of this entity.

void | save (bool shouldAudit)
Save the entity to database.

void | exit ()
void | _setZMBlob (char *memPtr)
Internal method.

char * | _getZMBlob ()
Internal method.

void | _updatePropertiesFromSharedArea ()
Internal method.

void | _copyDirtyPropertiesToSharedArea ()
Internal method.

virtual int | getEntityId ()=0
Return current Entity Id.

virtual int | getParentId ()=0
Return parent's entity id.

virtual int | getEntityType ()=0
Return entity's type.

virtual int | getEntityInfo ()=0
Return user defined entity information.

virtual int | getMapId ()=0
Return entity's mapId.

virtual void | setEntityId (int value)=0
Set the Id of current entity.

virtual void | setParentId (int value)=0
Set Parent Entity Id.

virtual void | setEntityType (int value)=0
Set Entity Type.

virtual void | setEntityInfo (int value)=0
Set Entity Info.

virtual void | setMapId (int value)=0
Set Entity's Map Id.

virtual void | setIsMaster (bool value)=0
virtual bool | getIsMaster ()=0

Protected Member Functions

virtual void | setProperty (int fieldIndex, SlicedByteArray *val)
over-ridden to call publish,

virtual void | publish ()
This function notifies the server, that the entity updates are ready to be published It provides a mechanism to group together entity property updates, before commiting it to the system.

Constructor & Destructor Documentation

ZonaServerEntity ( int type )

Constructor.

ZonaServerEntity ( ) [inline]

Constructor.

Definition at line 35 of file ZonaServerEntity.h.

virtual ~ZonaServerEntity ( ) [virtual]

Destructor.

Member Function Documentation

virtual void setMaster ( bool val ) [virtual]

Specify whether this entity is Master entity.

Parameters:
val true if this entity is in Master GSS, else false

virtual bool getMaster ( ) [virtual]

Check if this entity is master entity.

Returns:
true if it is Master entity, else false.

virtual int getRegionId ( ) [pure virtual]

Get the region id of this entity.

Returns:
region id

virtual void setRegionId ( int value ) [pure virtual]

Set the region id of this entity.

Parameters:
value region id

void save ( bool shouldAudit )

Save the entity to database.

Parameters:
shouldAudit if true, the content will be audited by Audit server.

void exit ( )

void _setZMBlob ( char * memPtr )

Internal method.

Should not be called by game code.

char* _getZMBlob ( )

Internal method.

Should not be called by game code.

void _updatePropertiesFromSharedArea ( )

Internal method.

Should not be called by game code.

void _copyDirtyPropertiesToSharedArea ( )

Internal method.

Should not be called by game code.

virtual void setProperty | ( | int | fieldIndex,
 |  | SlicedByteArray * | val
 | ) | [protected, virtual]

over-ridden to call publish,

virtual void publish ( ) [protected, virtual]

This function notifies the server, that the entity updates are ready to be published It provides a mechanism to group together entity property updates, before commiting it to the system.

Returns:
void

virtual int getEntityId ( ) [pure virtual, inherited]

Return current Entity Id.

Returns:
entity id

virtual int getParentId ( ) [pure virtual, inherited]

Return parent's entity id.

Returns:
entity parent id

virtual int getEntityType ( ) [pure virtual, inherited]

Return entity's type.

Returns:
entity's type

virtual int getEntityInfo ( ) [pure virtual, inherited]

Return user defined entity information.

Returns:
user defined entity information

virtual int getMapId ( ) [pure virtual, inherited]

Return entity's mapId.

Returns:
entity map Id

virtual void setEntityId ( int value ) [pure virtual, inherited]

Set the Id of current entity.

Parameters:
value Entity id of current entity

virtual void setParentId ( int value ) [pure virtual, inherited]

Set Parent Entity Id.

Parameters:
value Entity id of parent entity

virtual void setEntityType ( int value ) [pure virtual, inherited]

Set Entity Type.

Parameters:
value | Entity type
value | Entity type of parent entity

virtual void setEntityInfo ( int value ) [pure virtual, inherited]

Set Entity Info.

Parameters:
value user defined Entity Info,

virtual void setMapId ( int value ) [pure virtual, inherited]

Set Entity's Map Id.

Parameters:
value Map id of entity

virtual void setIsMaster ( bool value ) [pure virtual, inherited]

virtual bool getIsMaster ( ) [pure virtual, inherited]

The documentation for this class was generated from the following file:
  • ZonaServerEntity.h


Here is a list of all class members with links to the classes they belong to:

- _ -

  • _copyDirtyPropertiesToSharedArea() : ZonaServerEntity
  • _getZMBlob() : ZonaServerEntity
  • _setZMBlob() : ZonaServerEntity
  • _updatePropertiesFromSharedArea() : ZonaServerEntity

- e -

  • entityId : GuildGameStateRecord, GameStateRecord
  • entityMapId : GameStateRecord
  • entityRegionId : GameStateRecord
  • entityType : GameStateRecord
  • exit() : ZonaServerEntity

- g -

  • getEntityId() : ZonaBaseEntity
  • getEntityInfo() : ZonaBaseEntity
  • getEntityType() : ZonaBaseEntity
  • getIsMaster() : ZonaBaseEntity
  • getMapId() : ZonaBaseEntity
  • getMaster() : ZonaServerEntity
  • getName() : ZonaServerCharacter
  • getParentId() : ZonaBaseEntity
  • getRegionId() : ZonaServerEntity
  • guildId : GuildGameStateRecord

- o -

  • operation : GuildGameStateRecord, GameStateRecord

- p -

  • publish() : ZonaServerEntity

- r -

  • recordType : GuildGameStateRecord, GameStateRecord

- s -

  • save() : ZonaServerEntity
  • setEntityId() : ZonaBaseEntity
  • setEntityInfo() : ZonaBaseEntity
  • setEntityType() : ZonaBaseEntity
  • setIsMaster() : ZonaBaseEntity
  • setMapId() : ZonaBaseEntity
  • setMaster() : ZonaServerEntity
  • setName() : ZonaServerCharacter
  • setParentId() : ZonaBaseEntity
  • setProperty() : ZonaServerEntity
  • setRegionId() : ZonaServerEntity
  • stateData : GuildGameStateRecord, GameStateRecord
  • stateDataLen : GuildGameStateRecord, GameStateRecord
  • stateDataOffset : GuildGameStateRecord, GameStateRecord

- z -

  • ZonaBaseEntity() : ZonaBaseEntity
  • ZonaServerCharacter() : ZonaServerCharacter
  • ZonaServerEntity() : ZonaServerEntity

- ~ -

  • ~ZonaBaseEntity() : ZonaBaseEntity
  • ~ZonaServerCharacter() : ZonaServerCharacter
  • ~ZonaServerEntity() : ZonaServerEntity


ZonaPublish

Defines

#define | PUB_OP_DISCARD 1
Message will be discarded and not published.

#define | PUB_OP_CLIENT_PRIVATE 2
In addition to the message being published to all the entities within the sphere it is also sent back to the entity.

#define | PUB_QOM_0 0
The quality of the message QOM_3 being the highest quality.

#define | PUB_QOM_1 4
#define | PUB_QOM_2 8
#define | PUB_QOM_3 12
#define | PUB_OP_CLIENTS 16
#define | PUB_OP_SERVERS 32
#define | PUB_OP_MASTER_ENTITY 64

Typedefs

typedef unsigned char | byte

Functions

void | getZAFLibVersion (char *versionStr)
Returns string containing version in format of major.minor.patch (build#).

bool | deleteEntity (int entityId)
Deletes the entity permanently from the database and exits the entity from the database.

bool | publishGameStateMsgInSphere (int mapId, int regionId, int qos, int operation, byte *gsm, short size)
Publish a game state message to all the entities in the entity's sphere Only those clients subscribed to receive game states will receive the messages.

bool | publishGameStateMsgToEntity (int recipientEntityId, int qos, int operation, byte *gsm, short size)
Publish a game state message to the entity only.

bool | publishGameStateMsgToAllMasterEntities (int qos, int operation, byte *stateData, short dataSize)
Publish a game state message to the all the Master entities.

bool | publishGameStateMsgInGuild (int guildId, int entityId, int operation, int qos, byte *stateData, short stateSize)
Publish a game state message to game guild specified.

bool | sendUpdateToEntity (int guildId, int entityId, byte *stateData, short stateSize)
Send a game state message update to the master GSS that owns the entity.

int | getMillsSinceLogin (int anEntityId)
Get time since character has logged on.

GameStateRecord * getCurrentGameStateRecord ()
Get Current game state record.

GuildGameStateRecord * getCurrentGuildGameStateRecord ()
Get Current Guild Game state record.

GameStateRecord * | createNewGameStateRecord (int length, byte *entityDataPtr)
Get pointer to a new game state record allocated in shared memory.

int | setEntityLevelTimerEvent (int entityId, long delay, byte *eventData, short size, int period)
Called to set a timer event associated with an Entity.

int | setRegionLevelTimerEvent (int mapId, int regionId, long delay, byte *eventData, short size, int period)
Called to set a timer event for a Region .

int | setGSSLevelTimerEvent (long delay, byte *eventData, short size, int period)
Called to set a timer event for the local server .

int | setWorldLevelTimerEvent (long delay, byte *eventData, short size, int period)
Called to set a Global timer event.

bool | cancelTimerEvent (int eventId)
Called to cancel a previously set timer event.

ZonaServerEntity * | getEntityWithId (int entityId)
Called retrieve entity object from Entity Manager.

int | getAllEntities (ZonaBaseEntityPtrVector *zbepv)
Called to retrieve all entity objects in the Entity Manager The returned method returns all entities including ghost (replicated) entities.

ZonaServerGuild * | getGuildWithId (int guildId)
Called retrieve server guild object from Entity Manager.

void | setGlobalProperty (char *key, char *value, short size)
Called to set or update a property in global property cache This will cause onNotifyPropertyUpdate to be called on other GSSes.

void | deleteGlobalProperty (char *key)
Called to delete a property in global property cache This will cause onNotifyPropertyDelete to be called on other GSSes.

void | setMapSize (int mapId, int maxSizeX, int maxSizeY, int maxSizeZ)
This function is only used for visualization.

void | updatePlayerPosition (int eid, int x, int y, int z)
This function is only used for visualization.

void | updatePlayerScore (int eid, int score)
This function to display high scores in ZonaAdmin.

bool | isGuildMemberOnLine (int eid)
This function returns if the guild member entity is online This method should only be called on the Guild Server plugin instance.

Define Documentation

#define PUB_OP_DISCARD 1

Message will be discarded and not published.

This flag takes precedence over all the other operators.

Definition at line 31 of file ZonaGSPublish.h.

#define PUB_OP_CLIENT_PRIVATE 2

In addition to the message being published to all the entities within the sphere it is also sent back to the entity.

Definition at line 37 of file ZonaGSPublish.h.

#define PUB_QOM_0 0

The quality of the message QOM_3 being the highest quality.

Definition at line 40 of file ZonaGSPublish.h.

#define PUB_QOM_1 4

Definition at line 41 of file ZonaGSPublish.h.

#define PUB_QOM_2 8

Definition at line 42 of file ZonaGSPublish.h.

#define PUB_QOM_3 12

Definition at line 43 of file ZonaGSPublish.h.

#define PUB_OP_CLIENTS 16

Definition at line 45 of file ZonaGSPublish.h.

#define PUB_OP_SERVERS 32

Definition at line 47 of file ZonaGSPublish.h.

#define PUB_OP_MASTER_ENTITY 64

Definition at line 48 of file ZonaGSPublish.h.

Typedef Documentation

typedef unsigned char byte

Definition at line 24 of file ZonaGSPublish.h.

Function Documentation

void getZAFLibVersion ( char * versionStr )

Returns string containing version in format of major.minor.patch (build#).

Parameters:
versionStr memory must be allocated by user (at least 32 8bit chars)
Returns:
void

bool deleteEntity ( int entityId )

Deletes the entity permanently from the database and exits the entity from the database.

The entity being deleted must be a child entity and a master in the plugin.

Parameters:
entityId Id of the entity that needs to be deleted
Returns:
True, if successful

bool publishGameStateMsgInSphere | ( | int | mapId,
 |  | int | regionId,
 |  | int | qos,
 |  | int | operation,
 |  | byte * | gsm,
 |  | short | size
 | ) |

Publish a game state message to all the entities in the entity's sphere Only those clients subscribed to receive game states will receive the messages.

Please see subscribeTOGameStateMsgs(...) in the client side API.

Parameters:
mapId | The id of the map to which this region belongs.
regionId | Id of the entity's region
qos | Quality of message, PUB_QOM_[0,1,2,3]
operation | Type of operation that needs to be performed during publish. one or more operations can be specified by OR-ing the PUB_OP_XXX
PUB_OP_DISCARD The msg will not be published, returns immediately. PUB_OP_CLIENT_PRIVATE This operator is ignored PUB_OP_CLIENTS The msg is sent to clients in sphere PUB_OP_SERVERS The msg is sent to the neighboring servers PUB_OP_MASTER_ENTITY This operator is ignored

Parameters:
gsm | Game state message that needs to be published
size | Length of game state message
Returns:
True, if successful Will return false, if the neither PUB_OP_CLIENTS nor PUB_OP_SERVERS was set.

bool publishGameStateMsgToEntity | ( | int | recipientEntityId,
 |  | int | qos,
 |  | int | operation,
 |  | byte * | gsm,
 |  | short | size
 | ) |

Publish a game state message to the entity only.

It is received by the client hosting the entity. Messages published by this method are received by clients even if the clients have not subscribed to game state messages using subscribeToGameStateMsgs.

Parameters:
recipientEntityId | Id of the recipient entity
qos | Quality of message, PUB_QOM_[0,1,2,3]
operation | Type of operation that needs to be performed during publish. one or more operations can be specified by OR-ing PUB_OP_XXX
PUB_OP_DISCARD The msg will not be published, returns immediately. PUB_OP_CLIENT_PRIVATE This operator is forced to be set PUB_OP_CLIENTS The msg is sent to clients in sphere PUB_OP_SERVERS The msg is sent to the neighboring servers PUB_OP_MASTER_ENTITY The msg is sent to the gss plugin where the entity exists as master. The entity must *not* be a master entity in the plugin from which this call is being made. The recipient plugin's onNotifyGameStateMsgUpdate will be called as a result. If this flag over-ride all the other PUB_OP_XXX flags including PUB_OP_CLIENT_PRIVATE

Parameters:
gsm | Game state message that needs to be published
size | Length of gsm
Returns:
True, if successful

bool publishGameStateMsgToAllMasterEntities | ( | int | qos,
 |  | int | operation,
 |  | byte * | stateData,
 |  | short | dataSize
 | ) |

Publish a game state message to the all the Master entities.

This method internally calls publishGameStateMsgToEntity.

Parameters:
qos | Quality of message, PUB_QOM_[0,1,2,3]
operation | Please see publishGameStaetMsgToEntity
stateData | Game state message that needs to be published
dataSize | Length of stateData
Returns:
True, if successful

bool publishGameStateMsgInGuild | ( | int | guildId,
 |  | int | entityId,
 |  | int | operation,
 |  | int | qos,
 |  | byte * | stateData,
 |  | short | stateSize
 | ) |

Publish a game state message to game guild specified.

Parameters:
guildId | The id of the guild specified.
entityId | The entity id, if any, associated with this game state record. If there is no entity required in the message, Please set this value to -1.
operation | Type of operation that needs to be performed during publish. Only the two options mentioned below are supported. Any other flag value is ignored.
PUB_OP_DISCARD The msg will not be published, returns immediately. PUB_OP_CLIENTS The msg is broadcast to clients in the guild

Parameters:
qos | Quality of message, PUB_QOM_[0,1,2,3]
stateData | Game state message that needs to be published
stateSize | Length of game state message
Returns:
True, if successful

bool sendUpdateToEntity | ( | int | guildId,
 |  | int | entityId,
 |  | byte * | stateData,
 |  | short | stateSize
 | ) |

Send a game state message update to the master GSS that owns the entity.

Parameters:
guildId | The guildId of that entity belongs to
entityId | The updated entity's Id
stateData | Game state message that wraps the updating info
stateSize | Length of game state message
If this method is called from Guild Server plugin, the gsm is routed to the GSS plugin that owns the master copy of the entity. All other operation flags are ignored.

int getMillsSinceLogin ( int anEntityId )

Get time since character has logged on.

Parameters:
anEntityId of the character
Returns:
milliseconds since user has logged on return 0 if error

GameStateRecord* getCurrentGameStateRecord ( )

Get Current game state record.

This method should usually be used in the implemenation of onValidateGameStateMsg to reterive the GameStateRecord sent by the client. The default operation is PUB_OP_DISCARD. If upon validation the plug-in wishes to propogate the message to other clients and servers, a combination of PUB_OP_XXX operation flags may be set on the record. In order to publish more than one game state message getCurrentGameStateRecord may be used.

Returns:
pointer to the current game state record structure

GuildGameStateRecord* getCurrentGuildGameStateRecord ( )

Get Current Guild Game state record.

This method should usually be used in the implemenation of onValidateGuildGameStateMsg to reterive the GuildGameStateRecord sent by the client. The guild game state record is specifically sent for distribution to members is the specified guild. The default operation is PUB_OP_DISCARD. If upon validation the plug-in wishes to propogate the message to other clients, set the operation to PUB_OP_CLIENTS. Only two flags are supported- PUB_OP_CLIENTS and PUB_OP_DISCARD may be set on the record.

Returns:
pointer to the current game state record structure

GameStateRecord* createNewGameStateRecord | ( | int | length,
 |  | byte * | entityDataPtr
 | ) |

Get pointer to a new game state record allocated in shared memory.

This method may be to publish game state messages. Upon creating the new record the entityId, regionId, operation flag, and game state message should be set. No special publish call is needed to actually send it across. The reference to

Parameters:
length | Length of the game state
entityDataPtr | Pointer to memory where game state must be placed
Returns:
pointer to the new game state record structure

int setEntityLevelTimerEvent | ( | int | entityId,
 |  | long | delay,
 |  | byte * | eventData,
 |  | short | size,
 |  | int | period
 | ) |

Called to set a timer event associated with an Entity.

When the timer event is due, the onEntityTimerEvent callback is fired.

Parameters:
entityId | Id of the entity associated with the event
delay | The millis, from current time, at which to schedule the event.
eventData | Event Data associated with the event
size | Size of Event Data packet
period | No of times that this event should be fired. -1 indicates infinite repeating executions. The event would fire at regular intervals determined by the value of the 'delay' parameter.
Returns:
EventId if successful, else -1

int setRegionLevelTimerEvent | ( | int | mapId,
 |  | int | regionId,
 |  | long | delay,
 |  | byte * | eventData,
 |  | short | size,
 |  | int | period
 | ) |

Called to set a timer event for a Region .

When the timer event is due, the onRegionTimerEvent callback is fired.

Parameters:
regionId | Id of the region associated with the event
mapId | The id of the map to which this region belongs.
delay | The millis, from current time, at which to schedule the event.
eventData | Event Data associated with the event
size | Size of Event Data packet
period | No of times that this event should be fired. -1 indicates infinite repeating executions. The event would fire at regular intervals determined by the value of the 'delay' parameter.
Returns:
EventId if successful, else -1

int setGSSLevelTimerEvent | ( | long | delay,
 |  | byte * | eventData,
 |  | short | size,
 |  | int | period
 | ) |

Called to set a timer event for the local server .

When the timer event is due, the onGssTimerEvent callback is fired.

Parameters:
delay | The millis, from current time, at which to schedule the event.
eventData | Event Data associated with the event
size | Size of Event Data packet
period | No of times that this event should be fired. -1 indicates infinite repeating executions. The event would fire at regular intervals determined by the value of the 'delay' parameter.
Returns:
EventId if successful, else -1

int setWorldLevelTimerEvent | ( | long | delay,
 |  | byte * | eventData,
 |  | short | size,
 |  | int | period
 | ) |

Called to set a Global timer event.

This event will be fired across all active GSS Servers at the time specified When the timer event is due, the onEWorldTimerEvent callback is fired.

Parameters:
delay | The millis, from current time, at which to schedule the event.
eventData | Event Data associated with the event
size | Size of Event Data packet
period | No of times that this event should be fired. -1 indicates infinite repeating executions. The event would fire at regular intervals determined by the value of the 'delay' parameter.
Returns:
EventId if successful, else -1

bool cancelTimerEvent ( int eventId )

Called to cancel a previously set timer event.

Recurring timers as well as as single event timers would never execute again after they have been cancelled.

Parameters:
eventId The id of the event to be cancelled.
Returns:
True if successful.

ZonaServerEntity* getEntityWithId ( int entityId )

Called retrieve entity object from Entity Manager.

Parameters:
entityId The id of the entity to be retrieved.
Returns:
Pointer to ZonaServerEntity object representing the entity. Returns NULL if entity is not found.

int getAllEntities ( ZonaBaseEntityPtrVector * zbepv )

Called to retrieve all entity objects in the Entity Manager The returned method returns all entities including ghost (replicated) entities.

Parameters:
zbepv Pointer to entity object vector. Has to be initialized and passed in by reference.
Returns:
The count of all entities in the vector

ZonaServerGuild* getGuildWithId ( int guildId )

Called retrieve server guild object from Entity Manager.

Parameters:
guildId The id of the guild to be retrieved.
Returns:
Pointer to ZonaServerGuild object representing the guild. Returns NULL if guild is not found.

void setGlobalProperty | ( | char * | key,
 |  | char * | value,
 |  | short | size
 | ) |

Called to set or update a property in global property cache This will cause onNotifyPropertyUpdate to be called on other GSSes.

Parameters:
key | Pointer to Null Terminated string representing Property name.
value | Pointer to value data for the Property.
size | Size of the byte array representing Property value
Returns:
void

void deleteGlobalProperty ( char * key )

Called to delete a property in global property cache This will cause onNotifyPropertyDelete to be called on other GSSes.

Parameters:
key Pointer to Null Terminated string representing Property name.
Returns:
void

void setMapSize | ( | int | mapId,
 |  | int | maxSizeX,
 |  | int | maxSizeY,
 |  | int | maxSizeZ
 | ) |

This function is only used for visualization.

The values are currently used by player monitor in zona admin. The values must be positive. The minimum value is assumed to be 0.

Parameters:
mapId | The id of the map to which this entity belongs.
maxSizeX | Maximum value along x-axis
maxSizeY | Maximum value along y-axis(Height)
maxSizeZ | Maximum value along z-axis
Returns:
void

void updatePlayerPosition | ( | int | eid,
 |  | int | x,
 |  | int | y,
 |  | int | z
 | ) |

This function is only used for visualization.

The values are currently used by player monitor in zona admin. The values must be positive. The minimum value is assumed to be 0. The maximum should be what is set in setMapSize. The updated values are drawn in the player monitor window in the zona admin application. The player monitor ignores the values for child entities and only displays character entities.

Parameters:
eid | Value of character entity id.
x | Current x value of the character entity
y | Current y value of the character entity
z | Current z value of the character entity
Returns:
void

void updatePlayerScore | ( | int | eid,
 |  | int | score
 | ) |

This function to display high scores in ZonaAdmin.

Parameters:
eid | Value of character entity id.
score | Current score of the character.
Returns:
void

bool isGuildMemberOnLine ( int eid )

This function returns if the guild member entity is online This method should only be called on the Guild Server plugin instance.

Parameters:
eid Value of entity id.
Returns:
True, if the member is online.


ZonaCharacterValidate

Functions

bool | onValidateCreateCharacter (ZonaServerCharacter *newCharacter)
This method is called in response to client calling createCharacter.

bool | onValidateUpdateCharacter (ZonaServerCharacter *newCharacter, ZonaServerCharacter *previousCharacter)
This method is called in response to client calling updateCharacter.

bool | onValidateDeleteCharacter (ZonaServerCharacter *character)
This method is called in response to client calling deleteCharacter.

Function Documentation

bool onValidateCreateCharacter ( ZonaServerCharacter * newCharacter )

This method is called in response to client calling createCharacter.

The implementation must validate the character creation request and return true if valid. The developer must validate all the properties of the character, since the values are filled on the client. Additional initialization for the character object may also be made directly on the passed in object. The passed in character object is a temporary object meaning the object is created just before calling the method and deleted upon return. This object is never added to the entity manager and developers must not keep a reference to this object. The character object is created by invoking onCreateNewCharacterEntity. This method will called on host GSS of the client. Upon returning true the character is automatically saved to database.

Parameters:
newCharacter The ZonaServerCharacter object representing the properties of the character to be created

bool onValidateUpdateCharacter | ( | ZonaServerCharacter * | newCharacter,
 |  | ZonaServerCharacter * | previousCharacter
 | ) |

This method is called in response to client calling updateCharacter.

The implementation must validate the character updation request and return true if valid. The developer must validate all the properties of the character, since the values are updated on the client. Additional initialization for the character object may also be made directly on the passed in object. The passed in character object is a temporary object meaning the object is created just before calling the method and deleted upon return. This object is never added to the entity manager and developers must not keep a reference to this object. The character object is created by invoking onCreateNewCharacterEntity. This method will called on host GSS of the client. Upon returning true the character is automatically saved to database.

Parameters:
previousCharacter | The ZonaServerCharacter object representing the properties of the character to be updated
newCharacter | The ZonaServerCharacter object representing the new character properties for the character being updated.

bool onValidateDeleteCharacter ( ZonaServerCharacter * character )

This method is called in response to client calling deleteCharacter.

The implementation should validate the character deletion and return true if valid. If return value is false, the operation is aborted. Additional initialization for the character object may also be made directly on the passed in object. The passed in character object is a temporary object meaning the object is created just before calling the method and deleted upon return.This object is never added to the entity manager and developers must not keep a reference to this object. The character object is created by invoking onCreateNewCharacterEntity. This method will called on host GSS of the client. Upon returning true the character is deleted from the database.

Parameters:
character The ZonaServerCharacter object representing the properties of the character to be deleted


ZonaEntityValidate

Defines

#define | TYPE_STATE_PROPS 64
#define | TYPE_DISPLAY_PROPS 128
#define | TYPE_PRIVATE_PROPS 256
#define | TYPE_SYSTEM_PROPS 512
#define | ENTITY_UPDATE_TYPE 1
#define | ENTITY_UPDATE_ROLE 2
#define | ENTITY_UPDATE_MODE 3
#define | ENTITY_UPDATE_REGION 4
#define | ENTITY_UPDATE_PROPERTY 5

Functions

int | onEntityJoinedGame (ZonaServerEntity *entity)
Called when the client calls enter on a ZonaClientCharacter.

bool | onEntityDepartedGame (ZonaServerEntity *entity)
Called when the client calls exit on a ZonaClientCharacter.

bool | onEnterEntity (ZonaServerEntity *entity)
Called by the server to inform the plugin that it should start tracking the entity.

bool | onExitEntity (ZonaServerEntity *entity)
Called the server to inform the plugin that it should no longer track the entity This method will be called for master as well as replicated/ghost entities.

void | onNotifyEntityUpdate (ZonaServerEntity *entity, int flags)
Called to update the properties of an entity.

bool | onValidateEntityPropertyUpdate (ZonaServerEntity *entity, ZonaServerEntity *previousEntity)
Called to validate any update to entity properties by the client.

bool | onValidateTransferEntity (int childEntityId, int currentParentId, int newParentId)
Called when a client invokes acquireChildEntity(...)/releaseChileEntity(...) This method is called on the GSS, where the new parent is a master.

void | onNotifyTransferEntity (int childEntityId, int prevParentId, int newParentId)
Called to update the parent id of a child entity.

bool | onValidateCreateChildEntity (ZonaServerEntity *newChildEntity)
Called when a client invokes createSingleChildEntity(..) or createMultipleChildEntities(..) The implementation must validate the creation and must return true.

bool | onValidateDeleteChildEntity (ZonaServerEntity *entity)
Called when a client invokes deleteChildEntity(...) The implementation must validate the deletion request and return true if valid.

bool | onValidateEntityTypeUpdate (ZonaServerEntity *entity, int newType)
Called when the client invokes hide(), show() attach() or detach() on an instance of ZonaClientEntity object.

void | onReceiveUpdateToEntity (ZonaServerEntity *entity, byte *gsm, short size)
Called when a GGS tried to invoke sendUpdateToEntity() This call will either happen in a GSS that owns entity which is online, or happen inside GGS if the entity if offline.

Variables

int | ET_DEFAULT = 0
int | ET_IS_HIDDEN = 1
Entity is not perceived by other entities, but will see other entities.

int | ET_IS_ATTACHED = 2
Entity's region id is always assumed to be that of its parent's.

int | ET_RESERVED_2 = 4
int | ET_RESERVED_3 = 8
int | ET_RESERVED_4 = 16
int | ET_RESERVED_5 = 32
int | ET_RESERVED_6 = 64
int | ET_RESERVED_7 = 128
int | ET_RESERVED_8 = 256

Define Documentation

#define TYPE_STATE_PROPS 64

Definition at line 23 of file ZonaEntityValidate.h.

#define TYPE_DISPLAY_PROPS 128

Definition at line 24 of file ZonaEntityValidate.h.

#define TYPE_PRIVATE_PROPS 256

Definition at line 25 of file ZonaEntityValidate.h.

#define TYPE_SYSTEM_PROPS 512

Definition at line 26 of file ZonaEntityValidate.h.

#define ENTITY_UPDATE_TYPE 1

Definition at line 30 of file ZonaEntityValidate.h.

#define ENTITY_UPDATE_ROLE 2

Definition at line 31 of file ZonaEntityValidate.h.

#define ENTITY_UPDATE_MODE 3

Definition at line 32 of file ZonaEntityValidate.h.

#define ENTITY_UPDATE_REGION 4

Definition at line 33 of file ZonaEntityValidate.h.

#define ENTITY_UPDATE_PROPERTY 5

Definition at line 34 of file ZonaEntityValidate.h.

Function Documentation

int onEntityJoinedGame ( ZonaServerEntity * entity )

Called when the client calls enter on a ZonaClientCharacter.

The method implementation must calcaulate the region id for the entity and return the value. GSS will call the onPlaceEntityInRegion for the entity and region id that was returned on the GSS that owns the region. This method will called on host GSS of the client.

Parameters:
entity The ZonaServerEntity object associated with the entity
Returns:
Should return the region id that the entity should be placed in

bool onEntityDepartedGame ( ZonaServerEntity * entity )

Called when the client calls exit on a ZonaClientCharacter.

This method will be called before exitEntity is called. Developers may want to save the current state of the entity to the database in the implementation of this method. This method will be called for master entities.

Parameters:
entity The ZonaServerEntity object associated with the entity
Returns:
Should return true, if successful. The return value is currently ignored.

bool onEnterEntity ( ZonaServerEntity * entity )

Called by the server to inform the plugin that it should start tracking the entity.

The entity is also added to the entity manager and can be retreived by calling getEntityWithId. This method will be called for master as well as replicated/ghost entities.

Parameters:
entity The ZonaServerEntity object associated with the entity. Programmers must not delete the passed in object.
Returns:
The return value is currently ignored.

bool onExitEntity ( ZonaServerEntity * entity )

Called the server to inform the plugin that it should no longer track the entity This method will be called for master as well as replicated/ghost entities.

Parameters:
entity The ZonaServerEntity object associated with the entity. The entity is removed from the entity manager and the object is deleted upon returning from the call. Programmers must not reference the object anymore.
Returns:
The return value is currently ignored.

void onNotifyEntityUpdate | ( | ZonaServerEntity * | entity,
 |  | int | flags
 | ) |

Called to update the properties of an entity.

The method is called only for ghost (replicated copies) entities. The method is called in response to the master copy of the entity being changed. ZAF updates the entity prior to calling this method. The values of flags is one of ENTITY_UPDATE_* This method will be called for replicated/ghost entities.

Parameters:
entity | The ZonaServerEntity object associated with the entity
flags | The flag value indicates the entity properties which have been updated.

bool onValidateEntityPropertyUpdate | ( | ZonaServerEntity * | entity,
 |  | ZonaServerEntity * | previousEntity
 | ) |

Called to validate any update to entity properties by the client.

This method is called in response to a client changing values on their entity. The method is called on GSS where the entity exists as a master. The implementation must validate the update. If the developer changes any values on the entity, in this method, it will be distributed according to their property types. (i.e. Changes to public and private properties will be sent back to the entity as a correction. Additionally, changes to all property types are also distributed to all the GSS tracking ghosts of the entity. ) If true is returned, the values are updated and published to other clients in the sphere as well as all GSS tracking ghosts of the entity. If false is returned, the update is discarded and client that sent the update will receive the last server validated values. All clients in the sphere will receive the update as well. If true is returned and additional properties were updated by the plugin, the latest change is sent back to the clients. If false is returned and additional properties were updated, all updates are discarded.

Parameters:
entity | The ZonaServerEntity object associated with the entity
previousEntity | The previous ZonaServerEntity

bool onValidateTransferEntity | ( | int | childEntityId,
 |  | int | currentParentId,
 |  | int | newParentId
 | ) |

Called when a client invokes acquireChildEntity(...)/releaseChileEntity(...) This method is called on the GSS, where the new parent is a master.

The implementation of this method should validate the transfer request from the client and explicity call setParentId on the childEntity This method will be called for master entities.

Parameters:
childEntityId | id of the child that is being transfered
currentParentId | id of the current parent of the child entity
newParentId | id of the new parent
Returns:
The return value is currenlty ignored

void onNotifyTransferEntity | ( | int | childEntityId,
 |  | int | prevParentId,
 |  | int | newParentId
 | ) |

Called to update the parent id of a child entity.

This method is called on ghost /replicated entities as well as for new and the previous parent entities and for the child entity. It is called in response to setParentId being called on the master entity. This method will be called for master as well as replicated/ghost entities.

Parameters:
childEntityId | Id of the child entity whose parent was switched
prevParentId | Id of the previous parent
newParentId | Id of the new parent

bool onValidateCreateChildEntity ( ZonaServerEntity * newChildEntity )

Called when a client invokes createSingleChildEntity(..) or createMultipleChildEntities(..) The implementation must validate the creation and must return true.

If the method returns false, the child creation is aborted. This method will be called on the gss where the parent entity is a master.

Parameters:
newChildEntity The ZonaServerEntity object associated with the child entity
Returns:
Should return true, only if it was successfully validated

bool onValidateDeleteChildEntity ( ZonaServerEntity * entity )

Called when a client invokes deleteChildEntity(...) The implementation must validate the deletion request and return true if valid.

If false is returned the deletion of child entity is aborted. This method will be called on the gss where the child entity is a master.

Parameters:
entity The ZonaServerEntity object associated with the child entity
Returns:
should return true, only if it was successfully validated

bool onValidateEntityTypeUpdate | ( | ZonaServerEntity * | entity,
 |  | int | newType
 | ) |

Called when the client invokes hide(), show() attach() or detach() on an instance of ZonaClientEntity object.

The implementation should validate the the change and return true if valid. If false is returned the type update is aborted. Upon returning true, the ghost copies on other GSSes will receive onNotifyEntityUpdate with ENTITY_UPDATE_TYPE flag. This method will be called for master entities.

Parameters:
entity | The ZonaServerEntity object associated with the entity
newType | New type of the entity
Returns:
should return true, only if it was successfully validated

void onReceiveUpdateToEntity | ( | ZonaServerEntity * | entity,
 |  | byte * | gsm,
 |  | short | size
 | ) |

Called when a GGS tried to invoke sendUpdateToEntity() This call will either happen in a GSS that owns entity which is online, or happen inside GGS if the entity if offline.

User should be in charge of updating any property that is needed in this function.

Parameters:
entity | The ZonaServerEntity object associated with the entity
gsm | gsm defined by user to specify what property to update
size | Length of the state message
Returns:
void

Variable Documentation

int ET_DEFAULT = 0 [static]

Definition at line 38 of file ZonaEntityValidate.h.

int ET_IS_HIDDEN = 1 [static]

Entity is not perceived by other entities, but will see other entities.

Definition at line 40 of file ZonaEntityValidate.h.

int ET_IS_ATTACHED = 2 [static]

Entity's region id is always assumed to be that of its parent's.

Child entities only.

Definition at line 42 of file ZonaEntityValidate.h.

int ET_RESERVED_2 = 4 [static]

Definition at line 43 of file ZonaEntityValidate.h.

int ET_RESERVED_3 = 8 [static]

Definition at line 44 of file ZonaEntityValidate.h.

int ET_RESERVED_4 = 16 [static]

Definition at line 45 of file ZonaEntityValidate.h.

int ET_RESERVED_5 = 32 [static]

Definition at line 46 of file ZonaEntityValidate.h.

int ET_RESERVED_6 = 64 [static]

Definition at line 47 of file ZonaEntityValidate.h.

int ET_RESERVED_7 = 128 [static]

Definition at line 48 of file ZonaEntityValidate.h.

int ET_RESERVED_8 = 256 [static]

Definition at line 49 of file ZonaEntityValidate.h.


ZonaGameStateValidate

Classes

struct | GameStateRecord
Structure used to represent a validated state record. More...

Functions

void | onValidateGameStateMsg (ZonaServerEntity *entity, byte *gsm, short size)
Called when server receives new data from the client.

void | onNotifyGameStateMsgUpdate (ZonaServerEntity *entity, byte *gsm, short size)
Called to update the replicated copies (ghost) after the master server publishes the validated game state message for the master entity.

Function Documentation

void onValidateGameStateMsg | ( | ZonaServerEntity * | entity,
 |  | byte * | gsm,
 |  | short | size
 | ) |

Called when server receives new data from the client.

The method is called in response to client calling sendGameStateMsg. The implemenatation of this method should validate the game state msg and apply the changes to the entity. In order for the changes to be propogated to clients and ghost copies of the entity on other GSSes the implementation should call publishGameStateMsg. Alternatively, the implementation may retreive the current GameStateRecord by calling getCurrentGameStateRecord and setting the appropriate operator flags. This method will be called for master entities.

Parameters:
entity | The ZonaServerEntity object associated with the entity
gsm | The Game state message received by the server from the client
size | Length of the state message

void onNotifyGameStateMsgUpdate | ( | ZonaServerEntity * | entity,
 |  | byte * | gsm,
 |  | short | size
 | ) |

Called to update the replicated copies (ghost) after the master server publishes the validated game state message for the master entity.

This method will be called for replicated/ghost entities.

Parameters:
entity | The ZonaServerEntity object associated with the entity
gsm | Validated game state message published by the master server
size | Length of the state message


ZonaChatGuildValidate

Functions

bool | onValidateCreateChatGuild (ZonaServerGuild *guild, int entityId)
Validate creation of chat guild.

bool | onValidateDeleteChatGuild (ZonaServerGuild *guild, int entityId)
Validated deletion of chat guild.

bool | onValidateAddMemberToChatGuild (ZonaServerGuild *guild, int entityId)
Validate addition to chat guild.

bool | onValidateRemoveMemberFromChatGuild (ZonaServerGuild *guild, int entityId)
Validated member removal from chat guild.

bool | onValidateAddChatGuildModerator (ZonaServerGuild *guild, int memberId, int moderatorId)
Validated moderator addition to chat guild.

bool | onValidateRemoveChatGuildModerator (ZonaServerGuild *guild, int moderatorId)
Validated moderator deletion from chat guild, A moderator can only be deleted by itself.

Function Documentation

bool onValidateCreateChatGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Validate creation of chat guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity that creates the chat guild.
Returns:
boolean true for success false for failure

bool onValidateDeleteChatGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Validated deletion of chat guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The entity that requested the guild delete.
Returns:
boolean true for success false for failure

bool onValidateAddMemberToChatGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Validate addition to chat guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity that's going to be added to the chat guild.
Returns:
boolean true for success false for failure

bool onValidateRemoveMemberFromChatGuild | ( | ZonaServerGuild * | guild,
 |  | int | entityId
 | ) |

Validated member removal from chat guild.

Parameters:
guild | The server represntation of the guild object.
entityId | The id of the entity that's going to be removed from the chat guild.
Returns:
boolean true for success false for failure

bool onValidateAddChatGuildModerator | ( | ZonaServerGuild * | guild,
 |  | int | memberId,
 |  | int | moderatorId
 | ) |

Validated moderator addition to chat guild.

Parameters:
guild | The server represntation of the guild object.
memberId | The id of the entity requesting an add moderator.
moderatorId | The id of the entity which is to be made a moderator.
Returns:
boolean true for success false for failure

bool onValidateRemoveChatGuildModerator | ( | ZonaServerGuild * | guild,
 |  | int | moderatorId
 | ) |

Validated moderator deletion from chat guild, A moderator can only be deleted by itself.

Parameters:
guild | The server represntation of the guild object.
moderatorId | The id of the entity which is unset as moderator.
Returns:
boolean true for success false for failure


ZonaRegionValidate

Functions

bool | onPlaceEntityInRegion (ZonaServerEntity *entity, int mapId, int regionId)
Called during initial placement of entity in a region.

void | onLoadMap (int mapId)
Called by the server to load a particular map.

int | onGetRegionCount (int mapId)
Called immediately after a map is loaded.

int * | onGetRegionNeighbors (int mapId, int regionId, byte regionCoverage, unsigned int *numIds)
The server lazily (as is required) loads the neighbors for each region.

int | onGetMapDimensionX (int mapId)
Called immediately after a map is loaded for region visualization.

int | onGetMapDimensionY (int mapId)
Called immediately after a map is loaded for region visualization.

int | onGetMapDimensionZ (int mapId)
Called immediately after a map is loaded for region visualization.

Function Documentation

bool onPlaceEntityInRegion | ( | ZonaServerEntity * | entity,
 |  | int | mapId,
 |  | int | regionId
 | ) |

Called during initial placement of entity in a region.

This method is called once right after the entityJoinedGame is called. The implementation entity must initialize the starting position for the entity. The caveat is that the entity must be placed in the region that is specified. This method will be called for master entities.

Parameters:
entity | The ZonaServerEntity object associated with the entity
mapId | Map id of the entity
regionId | Region id in which the entity must be placed
Returns:
The return value is currently ignored.

void onLoadMap ( int mapId )

Called by the server to load a particular map.

The plugin would perform all map initialization activities in this call. Some of which could include determining maximum regions for the map, initializing the regions in the map, assigining region Ids.

Parameters:
mapId The id of the concerned map.
Please note that the region Ids must be zero-based. This method will be called in Sphere server plugin and all GSS plug-ins.

Returns:
void.

int onGetRegionCount ( int mapId )

Called immediately after a map is loaded.

This function returns the total no of regions in the map to the server. This method will be called in all GSS plug-ins.

Parameters:
mapId The id of the map to which this region belongs.
Note: The REGION IDS have to be numbered from 0 to (TOTAL NO. OF REGIONS - 1) The server needs this sequential numbering for efficient message distributionn.

Returns:
The total number of Regions in the map.

int* onGetRegionNeighbors | ( | int | mapId,
 |  | int | regionId,
 |  | byte | regionCoverage,
 |  | unsigned int * | numIds
 | ) |

The server lazily (as is required) loads the neighbors for each region.

For each region the method is called at most once. Please note that the region Ids must be zero-based. This method will be called in all GSS plug-ins.

Parameters:
mapId | The id of the map to which this region belongs.
regionId | The id of the region whose neighbors are being requested
regionCoverage | The coverage around the region that must be included
numIds | The number of regions ids that being returned
Returns:
Return an array of all neighboring regions The returned pointer will be deleted by ZAF.

int onGetMapDimensionX ( int mapId )

Called immediately after a map is loaded for region visualization.

This method will be called in all GSS plug-ins.

Parameters:
mapId The id of the map to which this region belongs.
Returns:
Should return the number of regions along the x-axis Width/horizontal/Left to Right (Perspective: 2-D topview)

int onGetMapDimensionY ( int mapId )

Called immediately after a map is loaded for region visualization.

This method will be called in all GSS plug-ins.

Parameters:
mapId The id of the map to which this region belongs.
Returns:
Should return the number of regions along the y-axis Height/vertical/Top to Bottom (Perspective: 2-D topview)

int onGetMapDimensionZ ( int mapId )

Called immediately after a map is loaded for region visualization.

This method will be called in all GSS plug-ins.

Parameters:
mapId The id of the map to which this region belongs.
Returns:
Should return the number of regions along the z-axis (Depth)


ZonaSystem

Typedefs

typedef unsigned char | byte

Functions

bool | onInitialization ()
Called once during server startup.

bool | onDestruction ()
Called once during server shutdown.

char * | onGetGamePluginVersion ()
This function should return a string that marks the version of server side game code.

bool | onValidateClientVersion (byte *clientVersion, short size)
Called when the client logs in to verify client version.

void | onNotifyGlobalPropertyUpdate (const char *key, char *value, short size)
Called when a remote GSS updates the Global property cache.

void | onNotifyGlobalPropertyDelete (const char *key)
Called when a remote GSS deletes a property from Global property cache.

void | onDebugCmd (const char *cmd)
Upon typing a "plugin {cmd}" in the gss console, the {cmd} string is passed into plugin to help developers assist in their debugging efforts during run-time.

void | zprintf (const char *fmt,...)
Will print a message to the console just like printf Checks for g_debug == true and will call fflush(stdout) to force the print.

Variables

bool | g_zonaDebug

Typedef Documentation

typedef unsigned char byte

Definition at line 25 of file ZonaSystem.h.

Function Documentation

bool onInitialization ( )

Called once during server startup.

Developers implementation should load all the resources needed. This method will be called in all GSS plug-ins.

Returns:
The return value is currently ignored.

bool onDestruction ( )

Called once during server shutdown.

Developers implementation should release all the resources in this method. This is the last funtion that gets called before the Game Server exits. This method will be called in all GSS plug-ins.

Returns:
The return value is currently ignored.

char* onGetGamePluginVersion ( )

This function should return a string that marks the version of server side game code.

The returned version is used against the version return by ZAC. If there is a version mismatch, the server is not allowed to start. This method will be called in all GSS plug-ins.

Returns:
should return string of game version

bool onValidateClientVersion | ( | byte * | clientVersion,
 |  | short | size
 | ) |

Called when the client logs in to verify client version.

The client will not be allowed to login to the server, if returned false. This method will called on host GSS of the client.

Parameters:
clientVersion | String of version information send at login by client
size | Size of clientVersion
Returns:
should return true, only if it was successfully validated

void onNotifyGlobalPropertyUpdate | ( | const char * | key,
 |  | char * | value,
 |  | short | size
 | ) |

Called when a remote GSS updates the Global property cache.

The developers are expected to maintain a local cache. The implementation must update the local cache.

Parameters:
key | String key of the property.
value | Pointer to property value.
size | Size of the property value byte array
Returns:
void

void onNotifyGlobalPropertyDelete ( const char * key )

Called when a remote GSS deletes a property from Global property cache.

If a local cache of properties are maintain, the implementation remove the entry from the cache.

Parameters:
key String key of the property.
Returns:
void

void onDebugCmd ( const char * cmd )

Upon typing a "plugin {cmd}" in the gss console, the {cmd} string is passed into plugin to help developers assist in their debugging efforts during run-time.

Depending upon the {cmd} that's passed in, developers can implement this method to print useful information for debugging.

Parameters:
cmd The NULL terminated string following the "plugin" keyword typed in the GSS console.
Returns:
void

void zprintf | ( | const char * | fmt,
 |  | ... |
 | ) |

Will print a message to the console just like printf Checks for g_debug == true and will call fflush(stdout) to force the print.

Parameters:
fmt printf style format string
Returns:
void

Variable Documentation

bool g_zonaDebug

Definition at line 23 of file ZonaSystem.h.


ZonaTimerEvents

Functions

void | onEntityTimerEvent (int eventId, ZonaServerEntity *entity, byte *eventData, short eventDataSize)
Called when a timer event for an Entity is fired.

void | onLoggedOutEntityTimerEvent (int eventId, ZonaServerEntity *entity, byte *eventData, short eventDataSize)
Called when a timer event for an Entity that already has logged out is fired.

void | onRegionTimerEvent (int eventId, int mapId, int regionId, byte *eventData, short size)
Called when timer event for Region is fired.

void | onGSSTimerEvent (int eventId, byte *eventData, short size)
Called when timer event for local GSS server is fired.

void | onWorldTimerEvent (int eventId, byte *eventData, short size)
Called when a Global/World timer event in fired.

Function Documentation

void onEntityTimerEvent | ( | int | eventId,
 |  | ZonaServerEntity * | entity,
 |  | byte * | eventData,
 |  | short | eventDataSize
 | ) |

Called when a timer event for an Entity is fired.

This event would have been previously set by setEntityLevelTimerEvent.

Note: This callback is only fired if the entity is a master Entity

Parameters:
eventId | Id of the event being fired.
entity | The ZonaServerEntity object associated with the entity
eventData | Event Data associated with the event
eventDataSize | Size of Event Data packet
Returns:
void

void onLoggedOutEntityTimerEvent | ( | int | eventId,
 |  | ZonaServerEntity * | entity,
 |  | byte * | eventData,
 |  | short | eventDataSize
 | ) |

Called when a timer event for an Entity that already has logged out is fired.

This event would have been previously set by setEntityLevelTimerEvent. This method will called on an arbitrary GSS.

Parameters:
eventId | Id of the event being fired.
entity | The ZonaServerEntity object associated with the entity
eventData | Event Data associated with the event
eventDataSize | Size of Event Data packet
Returns:
void

void onRegionTimerEvent | ( | int | eventId,
 |  | int | mapId,
 |  | int | regionId,
 |  | byte * | eventData,
 |  | short | size
 | ) |

Called when timer event for Region is fired.

This event would have been previously set by setRegionLevelTimerEvent.

Note: This callback is only fired if the Region is owned by this GSS

Parameters:
eventId | Id of the event being fired.
mapId | The id of the map to which this region belongs.
regionId | Id of the region associated with the event
eventData | Event Data associated with the event
size | Size of Event Data packet
Returns:
void

void onGSSTimerEvent | ( | int | eventId,
 |  | byte * | eventData,
 |  | short | size
 | ) |

Called when timer event for local GSS server is fired.

This event would have been previously set by setGssLevelTimerEvent.

Parameters:
eventId | Id of the event being fired.
eventData | Event Data associated with the event
size | Size of Event Data packet
Returns:
void

void onWorldTimerEvent | ( | int | eventId,
 |  | byte * | eventData,
 |  | short | size
 | ) |

Called when a Global/World timer event in fired.

This event will be fired in all the active GSS currently operating in the system This event would have been previously set by setWorldLevelTimerEvent. This method will be called in all GSS plug-ins.

Parameters:
eventId | Id of the event being fired.
eventData | Event Data associated with the event
size | Size of Event Data packet
Returns:
void


Here is a list of all file members with links to the files they belong to:

- _ -

  • _createNewZMO() : ZonaGSPublish.h
  • _createNewZMORecord() : ZonaGSPublish.h
  • _ZONABASEENTITY_H_INCLUDED_ : ZonaBaseEntity.h

- a -

  • AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_ : ZonaServerCharacter.h
  • AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_ : ZonaServerEntity.h

- b -

  • byte : ZonaSystem.h, ZonaGSPublish.h

- c -

  • cancelTimerEvent() : ZonaGSPublish.h
  • createNewGameStateRecord() : ZonaGSPublish.h
  • createNewGuildMembership() : ZonaGSPublish.h

- d -

  • deleteEntity() : ZonaGSPublish.h
  • deleteGlobalProperty() : ZonaGSPublish.h

- e -

  • ENTITY_UPDATE_MODE : ZonaEntityValidate.h
  • ENTITY_UPDATE_PROPERTY : ZonaEntityValidate.h
  • ENTITY_UPDATE_REGION : ZonaEntityValidate.h
  • ENTITY_UPDATE_ROLE : ZonaEntityValidate.h
  • ENTITY_UPDATE_TYPE : ZonaEntityValidate.h
  • ET_DEFAULT : ZonaEntityValidate.h
  • ET_IS_ATTACHED : ZonaEntityValidate.h
  • ET_IS_HIDDEN : ZonaEntityValidate.h
  • ET_RESERVED_2 : ZonaEntityValidate.h
  • ET_RESERVED_3 : ZonaEntityValidate.h
  • ET_RESERVED_4 : ZonaEntityValidate.h
  • ET_RESERVED_5 : ZonaEntityValidate.h
  • ET_RESERVED_6 : ZonaEntityValidate.h
  • ET_RESERVED_7 : ZonaEntityValidate.h
  • ET_RESERVED_8 : ZonaEntityValidate.h

- g -

  • g_zonaDebug : ZonaSystem.h
  • getAllEntities() : ZonaGSPublish.h
  • getCurrentGameStateRecord() : ZonaGSPublish.h
  • getCurrentGuildGameStateRecord() : ZonaGSPublish.h
  • getEntityWithId() : ZonaGSPublish.h
  • getGuildWithId() : ZonaGSPublish.h
  • getMillsSinceLogin() : ZonaGSPublish.h
  • getZAFLibVersion() : ZonaGSPublish.h

- i -

  • isGuildMemberOnLine() : ZonaGSPublish.h

- o -

  • onDebugCmd() : ZonaSystem.h
  • onDestruction() : ZonaSystem.h
  • onEnterEntity() : ZonaEntityValidate.h
  • onEntityDepartedGame() : ZonaEntityValidate.h
  • onEntityJoinedGame() : ZonaEntityValidate.h
  • onEntityTimerEvent() : ZonaTimerEvents.h
  • onExitEntity() : ZonaEntityValidate.h
  • onGetGamePluginVersion() : ZonaSystem.h
  • onGetMapDimensionX() : ZonaRegionValidate.h
  • onGetMapDimensionY() : ZonaRegionValidate.h
  • onGetMapDimensionZ() : ZonaRegionValidate.h
  • onGetRegionCount() : ZonaRegionValidate.h
  • onGetRegionNeighbors() : ZonaRegionValidate.h
  • onGSSTimerEvent() : ZonaTimerEvents.h
  • onInitialization() : ZonaSystem.h
  • onLoadMap() : ZonaRegionValidate.h
  • onLoggedOutEntityTimerEvent() : ZonaTimerEvents.h
  • onNotifyEntityUpdate() : ZonaEntityValidate.h
  • onNotifyGameStateMsgUpdate() : ZonaGameStateValidate.h
  • onNotifyGlobalPropertyDelete() : ZonaSystem.h
  • onNotifyGlobalPropertyUpdate() : ZonaSystem.h
  • onNotifyTransferEntity() : ZonaEntityValidate.h
  • onPlaceEntityInRegion() : ZonaRegionValidate.h
  • onReceiveUpdateToEntity() : ZonaEntityValidate.h
  • onRegionTimerEvent() : ZonaTimerEvents.h
  • onValidateAddChatGuildModerator() : ZonaChatGuildValidate.h
  • onValidateAddGameGuildModerator() : ZonaGameGuildValidate.h
  • onValidateAddMemberToChatGuild() : ZonaChatGuildValidate.h
  • onValidateClientVersion() : ZonaSystem.h
  • onValidateCreateCharacter() : ZonaCharacterValidate.h
  • onValidateCreateChatGuild() : ZonaChatGuildValidate.h
  • onValidateCreateChildEntity() : ZonaEntityValidate.h
  • onValidateCreateGameGuild() : ZonaGameGuildValidate.h
  • onValidateDeleteCharacter() : ZonaCharacterValidate.h
  • onValidateDeleteChatGuild() : ZonaChatGuildValidate.h
  • onValidateDeleteChildEntity() : ZonaEntityValidate.h
  • onValidateDeleteGameGuild() : ZonaGameGuildValidate.h
  • onValidateEnterGameGuild() : ZonaGameGuildValidate.h
  • onValidateEntityPropertyUpdate() : ZonaEntityValidate.h
  • onValidateEntityTypeUpdate() : ZonaEntityValidate.h
  • onValidateExitGameGuild() : ZonaGameGuildValidate.h
  • onValidateGameGuildChat() : ZonaGameGuildValidate.h
  • onValidateGameGuildEntityPropertyUpdate() : ZonaGameGuildValidate.h
  • onValidateGameGuildGameState() : ZonaGameGuildValidate.h
  • onValidateGameStateMsg() : ZonaGameStateValidate.h
  • onValidateInviteMember() : ZonaGameGuildValidate.h
  • onValidateJoinGameGuild() : ZonaGameGuildValidate.h
  • onValidateKickMember() : ZonaGameGuildValidate.h
  • onValidateLeaveGameGuild() : ZonaGameGuildValidate.h
  • onValidateLoadGameGuild() : ZonaGameGuildValidate.h
  • onValidateRemoveChatGuildModerator() : ZonaChatGuildValidate.h
  • onValidateRemoveGameGuildModerator() : ZonaGameGuildValidate.h
  • onValidateRemoveMemberFromChatGuild() : ZonaChatGuildValidate.h
  • onValidateTransferEntity() : ZonaEntityValidate.h
  • onValidateUpdateCharacter() : ZonaCharacterValidate.h
  • onWorldTimerEvent() : ZonaTimerEvents.h

- p -

  • PUB_OP_CLIENT_PRIVATE : ZonaGSPublish.h
  • PUB_OP_CLIENTS : ZonaGSPublish.h
  • PUB_OP_DISCARD : ZonaGSPublish.h
  • PUB_OP_MASTER_ENTITY : ZonaGSPublish.h
  • PUB_OP_SERVERS : ZonaGSPublish.h
  • PUB_QOM_0 : ZonaGSPublish.h
  • PUB_QOM_1 : ZonaGSPublish.h
  • PUB_QOM_2 : ZonaGSPublish.h
  • PUB_QOM_3 : ZonaGSPublish.h
  • publishGameStateMsgInGuild() : ZonaGSPublish.h
  • publishGameStateMsgInSphere() : ZonaGSPublish.h
  • publishGameStateMsgToAllMasterEntities() : ZonaGSPublish.h
  • publishGameStateMsgToEntity() : ZonaGSPublish.h

- r -

  • removeMembership() : ZonaGSPublish.h

- s -

  • sendUpdateToEntity() : ZonaGSPublish.h
  • setEntityLevelTimerEvent() : ZonaGSPublish.h
  • setGlobalProperty() : ZonaGSPublish.h
  • setGSSLevelTimerEvent() : ZonaGSPublish.h
  • setMapSize() : ZonaGSPublish.h
  • setRegionLevelTimerEvent() : ZonaGSPublish.h
  • setWorldLevelTimerEvent() : ZonaGSPublish.h

- t -

  • TYPE_DISPLAY_PROPS : ZonaEntityValidate.h
  • TYPE_PRIVATE_PROPS : ZonaEntityValidate.h
  • TYPE_STATE_PROPS : ZonaEntityValidate.h
  • TYPE_SYSTEM_PROPS : ZonaEntityValidate.h

- u -

  • updatePlayerPosition() : ZonaGSPublish.h
  • updatePlayerScore() : ZonaGSPublish.h

- z -

  • ZONA_USER_ROLE_GAMEMASTER : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_NPC : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_OVERLORD : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_PLAYER : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_SYSTEMADMIN : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_UNKNOWN : ZonaCharacterValidate.h
  • ZonaBaseEntityPtrVector : ZonaBaseEntity.h
  • zprintf() : ZonaSystem.h


Terazona C++ Server Plugin API Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
GameStateRecord | Structure used to represent a validated state record
GuildGameStateRecord | Structure used to represent a validated Game Guild state record
ZonaBaseEntity |
ZonaServerCharacter |
ZonaServerEntity |


Terazona C++ Server Plugin API Class Index

G
GuildGameStateRecord ZonaBaseEntity ZonaServerCharacter ZonaServerEntity
GameStateRecord
Z


ZonaBaseEntity Member List

This is the complete list of members for ZonaBaseEntity, including all inherited members.
getEntityId()=0 | ZonaBaseEntity | [pure virtual]
getEntityInfo()=0 | ZonaBaseEntity | [pure virtual]
getEntityType()=0 | ZonaBaseEntity | [pure virtual]
getIsMaster()=0 | ZonaBaseEntity | [pure virtual]
getMapId()=0 | ZonaBaseEntity | [pure virtual]
getParentId()=0 | ZonaBaseEntity | [pure virtual]
setEntityId(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityInfo(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityType(int value)=0 | ZonaBaseEntity | [pure virtual]
setIsMaster(bool value)=0 | ZonaBaseEntity | [pure virtual]
setMapId(int value)=0 | ZonaBaseEntity | [pure virtual]
setParentId(int value)=0 | ZonaBaseEntity | [pure virtual]
ZonaBaseEntity(int type) | ZonaBaseEntity |
ZonaBaseEntity() | ZonaBaseEntity |
~ZonaBaseEntity() | ZonaBaseEntity | [virtual]


ZonaServerCharacter Member List

This is the complete list of members for ZonaServerCharacter, including all inherited members.
_copyDirtyPropertiesToSharedArea() | ZonaServerEntity |
_getZMBlob() | ZonaServerEntity |
_setZMBlob(char *memPtr) | ZonaServerEntity |
_updatePropertiesFromSharedArea() | ZonaServerEntity |
exit() | ZonaServerEntity |
getEntityId()=0 | ZonaBaseEntity | [pure virtual]
getEntityInfo()=0 | ZonaBaseEntity | [pure virtual]
getEntityType()=0 | ZonaBaseEntity | [pure virtual]
getIsMaster()=0 | ZonaBaseEntity | [pure virtual]
getMapId()=0 | ZonaBaseEntity | [pure virtual]
getMaster() | ZonaServerEntity | [virtual]
getName(int &len)=0 | ZonaServerCharacter | [pure virtual]
getParentId()=0 | ZonaBaseEntity | [pure virtual]
getRegionId()=0 | ZonaServerEntity | [pure virtual]
publish() | ZonaServerEntity | [protected, virtual]
save(bool shouldAudit) | ZonaServerEntity |
setEntityId(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityInfo(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityType(int value)=0 | ZonaBaseEntity | [pure virtual]
setIsMaster(bool value)=0 | ZonaBaseEntity | [pure virtual]
setMapId(int value)=0 | ZonaBaseEntity | [pure virtual]
setMaster(bool val) | ZonaServerEntity | [virtual]
setName(char *name, int len)=0 | ZonaServerCharacter | [pure virtual]
setParentId(int value)=0 | ZonaBaseEntity | [pure virtual]
setProperty(int fieldIndex, SlicedByteArray *val) | ZonaServerEntity | [protected, virtual]
setRegionId(int value)=0 | ZonaServerEntity | [pure virtual]
ZonaBaseEntity(int type) | ZonaBaseEntity |
ZonaBaseEntity() | ZonaBaseEntity |
ZonaServerCharacter(int type) | ZonaServerCharacter |
ZonaServerCharacter() | ZonaServerCharacter | [inline]
ZonaServerEntity(int type) | ZonaServerEntity |
ZonaServerEntity() | ZonaServerEntity | [inline]
~ZonaBaseEntity() | ZonaBaseEntity | [virtual]
~ZonaServerCharacter() | ZonaServerCharacter | [virtual]
~ZonaServerEntity() | ZonaServerEntity | [virtual]


ZonaServerEntity Member List

This is the complete list of members for ZonaServerEntity, including all inherited members.
_copyDirtyPropertiesToSharedArea() | ZonaServerEntity |
_getZMBlob() | ZonaServerEntity |
_setZMBlob(char *memPtr) | ZonaServerEntity |
_updatePropertiesFromSharedArea() | ZonaServerEntity |
exit() | ZonaServerEntity |
getEntityId()=0 | ZonaBaseEntity | [pure virtual]
getEntityInfo()=0 | ZonaBaseEntity | [pure virtual]
getEntityType()=0 | ZonaBaseEntity | [pure virtual]
getIsMaster()=0 | ZonaBaseEntity | [pure virtual]
getMapId()=0 | ZonaBaseEntity | [pure virtual]
getMaster() | ZonaServerEntity | [virtual]
getParentId()=0 | ZonaBaseEntity | [pure virtual]
getRegionId()=0 | ZonaServerEntity | [pure virtual]
publish() | ZonaServerEntity | [protected, virtual]
save(bool shouldAudit) | ZonaServerEntity |
setEntityId(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityInfo(int value)=0 | ZonaBaseEntity | [pure virtual]
setEntityType(int value)=0 | ZonaBaseEntity | [pure virtual]
setIsMaster(bool value)=0 | ZonaBaseEntity | [pure virtual]
setMapId(int value)=0 | ZonaBaseEntity | [pure virtual]
setMaster(bool val) | ZonaServerEntity | [virtual]
setParentId(int value)=0 | ZonaBaseEntity | [pure virtual]
setProperty(int fieldIndex, SlicedByteArray *val) | ZonaServerEntity | [protected, virtual]
setRegionId(int value)=0 | ZonaServerEntity | [pure virtual]
ZonaBaseEntity(int type) | ZonaBaseEntity |
ZonaBaseEntity() | ZonaBaseEntity |
ZonaServerEntity(int type) | ZonaServerEntity |
ZonaServerEntity() | ZonaServerEntity | [inline]
~ZonaBaseEntity() | ZonaBaseEntity | [virtual]
~ZonaServerEntity() | ZonaServerEntity | [virtual]


Terazona C++ Server Plugin API File List

Here is a list of all files with brief descriptions:
ZonaBaseEntity.h [code]
ZonaCharacterValidate.h [code]
ZonaChatGuildValidate.h [code]
ZonaEntityValidate.h [code]
ZonaGameGuildValidate.h [code]
ZonaGameStateValidate.h [code]
ZonaGSPublish.h [code]
ZonaRegionValidate.h [code]
ZonaServerCharacter.h [code]
ZonaServerEntity.h [code]
ZonaSystem.h [code]
ZonaTimerEvents.h [code]


- _ -

  • _copyDirtyPropertiesToSharedArea() : ZonaServerEntity
  • _getZMBlob() : ZonaServerEntity
  • _setZMBlob() : ZonaServerEntity
  • _updatePropertiesFromSharedArea() : ZonaServerEntity

- e -

  • exit() : ZonaServerEntity

- g -

  • getEntityId() : ZonaBaseEntity
  • getEntityInfo() : ZonaBaseEntity
  • getEntityType() : ZonaBaseEntity
  • getIsMaster() : ZonaBaseEntity
  • getMapId() : ZonaBaseEntity
  • getMaster() : ZonaServerEntity
  • getName() : ZonaServerCharacter
  • getParentId() : ZonaBaseEntity
  • getRegionId() : ZonaServerEntity

- p -

  • publish() : ZonaServerEntity

- s -

  • save() : ZonaServerEntity
  • setEntityId() : ZonaBaseEntity
  • setEntityInfo() : ZonaBaseEntity
  • setEntityType() : ZonaBaseEntity
  • setIsMaster() : ZonaBaseEntity
  • setMapId() : ZonaBaseEntity
  • setMaster() : ZonaServerEntity
  • setName() : ZonaServerCharacter
  • setParentId() : ZonaBaseEntity
  • setProperty() : ZonaServerEntity
  • setRegionId() : ZonaServerEntity

- z -

  • ZonaBaseEntity() : ZonaBaseEntity
  • ZonaServerCharacter() : ZonaServerCharacter
  • ZonaServerEntity() : ZonaServerEntity

- ~ -

  • ~ZonaBaseEntity() : ZonaBaseEntity
  • ~ZonaServerCharacter() : ZonaServerCharacter
  • ~ZonaServerEntity() : ZonaServerEntity


  • entityId : GuildGameStateRecord, GameStateRecord
  • entityMapId : GameStateRecord
  • entityRegionId : GameStateRecord
  • entityType : GameStateRecord
  • guildId : GuildGameStateRecord
  • operation : GuildGameStateRecord, GameStateRecord
  • recordType : GuildGameStateRecord, GameStateRecord
  • stateData : GuildGameStateRecord, GameStateRecord
  • stateDataLen : GuildGameStateRecord, GameStateRecord
  • stateDataOffset : GuildGameStateRecord, GameStateRecord


  • _ZONABASEENTITY_H_INCLUDED_ : ZonaBaseEntity.h
  • AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_ : ZonaServerCharacter.h
  • AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_ : ZonaServerEntity.h
  • ENTITY_UPDATE_MODE : ZonaEntityValidate.h
  • ENTITY_UPDATE_PROPERTY : ZonaEntityValidate.h
  • ENTITY_UPDATE_REGION : ZonaEntityValidate.h
  • ENTITY_UPDATE_ROLE : ZonaEntityValidate.h
  • ENTITY_UPDATE_TYPE : ZonaEntityValidate.h
  • PUB_OP_CLIENT_PRIVATE : ZonaGSPublish.h
  • PUB_OP_CLIENTS : ZonaGSPublish.h
  • PUB_OP_DISCARD : ZonaGSPublish.h
  • PUB_OP_MASTER_ENTITY : ZonaGSPublish.h
  • PUB_OP_SERVERS : ZonaGSPublish.h
  • PUB_QOM_0 : ZonaGSPublish.h
  • PUB_QOM_1 : ZonaGSPublish.h
  • PUB_QOM_2 : ZonaGSPublish.h
  • PUB_QOM_3 : ZonaGSPublish.h
  • TYPE_DISPLAY_PROPS : ZonaEntityValidate.h
  • TYPE_PRIVATE_PROPS : ZonaEntityValidate.h
  • TYPE_STATE_PROPS : ZonaEntityValidate.h
  • TYPE_SYSTEM_PROPS : ZonaEntityValidate.h
  • ZONA_USER_ROLE_GAMEMASTER : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_NPC : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_OVERLORD : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_PLAYER : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_SYSTEMADMIN : ZonaCharacterValidate.h
  • ZONA_USER_ROLE_UNKNOWN : ZonaCharacterValidate.h


- _ -

  • _createNewZMO() : ZonaGSPublish.h
  • _createNewZMORecord() : ZonaGSPublish.h

- c -

  • cancelTimerEvent() : ZonaGSPublish.h
  • createNewGameStateRecord() : ZonaGSPublish.h
  • createNewGuildMembership() : ZonaGSPublish.h

- d -

  • deleteEntity() : ZonaGSPublish.h
  • deleteGlobalProperty() : ZonaGSPublish.h

- g -

  • getAllEntities() : ZonaGSPublish.h
  • getCurrentGameStateRecord() : ZonaGSPublish.h
  • getCurrentGuildGameStateRecord() : ZonaGSPublish.h
  • getEntityWithId() : ZonaGSPublish.h
  • getGuildWithId() : ZonaGSPublish.h
  • getMillsSinceLogin() : ZonaGSPublish.h
  • getZAFLibVersion() : ZonaGSPublish.h

- i -

  • isGuildMemberOnLine() : ZonaGSPublish.h

- o -

  • onDebugCmd() : ZonaSystem.h
  • onDestruction() : ZonaSystem.h
  • onEnterEntity() : ZonaEntityValidate.h
  • onEntityDepartedGame() : ZonaEntityValidate.h
  • onEntityJoinedGame() : ZonaEntityValidate.h
  • onEntityTimerEvent() : ZonaTimerEvents.h
  • onExitEntity() : ZonaEntityValidate.h
  • onGetGamePluginVersion() : ZonaSystem.h
  • onGetMapDimensionX() : ZonaRegionValidate.h
  • onGetMapDimensionY() : ZonaRegionValidate.h
  • onGetMapDimensionZ() : ZonaRegionValidate.h
  • onGetRegionCount() : ZonaRegionValidate.h
  • onGetRegionNeighbors() : ZonaRegionValidate.h
  • onGSSTimerEvent() : ZonaTimerEvents.h
  • onInitialization() : ZonaSystem.h
  • onLoadMap() : ZonaRegionValidate.h
  • onLoggedOutEntityTimerEvent() : ZonaTimerEvents.h
  • onNotifyEntityUpdate() : ZonaEntityValidate.h
  • onNotifyGameStateMsgUpdate() : ZonaGameStateValidate.h
  • onNotifyGlobalPropertyDelete() : ZonaSystem.h
  • onNotifyGlobalPropertyUpdate() : ZonaSystem.h
  • onNotifyTransferEntity() : ZonaEntityValidate.h
  • onPlaceEntityInRegion() : ZonaRegionValidate.h
  • onReceiveUpdateToEntity() : ZonaEntityValidate.h
  • onRegionTimerEvent() : ZonaTimerEvents.h
  • onValidateAddChatGuildModerator() : ZonaChatGuildValidate.h
  • onValidateAddGameGuildModerator() : ZonaGameGuildValidate.h
  • onValidateAddMemberToChatGuild() : ZonaChatGuildValidate.h
  • onValidateClientVersion() : ZonaSystem.h
  • onValidateCreateCharacter() : ZonaCharacterValidate.h
  • onValidateCreateChatGuild() : ZonaChatGuildValidate.h
  • onValidateCreateChildEntity() : ZonaEntityValidate.h
  • onValidateCreateGameGuild() : ZonaGameGuildValidate.h
  • onValidateDeleteCharacter() : ZonaCharacterValidate.h
  • onValidateDeleteChatGuild() : ZonaChatGuildValidate.h
  • onValidateDeleteChildEntity() : ZonaEntityValidate.h
  • onValidateDeleteGameGuild() : ZonaGameGuildValidate.h
  • onValidateEnterGameGuild() : ZonaGameGuildValidate.h
  • onValidateEntityPropertyUpdate() : ZonaEntityValidate.h
  • onValidateEntityTypeUpdate() : ZonaEntityValidate.h
  • onValidateExitGameGuild() : ZonaGameGuildValidate.h
  • onValidateGameGuildChat() : ZonaGameGuildValidate.h
  • onValidateGameGuildEntityPropertyUpdate() : ZonaGameGuildValidate.h
  • onValidateGameGuildGameState() : ZonaGameGuildValidate.h
  • onValidateGameStateMsg() : ZonaGameStateValidate.h
  • onValidateInviteMember() : ZonaGameGuildValidate.h
  • onValidateJoinGameGuild() : ZonaGameGuildValidate.h
  • onValidateKickMember() : ZonaGameGuildValidate.h
  • onValidateLeaveGameGuild() : ZonaGameGuildValidate.h
  • onValidateLoadGameGuild() : ZonaGameGuildValidate.h
  • onValidateRemoveChatGuildModerator() : ZonaChatGuildValidate.h
  • onValidateRemoveGameGuildModerator() : ZonaGameGuildValidate.h
  • onValidateRemoveMemberFromChatGuild() : ZonaChatGuildValidate.h
  • onValidateTransferEntity() : ZonaEntityValidate.h
  • onValidateUpdateCharacter() : ZonaCharacterValidate.h
  • onWorldTimerEvent() : ZonaTimerEvents.h

- p -

  • publishGameStateMsgInGuild() : ZonaGSPublish.h
  • publishGameStateMsgInSphere() : ZonaGSPublish.h
  • publishGameStateMsgToAllMasterEntities() : ZonaGSPublish.h
  • publishGameStateMsgToEntity() : ZonaGSPublish.h

- r -

  • removeMembership() : ZonaGSPublish.h

- s -

  • sendUpdateToEntity() : ZonaGSPublish.h
  • setEntityLevelTimerEvent() : ZonaGSPublish.h
  • setGlobalProperty() : ZonaGSPublish.h
  • setGSSLevelTimerEvent() : ZonaGSPublish.h
  • setMapSize() : ZonaGSPublish.h
  • setRegionLevelTimerEvent() : ZonaGSPublish.h
  • setWorldLevelTimerEvent() : ZonaGSPublish.h

- u -

  • updatePlayerPosition() : ZonaGSPublish.h
  • updatePlayerScore() : ZonaGSPublish.h

- z -

  • zprintf() : ZonaSystem.h


  • byte : ZonaSystem.h, ZonaGSPublish.h
  • ZonaBaseEntityPtrVector : ZonaBaseEntity.h


  • ET_DEFAULT : ZonaEntityValidate.h
  • ET_IS_ATTACHED : ZonaEntityValidate.h
  • ET_IS_HIDDEN : ZonaEntityValidate.h
  • ET_RESERVED_2 : ZonaEntityValidate.h
  • ET_RESERVED_3 : ZonaEntityValidate.h
  • ET_RESERVED_4 : ZonaEntityValidate.h
  • ET_RESERVED_5 : ZonaEntityValidate.h
  • ET_RESERVED_6 : ZonaEntityValidate.h
  • ET_RESERVED_7 : ZonaEntityValidate.h
  • ET_RESERVED_8 : ZonaEntityValidate.h
  • g_zonaDebug : ZonaSystem.h


Terazona C++ Server Plugin API Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
  • GameStateRecord
  • GuildGameStateRecord
  • ZonaBaseEntity
    • ZonaServerEntity
      • ZonaServerCharacter


Terazona C++ Server Plugin API Modules

Here is a list of all modules:
  • ZonaPublish
  • ZonaCharacterValidate
  • ZonaEntityValidate
  • ZonaGameStateValidate
  • ZonaChatGuildValidate
  • ZonaRegionValidate
  • ZonaSystem
  • ZonaTimerEvents


GameStateRecord Member List

This is the complete list of members for GameStateRecord, including all inherited members.
entityId | GameStateRecord
entityMapId | GameStateRecord
entityRegionId | GameStateRecord
entityType | GameStateRecord
operation | GameStateRecord
recordType | GameStateRecord
stateData | GameStateRecord
stateDataLen | GameStateRecord
stateDataOffset | GameStateRecord


GuildGameStateRecord Member List

This is the complete list of members for GuildGameStateRecord, including all inherited members.
entityId | GuildGameStateRecord
guildId | GuildGameStateRecord
operation | GuildGameStateRecord
recordType | GuildGameStateRecord
stateData | GuildGameStateRecord
stateDataLen | GuildGameStateRecord
stateDataOffset | GuildGameStateRecord


ZonaBaseEntity.h

Go to the documentation of this file.
00001 // ZonaBaseEntity.h: interface for the ZonaBaseEntity class.
00002 //
00004
00005 #if !defined(_ZONABASEENTITY_H_INCLUDED_)
00006 #define _ZONABASEENTITY_H_INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include "Zona_API.h"
00013 #include "util/ZVector.h"
00014 #include "ZonaModeler/ZonaModelerObject.h"
00015
00016 ZONA_NAMESPACE_BEGIN
00017
00018 class ZonaBaseEntity : public ZonaModelerObject
00019 {
00020   public:
00024     ZonaBaseEntity(int type);
00025
00029     ZonaBaseEntity();
00030
00034     virtual ~ZonaBaseEntity();
00035
00040     virtual int  getEntityId()=0;
00041
00046     virtual int  getParentId()=0;
00047
00053     virtual int  getEntityType()=0;
00054
00060     virtual int  getEntityInfo()=0;
00061
00067     virtual int  getMapId()=0;
00068
00069
00075     virtual void setEntityId(int value)=0;
00076
00082     virtual void setParentId(int value)=0;
00083
00090     virtual void setEntityType(int value)=0;
00091
00097     virtual void setEntityInfo(int value)=0;
00098
00104     virtual void setMapId(int value)=0;
00105
00106
00107
00108     virtual void setIsMaster(bool value)=0;
00109     virtual bool getIsMaster()=0;
00110
00111 };
00112
00113 typedef ZVector<ZonaBaseEntity *> ZonaBaseEntityPtrVector;
00114
00115 ZONA_NAMESPACE_END
00116 ZONA_USING_NAMESPACE
00117
00118 #endif // !defined(_ZONABASEENTITY_H_INCLUDED_)


ZonaCharacterValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaCharacterValidate.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONACHARACTERVALIDATE_H
00011 #define ZONACHARACTERVALIDATE_H
00012
00013 #include "ZonaSystem.h"
00014 #include "util/ZonaServerCharacter.h"
00015
00016 /******************* USER ROLE CONSTANTS ********************************/
00017
00018 // Indicates an unknown user
00019 #define ZONA_USER_ROLE_UNKNOWN      0
00020 // Indicates the system administrator
00021 #define ZONA_USER_ROLE_SYSTEMADMIN  1
00022 // Indicates an overlord
00023 #define ZONA_USER_ROLE_OVERLORD     2
00024 // Indicates the Gamemaster.
00025 #define ZONA_USER_ROLE_GAMEMASTER   4
00026 // Indicates a Non Playing character.
00027 #define ZONA_USER_ROLE_NPC          8
00028 // Indicates a game player
00029 #define ZONA_USER_ROLE_PLAYER       16
00030
00031 /*****************************************************************************/
00032
00055 bool onValidateCreateCharacter(ZonaServerCharacter *newCharacter);
00056
00057
00078 bool onValidateUpdateCharacter(ZonaServerCharacter *newCharacter,
00079                                                            ZonaServerCharacter *previousCharacter);
00080
00081
00097 bool onValidateDeleteCharacter(ZonaServerCharacter *character);
00098
00101 #endif


ZonaChatGuildValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaChatGuildValidate.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONAGUILDVALIDATE_H
00011 #define ZONAGUILDVALIDATE_H
00012
00013 #include "ZonaSystem.h"
00014
00026 bool onValidateCreateChatGuild(ZonaServerGuild* guild, int entityId);
00027
00036 bool onValidateDeleteChatGuild(ZonaServerGuild* guild, int entityId);
00037
00046 bool onValidateAddMemberToChatGuild(ZonaServerGuild* guild, int entityId);
00047
00056 bool onValidateRemoveMemberFromChatGuild(ZonaServerGuild* guild, int entityId);
00057
00058
00068 bool onValidateAddChatGuildModerator(ZonaServerGuild* guild, int memberId, int moderatorId);
00069
00070
00081 bool onValidateRemoveChatGuildModerator(ZonaServerGuild* guild, int moderatorId);
00082
00085 #endif


ZonaEntityValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaEntityValidate.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONAENTITYVALIDATE_H
00011 #define ZONAENTITYVALIDATE_H
00012
00013 #include "ZonaSystem.h"
00014
00019 /*************Entity State Management functions************/
00020
00021 /***** Flags for onNotifyEntityUpdate *********************/
00022 /*****           and onValidateEntityProperty *************/
00023 #define TYPE_STATE_PROPS   64
00024 #define TYPE_DISPLAY_PROPS 128
00025 #define TYPE_PRIVATE_PROPS 256
00026 #define TYPE_SYSTEM_PROPS  512
00027 /**********************************************************/
00028
00029 /***** Flags for onNotifyEntityUpdate *********************/
00030 #define ENTITY_UPDATE_TYPE               1
00031 #define ENTITY_UPDATE_ROLE               2
00032 #define ENTITY_UPDATE_MODE               3
00033 #define ENTITY_UPDATE_REGION             4
00034 #define ENTITY_UPDATE_PROPERTY           5
00035 /**********************************************************/
00036
00037 /***** Entity Types ***************************************/
00038 static int ET_DEFAULT            = 0;
00040 static int ET_IS_HIDDEN      = 1;
00042 static int ET_IS_ATTACHED    = 2;
00043 static int ET_RESERVED_2     = 4;
00044 static int ET_RESERVED_3     = 8;
00045 static int ET_RESERVED_4     = 16;
00046 static int ET_RESERVED_5     = 32;
00047 static int ET_RESERVED_6     = 64;
00048 static int ET_RESERVED_7     = 128;
00049 static int ET_RESERVED_8     = 256;
00050 /**********************************************************/
00051
00063 int      onEntityJoinedGame(ZonaServerEntity *entity);
00064
00065
00078 bool onEntityDepartedGame(ZonaServerEntity *entity);
00079
00080
00092 bool onEnterEntity(ZonaServerEntity *entity);
00093
00094
00106 bool onExitEntity(ZonaServerEntity *entity);
00107
00108
00121 void onNotifyEntityUpdate(ZonaServerEntity *entity, int flags);
00122
00123
00147 bool onValidateEntityPropertyUpdate(ZonaServerEntity *entity,
00148                                     ZonaServerEntity *previousEntity);
00149
00150
00164 bool onValidateTransferEntity(int childEntityId, int currentParentId, int newParentId);
00165
00178 void onNotifyTransferEntity(int childEntityId, int prevParentId, int newParentId);
00179
00190 bool onValidateCreateChildEntity(ZonaServerEntity *newChildEntity);
00191
00202 bool onValidateDeleteChildEntity(ZonaServerEntity *entity);
00203
00204
00218 bool onValidateEntityTypeUpdate(ZonaServerEntity *entity, int newType);
00219
00233 void onReceiveUpdateToEntity(ZonaServerEntity *entity, byte* gsm, short size);
00236 #endif


ZonaGameGuildValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2001, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaGSPublish.h
00007  * Original Author: Zona
00008  ********************************************************************/
00009 #ifndef ZONAGAMEGUILD_H
00010 #define ZONAGAMEGUILD_H
00011
00012 #include "util/ZonaServerGuild.h"
00013 #include "ZonaGameStateValidate.h"
00014
00024 bool onValidateCreateGameGuild(ZonaServerGuild* guild, int entityId);
00025
00035 bool onValidateDeleteGameGuild(ZonaServerGuild* guild, int entityId);
00036
00046 bool onValidateLoadGameGuild(ZonaServerGuild* guild);
00047
00048
00059 bool onValidateInviteMember(ZonaServerGuild* guild, int inviterId, int inviteeId);
00060
00071 bool onValidateKickMember(ZonaServerGuild* guild, int memberId, int targetId);
00072
00083 bool onValidateAddGameGuildModerator(ZonaServerGuild* guild, int memberId, int moderatorId);
00084
00095 bool onValidateRemoveGameGuildModerator(ZonaServerGuild* guild, int moderatorId);
00096
00107 bool onValidateJoinGameGuild(ZonaServerGuild* guild, int entityId);
00108
00109
00119 bool onValidateLeaveGameGuild(ZonaServerGuild* guild, int entityId);
00120
00130 bool onValidateEnterGameGuild(ZonaServerGuild* guild, int entityId);
00131
00141 bool onValidateExitGameGuild(ZonaServerGuild* guild, int entityId);
00142
00154 bool onValidateGameGuildGameState(ZonaServerGuild* guild,
00155                                                                   int entityId, char* stateData, int stateLength);
00156
00171 bool onValidateGameGuildChat(ZonaServerGuild* guild, int entityId,
00172                                                          char* chatSubject, int subjectLength,
00173                                                          char* chatBody, int bodyLength);
00174
00185 bool onValidateGameGuildEntityPropertyUpdate(ZonaServerGuild* guild ,
00186                                                                                 ZonaServerEntity *entity,
00187                                                                                         ZonaServerEntity *previousEntity);
00188
00189
00190
00196 struct GuildGameStateRecord
00197 {
00198         int             recordType;              // This value should never be modified
00199         int             guildId;                 // The guild id of this guild game state
00200         int     entityId;                // The entity id corresponding to state update
00201         int             stateDataOffset; // The offset for reading / writing state data.
00202                                                          // This value should never be modified
00203     int         operation ;              // The operation ( bit combinations ) for this entity state
00204                                                          //     PUB_OP_DISCARD                  Msg will not be published
00205                                                          //     PUB_OP_CLIENTS          Msg is sent to clients in guild
00206         int             stateDataLen ;   // The length of the state data to be published
00207                                                          // This value should not be modified if it has been
00208                                                          // obtained by a call to getCurrentGuildGameStateRecord.
00209         char*   stateData;
00210
00211 };
00212
00213
00214 #endif
00215


ZonaGameStateValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaGameStateValidate.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONAGAMESTATEVALIDATE_H
00011 #define ZONAGAMESTATEVALIDATE_H
00012
00013 #include "ZonaSystem.h"
00014
00024 struct GameStateRecord {
00025         int             recordType;              // This value should never be modified
00026         int     entityId;                // The entity id for corresponding to state update
00027         int     entityType;              // The entity type
00028     int     entityRegionId ; // The region id of the above entity
00029         int             entityMapId;     // the Map Id of the above entity.
00030         int             stateDataOffset; // The offset for reading / writing state data.
00031                                                          // This value should never be modified
00032     int         operation ;              // The operation ( bit combinations ) for this entity state
00033                                                          //     PUB_OP_DISCARD                  Msg will not be published
00034                                                          //     PUB_OP_CLIENT_PRIVATE   Msg will be sent to client hosting entity entityId
00035                                                          //     PUB_OP_CLIENTS          Msg is sent to clients in sphere
00036                                                          // PUB_OP_SERVERS          Msg is sent to the neighboring servers
00037     int         stateDataLen ;   // The length of the state data to be published
00038                                                          // This value should not be modified if it has been
00039                                                          // obtained by a call to getCurrentStateRecord.
00040         char*   stateData;
00041
00042 };
00043
00044
00062 void onValidateGameStateMsg(ZonaServerEntity *entity, byte* gsm, short size);
00063
00064
00075 void onNotifyGameStateMsgUpdate(ZonaServerEntity *entity, byte* gsm, short size);
00076
00079 #endif


ZonaGSPublish.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2001, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaGSPublish.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009 #ifndef ZONAGSPUBLISH_H
00010 #define ZONAGSPUBLISH_H
00011
00012 #include <stdlib.h>
00013 #include <stdio.h>
00014
00015 #include "ZonaGameStateValidate.h" // Shared Memory mgmt
00016 #include "ZonaGameGuildValidate.h"
00017
00022 #pragma warning(disable: 4786)
00023
00024 typedef unsigned char byte;
00025
00026 /*****************************************************************************/
00031 #define PUB_OP_DISCARD                  1
00032
00037 #define PUB_OP_CLIENT_PRIVATE   2
00038
00040 #define PUB_QOM_0                               0
00041 #define PUB_QOM_1                               4
00042 #define PUB_QOM_2                               8
00043 #define PUB_QOM_3                               12
00044
00045 #define PUB_OP_CLIENTS                  16
00046
00047 #define PUB_OP_SERVERS                  32
00048 #define PUB_OP_MASTER_ENTITY    64
00049
00050 /*****************************************************************************/
00051
00053
00054
00055
00064 void getZAFLibVersion(char* versionStr);
00065
00075 bool deleteEntity(int entityId);
00076
00077
00078
00104 bool publishGameStateMsgInSphere(int mapId,
00105                                                                  int regionId,
00106                                                                  int qos,
00107                                                                  int operation,
00108                                                                  byte *gsm,  short size);
00109
00141 bool publishGameStateMsgToEntity(int recipientEntityId,
00142                                                                  int qos, int operation,
00143                                                                  byte *gsm, short size);
00144
00145
00158 bool publishGameStateMsgToAllMasterEntities(int qos,
00159                                                 int operation,
00160                                                 byte* stateData, short dataSize);
00161
00162
00186 bool publishGameStateMsgInGuild(int guildId,
00187                                                                 int entityId,
00188                                                                 int operation,
00189                                                                 int qos,
00190                                                                  byte *stateData,  short stateSize);
00191
00207 bool sendUpdateToEntity(int guildId,
00208                                                 int entityId,
00209                                                 byte* stateData,  short stateSize);
00210
00219 int getMillsSinceLogin(int anEntityId);
00220
00221
00222
00223
00224 /****************************************************************
00225  * The following functions used for shared memory access between
00226  * java and plugin.
00227 *****************************************************************/
00228
00229
00241 GameStateRecord*        getCurrentGameStateRecord();
00242
00243
00257 GuildGameStateRecord*   getCurrentGuildGameStateRecord();
00258
00272 GameStateRecord*        createNewGameStateRecord(int length, byte* entityDataPtr);
00273
00274
00276
00293 int setEntityLevelTimerEvent(int entityId, long delay, byte* eventData, short size, int period);
00294
00295
00313 int setRegionLevelTimerEvent(int mapId, int regionId,
00314                                                          long delay, byte* eventData, short size, int period);
00315
00316
00332 int setGSSLevelTimerEvent(long delay, byte* eventData, short size, int period);
00333
00334
00351 int setWorldLevelTimerEvent(long delay, byte* eventData, short size, int period);
00352
00353
00363 bool cancelTimerEvent(int eventId);
00364
00365
00374 ZonaServerEntity* getEntityWithId(int entityId);
00375
00386 int getAllEntities(ZonaBaseEntityPtrVector *zbepv);
00387
00396 ZonaServerGuild* getGuildWithId(int guildId);
00397
00398
00411 void setGlobalProperty(char* key, char* value, short size);
00412
00413
00424 void deleteGlobalProperty(char* key);
00425
00426
00440 void setMapSize(int mapId, int maxSizeX, int maxSizeY, int maxSizeZ);
00441
00460 void updatePlayerPosition(int eid, int x, int y, int z);
00461
00462
00473 void updatePlayerScore(int eid, int score);
00474
00475
00486 bool isGuildMemberOnLine(int eid);
00487
00490 void _createNewZMORecord(short classId, short dataLen, char *data, int operation);
00491 void _createNewZMO(ZonaModelerObject *zmo);
00492 void createNewGuildMembership(ZonaServerGuildMembership *membership);
00493 void removeMembership(ZonaServerGuildMembership *membership);
00494
00495 #endif


ZonaRegionValidate.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaRegionValidate.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONAREGIONVALIDATE_H
00011 #define ZONAREGIONVALIDATE_H
00012
00013 #include "ZonaSystem.h"
00014
00032 bool onPlaceEntityInRegion(ZonaServerEntity *entity, int mapId, int regionId);
00033
00034 /************* Region Management functions *************/
00035
00036
00037
00051 void onLoadMap(int mapId);
00052
00053
00067 int onGetRegionCount(int mapId);
00068
00069
00084 int* onGetRegionNeighbors(int mapId,
00085                                                   int regionId,
00086                                                   byte regionCoverage, unsigned int* numIds);
00087
00088
00089 /************* Methods added to facilitate Region Probe utility *************/
00090
00100 int  onGetMapDimensionX(int mapId);
00101
00102
00112 int  onGetMapDimensionY(int mapId);
00113
00114
00123 int  onGetMapDimensionZ(int mapId);
00124
00127 #endif


ZonaServerCharacter.h

Go to the documentation of this file.
00001 // ZonaServerCharacter.h: interface for the ZonaServerCharacter class.
00002 //
00004
00005 #if !defined(AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_)
00006 #define AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012
00013 #include "ZonaServerEntity.h"
00014
00015 #include "Zona_API.h"
00016
00017
00018 ZONA_NAMESPACE_BEGIN
00019
00020
00021 class ZonaServerCharacter : public ZonaServerEntity
00022 {
00023 public:
00029         ZonaServerCharacter(int type);
00035         ZonaServerCharacter(){}
00036
00042         virtual  ~ZonaServerCharacter();
00043
00044
00051         virtual char *getName(int &len)=0;
00052
00060         virtual void setName(char *name, int len)=0;
00061
00062
00063 private:
00064
00065 };
00066
00067 ZONA_NAMESPACE_END
00068
00069 ZONA_USING_NAMESPACE
00070
00071 #endif // !defined(AFX_ZONASERVERCHARACTER_H__EA975637_9624_4E80_8067_FCAF7646A3AC__INCLUDED_)


ZonaServerEntity.h

Go to the documentation of this file.
00001 // ZonaServerEntity.h: interface for the ZonaServerEntity class.
00002 //
00004
00005 #if !defined(AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_)
00006 #define AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012
00013 #include "ZonaBaseEntity.h"
00014 //#include "ZonaPropertyData.h"
00015 #include "util/SlicedByteArray.h"
00016
00017 #include "Zona_API.h"
00018
00019
00020 ZONA_NAMESPACE_BEGIN
00021
00022
00023
00024 class ZonaServerEntity : public ZonaBaseEntity
00025 {
00026 public:
00030    ZonaServerEntity(int type);
00031
00035    ZonaServerEntity(){}
00036
00040         virtual ~ZonaServerEntity();
00041
00047         virtual void setMaster(bool val);
00048
00053         virtual bool getMaster();
00054
00059         virtual int  getRegionId()=0;
00060
00065         virtual void setRegionId(int value)=0;
00066
00071         void save(bool shouldAudit);
00072
00073         void exit();
00074
00075
00081     void _setZMBlob(char* memPtr);
00082
00088     char* _getZMBlob();
00089
00095     void _updatePropertiesFromSharedArea();
00096
00102     void _copyDirtyPropertiesToSharedArea();
00103
00104 protected:
00105
00110     virtual void setProperty( int fieldIndex , SlicedByteArray* val);
00111
00120         virtual void publish();
00121
00122 private:
00123     int *_getEntityUpdateBitArray(int &len);
00124     char *_getEntityUpdate(int &len);
00125
00126     char* _zmBlob;
00127 };
00128
00129
00130 ZONA_NAMESPACE_END
00131
00132 ZONA_USING_NAMESPACE
00133
00134 #endif // !defined(AFX_ZONASERVERENTITY_H__C5463708_D5C3_49ED_B0AC_BB3EE10B81EC__INCLUDED_)


ZonaSystem.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaSystem.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONASYSTEM_H
00011 #define ZONASYSTEM_H
00012
00013 #include "util/ZonaServerEntity.h"
00014 #include "util/ZonaServerGuild.h"
00015
00016 #pragma warning(disable: 4786)
00017
00022 // Debug control
00023 extern bool g_zonaDebug;
00024
00025 typedef unsigned char byte;
00026
00027
00028
00036 bool onInitialization();
00037
00038
00047 bool onDestruction();
00048
00049
00051
00061 char* onGetGamePluginVersion();
00062
00063
00074 bool onValidateClientVersion(byte* clientVersion, short size);
00075
00076
00078
00091 void onNotifyGlobalPropertyUpdate(const char* key, char* value, short size);
00092
00093
00104 void onNotifyGlobalPropertyDelete(const char* key);
00105
00106
00108
00123 void onDebugCmd(const char *cmd);
00124
00125
00137 void zprintf(const char* fmt, ...);
00138
00141 #endif


ZonaTimerEvents.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * Copyright (c) 2003, Zona, Inc. All Rights Reserved
00003  * Please visit http://www.zona.net  or
00004  * mailto:support@zona.net
00005  *
00006  * Filename: ZonaTimerEvents.h
00007  * Original Author: Adam Lang
00008  ********************************************************************/
00009
00010 #ifndef ZONATIMEREVENT_H
00011 #define ZONATIMEREVENT_H
00012
00013 #include "ZonaSystem.h"
00014
00019
00020
00034 void onEntityTimerEvent(int eventId, ZonaServerEntity *entity,
00035                                                 byte* eventData, short eventDataSize);
00036
00037
00051 void onLoggedOutEntityTimerEvent(int eventId, ZonaServerEntity *entity,
00052                                                            byte* eventData, short eventDataSize);
00053
00054
00069 void onRegionTimerEvent(int eventId, int mapId, int regionId,
00070                                                 byte* eventData, short size);
00071
00072
00083 void onGSSTimerEvent(int eventId, byte* eventData, short size);
00084
00085
00098 void onWorldTimerEvent(int eventId, byte* eventData, short size);
00099
00102 #endif