Planeshift
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

gemActor Class Reference

Any semi-autonomous object, either a player or an NPC. More...

#include <gem.h>

List of all members.

Classes

struct  ChatHistoryEntry
 Info: Stores a chat history element. More...
struct  DRstate

Public Member Functions

int ActiveSpellCount (const csString &name)
void AddActiveSpell (ActiveSpell *asp)
void AddAttackerHistory (gemActor *attacker, float damage)
void AddAttackerHistory (gemActor *attacker, float hpRate, csTicks duration)
bool AddChatReport (gemActor *reporter)
 Adds an active report (file logging session) to this actor.
bool AtRest () const
void AttachScript (ProgressionScript *script, int type)
virtual void Broadcast (int clientnum, bool control)
virtual void BroadcastTargetStatDR (ClientConnectionSet *clients)
bool CanBeAttackedBy (gemActor *attacker, gemActor *&lastAttacker) const
void CancelActiveSpellsForDeath ()
void CancelActiveSpellsWhichDamage ()
void ClearDamageHistory ()
void Defeat ()
void DetachScript (ProgressionScript *script, int type)
void DoDamage (gemActor *attacker, float damage)
void EndAttack ()
void FallBegan (const csVector3 &pos, iSector *sector)
 Called when the object began falling - 'fallBeginning' tells where the fall started displaceY is the displacement that needs to be added to due to passing through warping portals portalSector is the final sector of the player after passing through the warping portals.
float FallEnded (const csVector3 &pos, iSector *sector)
 Called when the object has fallen down - sets its falling status to false.
ActiveSpellFindActiveSpell (const csString &name, SPELL_TYPE type)
int FindAnimIndex (const char *name)
gemObjectFindNearbyActorName (const char *name)
 Used by chat manager to identify an npc you are near if you talk to one.
virtual void ForcePositionUpdate (int32_t loadDelay=0, csString background="", csVector2 point1=0, csVector2 point2=0, csString widget="")
 gemActor (GEMSupervisor *gemsupervisor, CacheManager *cachemanager, EntityManager *entitymanager, psCharacter *chardata, const char *factname, InstanceID myInstance, iSector *room, const csVector3 &pos, float rotangle, int clientnum)
uint32_t GetActiveMagicSequence ()
 Get the activeMagic sequence, updating to the next value;.
csArray< ActiveSpell * > & GetActiveSpells ()
FrozenBuffableGetBuffableFrozen ()
virtual psCharacterGetCharacterData ()
virtual ClientGetClient () const
const StanceGetCombatStance ()
AttackerHistoryGetDamageHistory (int pos) const
size_t GetDamageHistoryCount () const
virtual unsigned GetDefaultAttackID ()
virtual csString GetDefaultBehavior (const csString &dfltBehaviors)
csTicks GetFallStartTime ()
bool GetFiniteInventory ()
const char * GetFirstName ()
csPtr< PlayerGroupGetGroup ()
int GetGroupID ()
psGuildInfoGetGuild ()
psGuildLevelGetGuildLevel ()
psGuildMemberGetGuildMembership ()
 Gets the psguildmember structure refereed to this actor, if in a guild.
const char * GetGuildName ()
virtual bool GetInvincibility ()
void GetLastLocation (csVector3 &pos, float &yrot, iSector *&sector, InstanceID &instance)
 Get the last reported location this actor was at.
void GetLastProductionPos (csVector3 &pos)
virtual void GetLastSuperclientPos (csVector3 &pos, InstanceID &instance, csTicks &last) const
int GetMasqueradeLevel ()
PSCHARACTER_MODE GetMode ()
const char * GetModeStr ()
 Return a string name of the mode.
psCharacterGetMount () const
virtual const char * GetObjectType ()
virtual PID GetPID ()
void GetPrevTeleportLocation (csVector3 &pos, float &yrot, iSector *&sector, InstanceID &instance)
 Get the location of the player before he was teleported.
const csVector3 & GetProductionStartPos (void) const
 Returns the place where the player last started digging.
float GetRelativeFaction (gemActor *speaker)
int GetSecurityLevel ()
bool GetSpawnPos (csVector3 &pos, float &yrot, iSector *&sector, bool useRange=false)
 Gets the player spawn position according to his race.
gemObjectGetTargetObject () const
int GetTargetType (gemObject *target)
 Get the target type in regards to attacks.
psWorkGameEventGetTradeWork ()
 Return trade work event so it can be stopped.
void GetValidPos (csVector3 &pos, float &yrot, iSector *&sector, InstanceID &instance)
virtual float GetVelocity ()
 Get the z velocity of the actor.
bool GetViewAllObjects ()
 Flag to determine of this player can see all objects.
virtual bool GetVisibility ()
void HandleDeath ()
virtual bool HasBeenAttackedBy (gemActor *attacker)
 Checks the attacker history to see if the attacker has actually attacked the entity.
bool InGroup () const
virtual bool InsideGuardedArea (gemObject *object)
 Check if object is inside guarded area.
