Planeshift
psSectorInfo Class Reference

Contains information about sectors from the server perspective. More...

#include <pssectorinfo.h>

Classes

struct  weatherTypeData
 Structure used to store informations for various weather types in this sector. More...
 

Public Member Functions

void AddWeatherTypeData (weatherTypeData newWeatherData, unsigned int id)
 Adds informations about a weather type defined by id. More...
 
double CalcFunction (MathEnvironment *env, const char *functionName, const double *params)
 This is used by the math scripting engine to get calculated values. More...
 
csVector3 GetDeathCord ()
 Gets the sector cordinates we will teleport to when dieing in this sector. More...
 
bool GetDeathRestoreHP ()
 Checks if a teleporting sector will trigger the death penalty when used. More...
 
bool GetDeathRestoreMana ()
 Checks if a teleporting sector will trigger the death penalty when used. More...
 
float GetDeathRot ()
 Gets the rotation we will teleport to when dieing in this sector. More...
 
csString GetDeathSector ()
 Gets the sector name we will teleport to when dieing in this sector. More...
 
bool GetHasPenalty ()
 Checks if a teleporting sector will trigger the death penalty when used. More...
 
bool GetIsColliding ()
 
bool GetIsNonTransient ()
 
bool GetIsTeleporting ()
 Checks if this is set as a teleporting sector. More...
 
double GetProperty (MathEnvironment *env, const char *ptr)
 This is used by the math scripting engine to get various values. More...
 
unsigned int GetRandomWeatherDensity (unsigned int id)
 Gets a random value between the max and min density for this weather type. More...
 
unsigned int GetRandomWeatherDuration (unsigned int id)
 Gets a random value between the max and min Duration for this weather type. More...
 
unsigned int GetRandomWeatherFadeIn (unsigned int id)
 Gets a random value between the max and min Fade In for this weather type. More...
 
unsigned int GetRandomWeatherFadeOut (unsigned int id)
 Gets a random value between the max and min Fade Out for this weather type. More...
 
unsigned int GetRandomWeatherGap (unsigned int id)
 Gets a random value between the max and min Gap for this weather type. More...
 
csVector3 GetTeleportingCord ()
 Gets the sector cordinates we will teleport to when entering this sector. More...
 
float GetTeleportingRot ()
 Gets the rotation we will teleport to when entering this sector. More...
 
csString GetTeleportingSector ()
 Gets the sector name we will teleport to when entering this sector. More...
 
bool GetWeatherEnabled (unsigned int id)
 Gets the enabled status of a weather event type for this sector. More...
 
 psSectorInfo ()
 
void SetWeatherEnabled (unsigned int id, bool newStatus)
 Sets the enabled status of a weather event type for this sector. More...
 
const char * ToString ()
 
 ~psSectorInfo ()
 
- Public Member Functions inherited from iScriptableVar
virtual ~iScriptableVar ()
 

Public Attributes

int b
 
unsigned int current_rain_drops
 Drops. More...
 
csVector3 deathCords
 the destination cordinates where to teleport on death from this sector More...
 
bool deathRestoreHP
 Sets if this sector will restore hp when the player dies in it. More...
 
bool deathRestoreMana
 Sets if this sector will restore mana when the player dies in it. More...
 
float deathRot
 The destination rotation where to teleport on death from this sector. More...
 
csString deathSector
 The sector where to teleport on death from this sector. Note if empty it will be the default one. More...
 
bool densitySaved
 
unsigned int fog_density
 
unsigned int fog_density_old
 
unsigned int fogFade
 
int g
 
csString god_name
 
bool has_penalty
 This sector will apply the death penalty if it's a teleporting sector. More...
 
bool is_colliding
 
bool is_non_transient
 
bool is_raining
 
bool is_snowing
 
bool is_teleporting
 This sector will immediately teleport the player somewhere else when entered if true. More...
 
csString name
 
int r
 
float say_range
 
csVector3 teleportingCords
 The destination cordinates when this sector is a teleporting sector. More...
 
float teleportingRot
 The destination rotation when this sector is a teleporting sector. More...
 
csString teleportingSector
 The destination sector when this sector is a teleporting sector. Note if empty it will be spawn. More...
 
unsigned int uid
 
csHash< weatherTypeData, unsigned intweatherData
 An hash containing all the various possible weather data. More...
 