void InterruptSpellCasting ()
void InvokeAttackScripts (gemActor *defender, psItem *weapon)
void InvokeDefenseScripts (gemActor *attacker, psItem *weapon)
void InvokeMovementScripts ()
void InvokeNearlyDeadScripts (gemActor *defender, psItem *weapon)
bool IsAllowedToAttack (gemObject *target, csString &msg)
 Checks if our actor can attack given target.
bool IsAllowedToMove ()
bool IsFalling ()
 Checks if the object is falling.
bool IsFrozen ()
bool IsGroupedWith (gemActor *other, bool IncludePets=false) const
bool IsLoggingChat () const
 Returns /report file logging status.
bool IsMounted ()
bool IsMyPet (gemActor *other) const
bool IsSpellCasting ()
void Kill (gemActor *attacker)
bool LogChatMessage (const char *who, const psChatMessage &msg)
 Adds the chat message to the history and optionally to the log file.
bool LogLine (const char *szLine)
 Saves a line to this actor's chat history and logs it to a file, if there are active reports.
bool LogSystemMessage (const char *szLine)
 Saves a system message to this actor's chat history and logs it to a file, if there are active reports.
void MoveToLastPos ()
 Moves player to his last reported location.
bool MoveToSpawnPos (int32_t delay=0, csString background="", csVector2 point1=0, csVector2 point2=0, csString widget="")
 Moves player to his spawn position.
bool MoveToValidPos (bool force=false)
 Restores actor to his last valid position.
void MulticastDRUpdate ()
void ProcessStamina ()
void ProcessStamina (const csVector3 &velocity, bool force=false)
void RegisterCallback (iDeathCallback *receiver)
bool RemoveActiveSpell (ActiveSpell *asp)
void RemoveAttackerHistory (gemActor *attacker)
void RemoveChatReport ()
 Removes an active report (file logging session) for this actor.
void RemoveFromGroup ()
void Resurrect ()
virtual bool SeesObject (gemObject *object, float range)
virtual bool Send (int clientnum, bool control, bool to_superclients, psPersistAllEntities *allEntities=NULL)
 Send this object to the given client.
void SendActiveSpells ()
virtual void SendBehaviorMessage (const csString &str, gemObject *obj)
virtual void SendGroupMessage (MsgEntry *me)
 Distribute this object to all members of a group.
virtual void SendGroupStats ()
virtual void SendTargetStatDR (Client *client)
void SetAction (const char *anim, csTicks &timeDelay)
void SetAllowedToDisconnect (bool allowed)
 Call this to ask the actor to set allowed to disconnect in the connected client.
void SetAllowedToMove (bool newvalue)
virtual void SetCombatStance (const Stance &stance)
virtual void SetDefaultAttackID (unsigned)
void SetDefaults (bool player)
 Set attributes back to default.
bool SetDRData (psDRMessage &drmsg)
void SetEquipment (const char *equip)
void SetFiniteInventory (bool v)
void SetFrozen (bool flag)
 Check whether the actor is frozen.
void SetGroup (PlayerGroup *group)
void SetInstance (InstanceID worldInstance)
virtual void SetInvincibility (bool invincible)
void SetLastProductionPos (csVector3 &pos)
virtual void SetLastSuperclientPos (const csVector3 &pos, InstanceID instance, const csTicks &now)
void SetMasqueradeLevel (int level)
bool SetMesh (const char *meshname)
void SetMode (PSCHARACTER_MODE newmode, uint32_t extraData=0)
void SetMount (psCharacter *newMount)
void SetPosition (const csVector3 &pos, float angle, iSector *sector)
void SetPrevTeleportLocation (const csVector3 &pos, float yrot, iSector *sector, InstanceID instance)
 Record the location of this actor before he was teleported.
void SetProductionStartPos (const csVector3 &pos)
 Sets the place where the player started digging.
void SetSecurityLevel (int level)
void SetSpellCasting (psSpellCastGameEvent *event)
void SetTargetObject (gemObject *object)
void SetTextureParts (const char *parts)
void SetTradeWork (psWorkGameEvent *event)
 Assign trade work event so it can be accessed.
bool SetupCharData ()
void SetViewAllObjects (bool v)
virtual void SetVisibility (bool visible)
void Sit ()
 Make the character sit.
void Stand ()
 Makes the character stand up.
bool StartAttack ()
void StopMoving (bool worldVel=false)
void Teleport (iSector *sector, const csVector3 &pos, float yrot, InstanceID instance, int32_t loadDelay=0, csString background="", csVector2 point1=0, csVector2 point2=0, csString widget="")
void Teleport (const char *sec, const csVector3 &pos, float yrot, InstanceID instance, int32_t loadDelay=0, csString background="", csVector2 point1=0, csVector2 point2=0, csString widget="")
void Teleport (iSector *sector, const csVector3 &pos, float yrot, int32_t loadDelay=0, csString background="", csVector2 point1=0, csVector2 point2=0, csString widget="")
void UnregisterCallback (iDeathCallback *receiver)
virtual bool UpdateDR ()
void UpdateStats ()
void UpdateValidLocation (const csVector3 &pos, float yrot, iSector *sector, InstanceID instance, bool force=false)
virtual ~gemActor ()
iScriptableVar implementation

Functions that implement the iScriptableVar interface.

virtual double GetProperty (MathEnvironment *env, const char *ptr)
 Get the value of the specified property.
virtual double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)

Public Attributes

psLinearMovementpcmove
GM/debug abilities

Turn on and of features used for GMs/debuging.

bool nevertired
 These flags are for GM/debug abilities.
bool infinitemana
 infinite mana
bool instantcast
 cast spells instantly
bool safefall
 no fall damage
bool questtester
 no quest lockouts
bool givekillexp
 give exp if killed

Protected Member Functions

virtual void ApplyStaminaCalculations (const csVector3 &velocity, float times)
bool CanSwitchMode (PSCHARACTER_MODE from, PSCHARACTER_MODE to)
bool InitCharData (Client *c)
bool InitLinMove (const csVector3 &pos, float angle, iSector *sector)
 Determines the right size and height for the collider for the sprite and sets the actual position of the sprite.
void SetGMDefaults ()
 Set initial attributes for GMs.

Protected Attributes

uint32_t activeMagic_seq
 active magic message seq
unsigned int activeReports
 unsigned int activeReports Info: Total /report commands filed against this player that are still active (logging).
csArray< ActiveSpell * > activeSpells
bool atRest
 Is this character stationary or moving?
uint8_t attack_cnt
 Count of attack events in CS event queue.
csVector3 bottom
csArray< ChatHistoryEntrychatHistory
 csArray<ChatHistoryEntry> chatHistory Info: Chat history for this player. A chat line stays in history for CHAT_HISTORY_LIFETIME (defined in gem.cpp).
csWeakRef< ClientclientRef
Stance combat_stance
csArray< iDeathCallback * > deathReceivers
 List of objects which are to be notified when this actor dies.
csPDelArray< AttackerHistorydmgHistory
uint8_t DRcounter
 increments in loop to prevent out of order packet overwrites of better data
csVector3 fallStartPos
 the position where the fall began
iSector * fallStartSector
 the sector where the fall began
csTicks fallStartTime
uint8_t forceDRcounter
 sequence number for forced position updates
iSector * forcedSector
 Needed to force the effect of a psForcePositionMessage since sectors are tied to instances and force position messages may be lost on crash, loading failure, etc. This ensures that a DR message containing the new sector is received at least once.
csRef< PlayerGroupgroup
bool invincible
 cannot be attacked
bool isAllowedToMove
 Is a movement lockout in effect?
bool isFalling
 is this object falling down ?
FrozenBuffable isFrozen
 Whether the actor is frozen or not.
DRstate last_location
csVector3 last_production_pos
csTicks lastDR
unsigned int lastSentSuperclientInstance
csVector3 lastSentSuperclientPos
csTicks lastSentSuperclientTick
csVector3 lastV
csRef< iFile > logging_chat_file
 csRef<iFile> logging_chat_file Info: log file handle.
int masqueradeLevel
psCharactermount
uint8_t movementMode
 Actor movement mode from DB table movement_modes.
DRstate newvalid_location
csVector3 offset
csPDelArray< ProgressionScriptonAttackScripts
csPDelArray< ProgressionScriptonDefenseScripts
csPDelArray< ProgressionScriptonMovementScripts
csPDelArray< ProgressionScriptonNearlyDeadScripts
PID pid
 Player ID (also known as character ID or PID)
PSCHARACTER_MODE player_mode
DRstate prev_teleport_location
csVector3 productionStartPos
 Production Start Pos is used to record the place where people started digging.
psCharacterpsChar
int securityLevel
 What commands the actor can access. Normally only for a player controlled object.
psSpellCastGameEventspellCasting
 Hold a pointer to the game event < for the spell currently cast.
csWeakRef< gemObjecttargetObject
 Is the current targeted object for this actor.
csVector3 top
struct gemActor::DRstate valid_location
bool viewAllObjects
 can view invisible objects?
bool visible
 is visible to clients ?
psWorkGameEventworkEvent

Detailed Description

Any semi-autonomous object, either a player or an NPC.

Definition at line 1166 of file gem.h.


Constructor & Destructor Documentation

gemActor::gemActor ( GEMSupervisor gemsupervisor,
CacheManager cachemanager,
EntityManager entitymanager,
psCharacter chardata,
const char *  factname,
InstanceID  myInstance,
iSector *  room,
const csVector3 &  pos,
float  rotangle,
int  clientnum 
)
virtual gemActor::~gemActor ( ) [virtual]

Member Function Documentation

int gemActor::ActiveSpellCount ( const csString &  name)
void gemActor::AddActiveSpell ( ActiveSpell asp)
void gemActor::AddAttackerHistory ( gemActor attacker,
float  damage 
)
void gemActor::AddAttackerHistory ( gemActor attacker,
float  hpRate,
csTicks  duration 
)
bool gemActor::AddChatReport ( gemActor reporter)