Detailed Description

Contains information about sectors from the server perspective.

It includes the ID, name of a sector and weather parameters.

Definition at line 46 of file pssectorinfo.h.

Constructor & Destructor Documentation

psSectorInfo::psSectorInfo ( )
psSectorInfo::~psSectorInfo ( )

Member Function Documentation

void psSectorInfo::AddWeatherTypeData ( weatherTypeData  newWeatherData,
unsigned int  id 
)

Adds informations about a weather type defined by id.

Parameters
newWeatherDataA weatherTypeData struct containing the informations about a weather type.
idThe id of the weather type we are adding.
double psSectorInfo::CalcFunction ( MathEnvironment env,
const char *  functionName,
const double *  params 
)
virtual

This is used by the math scripting engine to get calculated values.

Implements iScriptableVar.

csVector3 psSectorInfo::GetDeathCord ( )
inline

Gets the sector cordinates we will teleport to when dieing in this sector.

Returns
A csVector3 containing the sector cordinates.

Definition at line 138 of file pssectorinfo.h.

bool psSectorInfo::GetDeathRestoreHP ( )
inline

Checks if a teleporting sector will trigger the death penalty when used.

Note
this can be TRUE even if the previous isn't but it won't do anything.
Returns
TRUE if this is a sector with death penalty.

Definition at line 92 of file pssectorinfo.h.

bool psSectorInfo::GetDeathRestoreMana ( )
inline

Checks if a teleporting sector will trigger the death penalty when used.

Note
this can be TRUE even if the previous isn't but it won't do anything.
Returns
TRUE if this is a sector with death penalty.

Definition at line 101 of file pssectorinfo.h.

float psSectorInfo::GetDeathRot ( )
inline

Gets the rotation we will teleport to when dieing in this sector.

Returns
A float containing the rotation.

Definition at line 145 of file pssectorinfo.h.

csString psSectorInfo::GetDeathSector ( )
inline

Gets the sector name we will teleport to when dieing in this sector.

Returns
csString A csString containing the sector name.

Definition at line 131 of file pssectorinfo.h.

bool psSectorInfo::GetHasPenalty ( )
inline

Checks if a teleporting sector will trigger the death penalty when used.

Note
this can be TRUE even if the previous isn't but it won't do anything.
Returns
TRUE if this is a sector with death penalty.

Definition at line 83 of file pssectorinfo.h.

bool psSectorInfo::GetIsColliding ( )
inline

Definition at line 61 of file pssectorinfo.h.

bool psSectorInfo::GetIsNonTransient ( )
inline

Definition at line 65 of file pssectorinfo.h.

bool psSectorInfo::GetIsTeleporting ( )
inline

Checks if this is set as a teleporting sector.

A teleporting sector is a sector which teleports the player to defined sector (in teleportingSector/Cords/Rot) or spawn if not defined.

Returns
TRUE if this is a teleporting sector.

Definition at line 75 of file pssectorinfo.h.

double psSectorInfo::GetProperty ( MathEnvironment env,
const char *  ptr 
)
virtual

This is used by the math scripting engine to get various values.

Implements iScriptableVar.

unsigned int psSectorInfo::GetRandomWeatherDensity ( unsigned int  id)

Gets a random value between the max and min density for this weather type.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
An unsigned int with a random density time.
unsigned int psSectorInfo::GetRandomWeatherDuration ( unsigned int  id)

Gets a random value between the max and min Duration for this weather type.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
An unsigned int with a random duration time.
unsigned int psSectorInfo::GetRandomWeatherFadeIn ( unsigned int  id)

Gets a random value between the max and min Fade In for this weather type.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
An unsigned int with a random Fade In time.
unsigned int psSectorInfo::GetRandomWeatherFadeOut ( unsigned int  id)

Gets a random value between the max and min Fade Out for this weather type.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
An unsigned int with a random Fade Out time.
unsigned int psSectorInfo::GetRandomWeatherGap ( unsigned int  id)

Gets a random value between the max and min Gap for this weather type.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
An unsigned int with a random gap time.
csVector3 psSectorInfo::GetTeleportingCord ( )
inline

Gets the sector cordinates we will teleport to when entering this sector.

Returns
A csVector3 containing the sector cordinates.

Definition at line 116 of file pssectorinfo.h.