Adds an active report (file logging session) to this actor.

Parameters:
[in]reporterThe client actor issuing /report
Returns:
true on success, or false on error (failure to start logging probably)
virtual void gemActor::ApplyStaminaCalculations ( const csVector3 &  velocity,
float  times 
) [protected, virtual]

Reimplemented in gemNPC.

bool gemActor::AtRest ( ) const [inline]

Definition at line 1712 of file gem.h.

void gemActor::AttachScript ( ProgressionScript script,
int  type 
)
virtual void gemActor::Broadcast ( int  clientnum,
bool  control 
) [virtual]
Parameters:
clientnumThe client that initiated this update.
controlSet to true when sent to the controlling client.

Reimplemented from gemObject.

Reimplemented in gemNPC.

virtual void gemActor::BroadcastTargetStatDR ( ClientConnectionSet clients) [virtual]

Reimplemented from gemObject.

virtual double gemActor::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
) [virtual]

Reimplemented from gemObject.

bool gemActor::CanBeAttackedBy ( gemActor attacker,
gemActor *&  lastAttacker 
) const
void gemActor::CancelActiveSpellsForDeath ( )
void gemActor::CancelActiveSpellsWhichDamage ( )
bool gemActor::CanSwitchMode ( PSCHARACTER_MODE  from,
PSCHARACTER_MODE  to 
) [protected]
void gemActor::ClearDamageHistory ( ) [inline]

Definition at line 1798 of file gem.h.

void gemActor::Defeat ( )
void gemActor::DetachScript ( ProgressionScript script,
int  type 
)
void gemActor::DoDamage ( gemActor attacker,
float  damage 
)
void gemActor::EndAttack ( ) [inline]

Definition at line 1378 of file gem.h.

void gemActor::FallBegan ( const csVector3 &  pos,
iSector *  sector 
)

Called when the object began falling - 'fallBeginning' tells where the fall started displaceY is the displacement that needs to be added to due to passing through warping portals portalSector is the final sector of the player after passing through the warping portals.

float gemActor::FallEnded ( const csVector3 &  pos,
iSector *  sector 
)

Called when the object has fallen down - sets its falling status to false.

ActiveSpell* gemActor::FindActiveSpell ( const csString &  name,
SPELL_TYPE  type 
)
int gemActor::FindAnimIndex ( const char *  name)
gemObject* gemActor::FindNearbyActorName ( const char *  name)

Used by chat manager to identify an npc you are near if you talk to one.

virtual void gemActor::ForcePositionUpdate ( int32_t  loadDelay = 0,
csString  background = "",
csVector2  point1 = 0,
csVector2  point2 = 0,
csString  widget = "" 
) [virtual]
uint32_t gemActor::GetActiveMagicSequence ( ) [inline]

Get the activeMagic sequence, updating to the next value;.

Definition at line 1888 of file gem.h.

csArray<ActiveSpell*>& gemActor::GetActiveSpells ( ) [inline]

Definition at line 1815 of file gem.h.

FrozenBuffable& gemActor::GetBuffableFrozen ( ) [inline]

Definition at line 1435 of file gem.h.

virtual psCharacter* gemActor::GetCharacterData ( ) [inline, virtual]

Reimplemented from gemObject.

Definition at line 1318 of file gem.h.

virtual Client* gemActor::GetClient ( ) const [virtual]

Reimplemented from gemObject.

const Stance& gemActor::GetCombatStance ( ) [inline]

Definition at line 1364 of file gem.h.

AttackerHistory* gemActor::GetDamageHistory ( int  pos) const [inline]

Definition at line 1790 of file gem.h.

size_t gemActor::GetDamageHistoryCount ( ) const [inline]

Definition at line 1794 of file gem.h.

virtual unsigned gemActor::GetDefaultAttackID ( ) [inline, virtual]

Reimplemented in gemNPC.

Definition at line 1386 of file gem.h.

virtual csString gemActor::GetDefaultBehavior ( const csString &  dfltBehaviors) [virtual]

Reimplemented from gemObject.

Reimplemented in gemNPC.

csTicks gemActor::GetFallStartTime ( ) [inline]

Definition at line 1707 of file gem.h.

bool gemActor::GetFiniteInventory ( ) [inline]

Definition at line 1854 of file gem.h.

const char* gemActor::GetFirstName ( ) [inline]

Definition at line 1600 of file gem.h.

csPtr<PlayerGroup> gemActor::GetGroup ( )
int gemActor::GetGroupID ( )
psGuildInfo* gemActor::GetGuild ( ) [inline, virtual]

Reimplemented from gemObject.

Definition at line 1606 of file gem.h.

psGuildLevel* gemActor::GetGuildLevel ( ) [inline]

Definition at line 1610 of file gem.h.

psGuildMember* gemActor::GetGuildMembership ( ) [inline]

Gets the psguildmember structure refereed to this actor, if in a guild.

Returns:
psGuildMember: A pointer to the psGuildMember structure of this actor

Definition at line 1620 of file gem.h.

const char* gemActor::GetGuildName ( )
virtual bool gemActor::GetInvincibility ( ) [inline, virtual]

Definition at line 1724 of file gem.h.

void gemActor::GetLastLocation ( csVector3 &  pos,
float yrot,
iSector *&  sector,
InstanceID instance 
)

Get the last reported location this actor was at.

void gemActor::GetLastProductionPos ( csVector3 &  pos) [inline]

Definition at line 1483 of file gem.h.

virtual void gemActor::GetLastSuperclientPos ( csVector3 &  pos,
InstanceID instance,
csTicks &  last 
) const [virtual]

Reimplemented from gemObject.

int gemActor::GetMasqueradeLevel ( ) [inline]

Definition at line 1473 of file gem.h.

PSCHARACTER_MODE gemActor::GetMode ( ) [inline]

Definition at line 1358 of file gem.h.

const char* gemActor::GetModeStr ( )

Return a string name of the mode.

psCharacter* gemActor::GetMount ( ) const [inline]

Definition at line 1342 of file gem.h.

virtual const char* gemActor::GetObjectType ( ) [inline, virtual]

Reimplemented from gemObject.

Reimplemented in gemNPC, and gemPet.

Definition at line 1314 of file gem.h.

virtual PID gemActor::GetPID ( ) [inline, virtual]

Reimplemented from gemObject.

Definition at line 1324 of file gem.h.

void gemActor::GetPrevTeleportLocation ( csVector3 &  pos,
float yrot,
iSector *&  sector,
InstanceID instance 
)

Get the location of the player before he was teleported.

const csVector3& gemActor::GetProductionStartPos ( void  ) const [inline]

Returns the place where the player last started digging.

Returns:
The location where the player last started digging.

Definition at line 1493 of file gem.h.

double pawsCheckBox::GetProperty ( MathEnvironment env,
const char *  ptr 
) [virtual]

Get the value of the specified property.

Parameters:
envMath environment.
ptrThe name of the property to get.

Reimplemented from gemObject.

float gemActor::GetRelativeFaction ( gemActor speaker)
int gemActor::GetSecurityLevel ( ) [inline]

Definition at line 1469 of file gem.h.

bool gemActor::GetSpawnPos ( csVector3 &  pos,
float yrot,
iSector *&  sector,
bool  useRange = false 
)

Gets the player spawn position according to his race.

Todo:
Implement the support for player specific spawn pos, not only race specific.
Parameters:
posA csVector where to store the player position.
yrotA float where to store the rotation of the player.
sectorAn iSector where to store the sector of the position the player.
useRangeA boolean which says if we have to apply random range calculation in the positions.
Returns:
FALSE If the race or the destination sector of the player can't be found.
gemObject* gemActor::GetTargetObject ( ) const [inline]

Definition at line 1868 of file gem.h.

int gemActor::GetTargetType ( gemObject target)

Get the target type in regards to attacks.

psWorkGameEvent* gemActor::GetTradeWork ( ) [inline]

Return trade work event so it can be stopped.

Definition at line 1415 of file gem.h.

void gemActor::GetValidPos ( csVector3 &  pos,
float yrot,
iSector *&  sector,
InstanceID instance 
)
virtual float gemActor::GetVelocity ( ) [virtual]

Get the z velocity of the actor.

Reimplemented from gemObject.

bool gemActor::GetViewAllObjects ( ) [inline]

Flag to determine of this player can see all objects.

Definition at line 1733 of file gem.h.

virtual bool gemActor::GetVisibility ( ) [inline, virtual]

Reimplemented from gemObject.

Definition at line 1717 of file gem.h.

void gemActor::HandleDeath ( )
virtual bool gemActor::HasBeenAttackedBy ( gemActor attacker) [virtual]

Checks the attacker history to see if the attacker has actually attacked the entity.

Used to exclude from loot those who didn't actually partecipate in the attack even if they are grouped.

Parameters:
attackerA pointer to the actor we are checking if it has attacked.
Returns:
TRUE if the actor has attacked the entity.
bool gemActor::InGroup ( ) const
bool gemActor::InitCharData ( Client c) [protected]
bool gemActor::InitLinMove ( const csVector3 &  pos,
float  angle,
iSector *  sector 
) [protected]

Determines the right size and height for the collider for the sprite and sets the actual position of the sprite.

virtual bool gemActor::InsideGuardedArea ( gemObject object) [virtual]

Check if object is inside guarded area.

Guarded are is a circle of RANGE_TO_GUARD around player and pet.

void gemActor::InterruptSpellCasting ( ) [inline]

Definition at line 1399 of file gem.h.

void gemActor::InvokeAttackScripts ( gemActor defender,
psItem weapon 
)
void gemActor::InvokeDefenseScripts ( gemActor attacker,
psItem weapon 
)
void gemActor::InvokeMovementScripts ( )
void gemActor::InvokeNearlyDeadScripts ( gemActor defender,
psItem weapon 
)
bool gemActor::IsAllowedToAttack ( gemObject target,
csString &  msg 
)