float psSectorInfo::GetTeleportingRot ( )
inline

Gets the rotation we will teleport to when entering this sector.

Returns
A float containing the rotation.

Definition at line 123 of file pssectorinfo.h.

csString psSectorInfo::GetTeleportingSector ( )
inline

Gets the sector name we will teleport to when entering this sector.

Returns
A csString containing the sector name.

Definition at line 109 of file pssectorinfo.h.

bool psSectorInfo::GetWeatherEnabled ( unsigned int  id)

Gets the enabled status of a weather event type for this sector.

Parameters
idThe id of the event
See also
psWeatherMessage
Returns
A Boolean saying if the weather type is enabled and activable (has valid data.)
void psSectorInfo::SetWeatherEnabled ( unsigned int  id,
bool  newStatus 
)

Sets the enabled status of a weather event type for this sector.

Parameters
idThe id of the event
See also
psWeatherMessage
Parameters
newStatusThe new status to assign to the weather event type (false for disabled)
const char* psSectorInfo::ToString ( )
inlinevirtual

Implements iScriptableVar.

Definition at line 56 of file pssectorinfo.h.

Member Data Documentation

int psSectorInfo::b

Definition at line 256 of file pssectorinfo.h.

unsigned int psSectorInfo::current_rain_drops

Drops.

Definition at line 221 of file pssectorinfo.h.

csVector3 psSectorInfo::deathCords

the destination cordinates where to teleport on death from this sector

Definition at line 246 of file pssectorinfo.h.

bool psSectorInfo::deathRestoreHP

Sets if this sector will restore hp when the player dies in it.

Definition at line 231 of file pssectorinfo.h.

bool psSectorInfo::deathRestoreMana

Sets if this sector will restore mana when the player dies in it.

Definition at line 229 of file pssectorinfo.h.

float psSectorInfo::deathRot

The destination rotation where to teleport on death from this sector.

Definition at line 248 of file pssectorinfo.h.

csString psSectorInfo::deathSector

The sector where to teleport on death from this sector. Note if empty it will be the default one.

Definition at line 244 of file pssectorinfo.h.

bool psSectorInfo::densitySaved

Definition at line 254 of file pssectorinfo.h.

unsigned int psSectorInfo::fog_density

Definition at line 253 of file pssectorinfo.h.

unsigned int psSectorInfo::fog_density_old

Definition at line 253 of file pssectorinfo.h.

unsigned int psSectorInfo::fogFade

Definition at line 255 of file pssectorinfo.h.

int psSectorInfo::g

Definition at line 256 of file pssectorinfo.h.

csString psSectorInfo::god_name

Definition at line 260 of file pssectorinfo.h.

bool psSectorInfo::has_penalty

This sector will apply the death penalty if it's a teleporting sector.

Definition at line 236 of file pssectorinfo.h.

bool psSectorInfo::is_colliding

Definition at line 225 of file pssectorinfo.h.

bool psSectorInfo::is_non_transient

Definition at line 226 of file pssectorinfo.h.

bool psSectorInfo::is_raining

Definition at line 223 of file pssectorinfo.h.

bool psSectorInfo::is_snowing

Definition at line 224 of file pssectorinfo.h.

bool psSectorInfo::is_teleporting

This sector will immediately teleport the player somewhere else when entered if true.

Definition at line 234 of file pssectorinfo.h.

csString psSectorInfo::name

Definition at line 151 of file pssectorinfo.h.

int psSectorInfo::r

Definition at line 256 of file pssectorinfo.h.

float psSectorInfo::say_range

Definition at line 258 of file pssectorinfo.h.

csVector3 psSectorInfo::teleportingCords

The destination cordinates when this sector is a teleporting sector.

Definition at line 240 of file pssectorinfo.h.

float psSectorInfo::teleportingRot

The destination rotation when this sector is a teleporting sector.

Definition at line 242 of file pssectorinfo.h.

csString psSectorInfo::teleportingSector

The destination sector when this sector is a teleporting sector. Note if empty it will be spawn.

Definition at line 238 of file pssectorinfo.h.

unsigned int psSectorInfo::uid

Definition at line 150 of file pssectorinfo.h.

csHash<weatherTypeData, unsigned int> psSectorInfo::weatherData

An hash containing all the various possible weather data.

Definition at line 171 of file pssectorinfo.h.


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