Checks if our actor can attack given target.

If not, send him some informative text message

bool gemActor::IsAllowedToMove ( ) [inline]

< Covers sitting, death, and out-of-stamina

Definition at line 1420 of file gem.h.

bool gemActor::IsFalling ( ) [inline]

Checks if the object is falling.

Definition at line 1702 of file gem.h.

bool gemActor::IsFrozen ( ) [inline]

Definition at line 1431 of file gem.h.

bool gemActor::IsGroupedWith ( gemActor other,
bool  IncludePets = false 
) const
bool gemActor::IsLoggingChat ( ) const [inline]

Returns /report file logging status.

Definition at line 1529 of file gem.h.

bool gemActor::IsMounted ( ) [inline]

Definition at line 1352 of file gem.h.

bool gemActor::IsMyPet ( gemActor other) const
bool gemActor::IsSpellCasting ( ) [inline]

Definition at line 1395 of file gem.h.

void gemActor::Kill ( gemActor attacker) [inline]

Definition at line 1642 of file gem.h.

bool gemActor::LogChatMessage ( const char *  who,
const psChatMessage msg 
)

Adds the chat message to the history and optionally to the log file.

Parameters:
[in]whoThe name of the character who sent this message
[in]msgThe chat message
Returns:
Returns true if the message was written to the log file
bool gemActor::LogLine ( const char *  szLine)

Saves a line to this actor's chat history and logs it to a file, if there are active reports.

Returns:
Returns true if the line was written to the log file
bool gemActor::LogSystemMessage ( const char *  szLine)

Saves a system message to this actor's chat history and logs it to a file, if there are active reports.

Returns:
Returns true if the line was written to the log file
void gemActor::MoveToLastPos ( )

Moves player to his last reported location.

bool gemActor::MoveToSpawnPos ( int32_t  delay = 0,
csString  background = "",
csVector2  point1 = 0,
csVector2  point2 = 0,
csString  widget = "" 
)

Moves player to his spawn position.

Parameters:
delayThe time to wait in the load screen even if the new position was already loaded.
backgroundThe background to use when the load screen is shown or if it's forced.
point1Start point for animation
point2Destination point for animation
widgetThe widget which will replace the normal loading one, if any is defined.
Returns:
TRUE in case of success. FALSE if the character lacks a spawn position.
bool gemActor::MoveToValidPos ( bool  force = false)

Restores actor to his last valid position.

Parameters:
forceForce an update if set to true.
void gemActor::MulticastDRUpdate ( )
void gemActor::ProcessStamina ( const csVector3 &  velocity,
bool  force = false 
)
void gemActor::ProcessStamina ( )
void gemActor::RegisterCallback ( iDeathCallback receiver) [inline, virtual]

Implements iDeathNotificationObject.

Definition at line 1579 of file gem.h.

bool gemActor::RemoveActiveSpell ( ActiveSpell asp)
void gemActor::RemoveAttackerHistory ( gemActor attacker)
void gemActor::RemoveChatReport ( )

Removes an active report (file logging session) for this actor.

This function is invoked automatically after a specific amount of time from the report activation.

void gemActor::RemoveFromGroup ( )
void gemActor::Resurrect ( )
virtual bool gemActor::SeesObject ( gemObject object,
float  range 
) [virtual]

Reimplemented from gemObject.

virtual bool gemActor::Send ( int  clientnum,
bool  control,
bool  to_superclients,
psPersistAllEntities allEntities = NULL 
) [virtual]

Send this object to the given client.

Parameters:
clientnumThe client that initiated this update.
controlSet to true when sent to the controlling client.
to_superclientsSend to super clients
allEntitiesBuffer the message instead of sending it.

Reimplemented from gemObject.

Reimplemented in gemNPC.

void gemActor::SendActiveSpells ( )
virtual void gemActor::SendBehaviorMessage ( const csString &  str,
gemObject obj 
) [virtual]

Reimplemented from gemObject.

Reimplemented in gemNPC.

virtual void gemActor::SendGroupMessage ( MsgEntry me) [virtual]

Distribute this object to all members of a group.

Parameters:
meThe MsgEntry to send to all group members.

Reimplemented from gemObject.

virtual void gemActor::SendGroupStats ( ) [virtual]

Reimplemented in gemNPC.

virtual void gemActor::SendTargetStatDR ( Client client) [virtual]

Reimplemented from gemObject.

void gemActor::SetAction ( const char *  anim,
csTicks &  timeDelay 
)
void gemActor::SetAllowedToDisconnect ( bool  allowed)

Call this to ask the actor to set allowed to disconnect in the connected client.

void gemActor::SetAllowedToMove ( bool  newvalue)
virtual void gemActor::SetCombatStance ( const Stance stance) [virtual]

Reimplemented in gemNPC.

virtual void gemActor::SetDefaultAttackID ( unsigned  ) [inline, virtual]

Reimplemented in gemNPC.

Definition at line 1383 of file gem.h.

void gemActor::SetDefaults ( bool  player)

Set attributes back to default.

GMs use this commands to set attributes back to the default for either a player or a GM.

Parameters:
playerSet to true for players. False for GMs.
bool gemActor::SetDRData ( psDRMessage drmsg)
void gemActor::SetEquipment ( const char *  equip)
void gemActor::SetFiniteInventory ( bool  v) [inline]

Definition at line 1858 of file gem.h.

void gemActor::SetFrozen ( bool  flag) [inline]

Check whether the actor is frozen.

Definition at line 1427 of file gem.h.

void gemActor::SetGMDefaults ( ) [protected]

Set initial attributes for GMs.

void gemActor::SetGroup ( PlayerGroup group)
void gemActor::SetInstance ( InstanceID  worldInstance)

Reimplemented from gemObject.

virtual void gemActor::SetInvincibility ( bool  invincible) [virtual]
void gemActor::SetLastProductionPos ( csVector3 &  pos) [inline]

Definition at line 1479 of file gem.h.

virtual void gemActor::SetLastSuperclientPos ( const csVector3 &  pos,
InstanceID  instance,
const csTicks &  now 
) [virtual]

Reimplemented from gemObject.

void gemActor::SetMasqueradeLevel ( int  level)
bool gemActor::SetMesh ( const char *  meshname)
Note:
don't use this directly
void gemActor::SetMode ( PSCHARACTER_MODE  newmode,
uint32_t  extraData = 0 
)
void gemActor::SetMount ( psCharacter newMount) [inline]

Definition at line 1347 of file gem.h.

void gemActor::SetPosition ( const csVector3 &  pos,
float  angle,
iSector *  sector 
)

Reimplemented in gemNPC.

void gemActor::SetPrevTeleportLocation ( const csVector3 &  pos,
float  yrot,
iSector *  sector,
InstanceID  instance 
)

Record the location of this actor before he was teleported.

void gemActor::SetProductionStartPos ( const csVector3 &  pos) [inline]

Sets the place where the player started digging.

Parameters:
posThe location where the player started digging.

Definition at line 1503 of file gem.h.

void gemActor::SetSecurityLevel ( int  level)
void gemActor::SetSpellCasting ( psSpellCastGameEvent event) [inline]

Definition at line 1391 of file gem.h.

void gemActor::SetTargetObject ( gemObject object) [inline]

Definition at line 1864 of file gem.h.

void gemActor::SetTextureParts ( const char *  parts)
void gemActor::SetTradeWork ( psWorkGameEvent event) [inline]

Assign trade work event so it can be accessed.

Definition at line 1407 of file gem.h.

bool gemActor::SetupCharData ( )
void gemActor::SetViewAllObjects ( bool  v)
virtual void gemActor::SetVisibility ( bool  visible) [virtual]
void gemActor::Sit ( )

Make the character sit.

void gemActor::Stand ( )

Makes the character stand up.

bool gemActor::StartAttack ( ) [inline]

Definition at line 1369 of file gem.h.

void gemActor::StopMoving ( bool  worldVel = false)
void gemActor::Teleport ( iSector *  sector,
const csVector3 &  pos,
float  yrot,
InstanceID  instance,
int32_t  loadDelay = 0,
csString  background = "",
csVector2  point1 = 0,
csVector2  point2 = 0,
csString  widget = "" 
)
void gemActor::Teleport ( iSector *  sector,
const csVector3 &  pos,
float  yrot,
int32_t  loadDelay = 0,
csString  background = "",
csVector2  point1 = 0,
csVector2  point2 = 0,
csString  widget = "" 
)
void gemActor::Teleport ( const char *  sec,
const csVector3 &  pos,
float  yrot,
InstanceID  instance,
int32_t  loadDelay = 0,
csString  background = "",
csVector2  point1 = 0,
csVector2  point2 = 0,
csString  widget = "" 
)
void gemActor::UnregisterCallback ( iDeathCallback receiver) [inline, virtual]

Implements iDeathNotificationObject.

Definition at line 1583 of file gem.h.

virtual bool gemActor::UpdateDR ( ) [virtual]

Reimplemented from gemObject.

void gemActor::UpdateStats ( )
void gemActor::UpdateValidLocation ( const csVector3 &  pos,
float  yrot,
iSector *  sector,
InstanceID  instance,
bool  force = false 
)

Member Data Documentation

uint32_t gemActor::activeMagic_seq [protected]

active magic message seq

Definition at line 1301 of file gem.h.

unsigned int activeReports Info: Total /report commands filed against this player that are still active (logging).

Definition at line 1235 of file gem.h.

Definition at line 1271 of file gem.h.

bool gemActor::atRest [protected]

Is this character stationary or moving?

Definition at line 1280 of file gem.h.

uint8_t gemActor::attack_cnt [protected]

Count of attack events in CS event queue.

Definition at line 1180 of file gem.h.

csVector3 gemActor::bottom [protected]

Definition at line 1175 of file gem.h.

csArray<ChatHistoryEntry> chatHistory Info: Chat history for this player. A chat line stays in history for CHAT_HISTORY_LIFETIME (defined in gem.cpp).

Definition at line 1240 of file gem.h.

csWeakRef<Client> gemActor::clientRef [protected]

Definition at line 1178 of file gem.h.

Definition at line 1284 of file gem.h.

List of objects which are to be notified when this actor dies.

Definition at line 1194 of file gem.h.

csPDelArray<AttackerHistory> gemActor::dmgHistory [protected]

Definition at line 1268 of file gem.h.

uint8_t gemActor::DRcounter [protected]

increments in loop to prevent out of order packet overwrites of better data

Definition at line 1182 of file gem.h.

csVector3 gemActor::fallStartPos [protected]

the position where the fall began

Definition at line 1258 of file gem.h.

iSector* gemActor::fallStartSector [protected]

the sector where the fall began

Definition at line 1259 of file gem.h.

csTicks gemActor::fallStartTime [protected]

Definition at line 1260 of file gem.h.

uint8_t gemActor::forceDRcounter [protected]

sequence number for forced position updates

Definition at line 1183 of file gem.h.

iSector* gemActor::forcedSector [protected]

Needed to force the effect of a psForcePositionMessage since sectors are tied to instances and force position messages may be lost on crash, loading failure, etc. This ensures that a DR message containing the new sector is received at least once.

Definition at line 1294 of file gem.h.

give exp if killed

Definition at line 1845 of file gem.h.

csRef<PlayerGroup> gemActor::group [protected]

Definition at line 1171 of file gem.h.

infinite mana

Definition at line 1841 of file gem.h.

cast spells instantly

Definition at line 1842 of file gem.h.

bool gemActor::invincible [protected]

cannot be attacked

Definition at line 1262 of file gem.h.

bool gemActor::isAllowedToMove [protected]

Is a movement lockout in effect?

Definition at line 1279 of file gem.h.

bool gemActor::isFalling [protected]

is this object falling down ?

Definition at line 1257 of file gem.h.

Whether the actor is frozen or not.

Definition at line 1281 of file gem.h.

Definition at line 1205 of file gem.h.

csVector3 gemActor::last_production_pos [protected]

Definition at line 1176 of file gem.h.

csTicks gemActor::lastDR [protected]

Definition at line 1184 of file gem.h.

Definition at line 1191 of file gem.h.

csVector3 gemActor::lastSentSuperclientPos [protected]

Definition at line 1190 of file gem.h.

csTicks gemActor::lastSentSuperclientTick [protected]

Definition at line 1192 of file gem.h.

csVector3 gemActor::lastV [protected]

Definition at line 1185 of file gem.h.

csRef<iFile> gemActor::logging_chat_file [protected]

csRef<iFile> logging_chat_file Info: log file handle.

Definition at line 1244 of file gem.h.

Definition at line 1255 of file gem.h.

Definition at line 1173 of file gem.h.

uint8_t gemActor::movementMode [protected]

Actor movement mode from DB table movement_modes.

Definition at line 1278 of file gem.h.

These flags are for GM/debug abilities.

infinite stamina

Definition at line 1840 of file gem.h.

Definition at line 1204 of file gem.h.

csVector3 gemActor::offset [protected]

Definition at line 1175 of file gem.h.

csPDelArray<ProgressionScript> gemActor::onAttackScripts [protected]

Definition at line 1269 of file gem.h.

Definition at line 1269 of file gem.h.

Definition at line 1269 of file gem.h.

Definition at line 1269 of file gem.h.

Definition at line 1304 of file gem.h.

PID gemActor::pid [protected]

Player ID (also known as character ID or PID)

Definition at line 1170 of file gem.h.

Definition at line 1283 of file gem.h.

Definition at line 1206 of file gem.h.

csVector3 gemActor::productionStartPos [protected]

Production Start Pos is used to record the place where people started digging.

Definition at line 1188 of file gem.h.

Definition at line 1169 of file gem.h.

no quest lockouts

Definition at line 1844 of file gem.h.

no fall damage

Definition at line 1843 of file gem.h.

What commands the actor can access. Normally only for a player controlled object.

Definition at line 1254 of file gem.h.

Hold a pointer to the game event < for the spell currently cast.

Definition at line 1286 of file gem.h.

csWeakRef<gemObject> gemActor::targetObject [protected]

Is the current targeted object for this actor.

Definition at line 1266 of file gem.h.

csVector3 gemActor::top [protected]

Definition at line 1175 of file gem.h.

bool gemActor::viewAllObjects [protected]

can view invisible objects?

Definition at line 1264 of file gem.h.

bool gemActor::visible [protected]

is visible to clients ?

Definition at line 1263 of file gem.h.

Definition at line 1288 of file gem.h.


The documentation for this class was generated from the following files: