Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.Zone Class Reference

This class represents one Zone in DAOC. It holds all relevant information that is needed to do different calculations. More...

List of all members.

Classes

class  SubNodeElement
 This class represent a node in a doubly linked list.

Public Types

enum  eGameObjectType { ITEM = 0, NPC = 1, PLAYER = 2, DOOR = 3 }
 Object Type is Item. More...

Public Member Functions

 Zone (Region region, ushort id, string desc, int xoff, int yoff, int width, int height, ushort zoneskinID, bool isDivingEnabled, int waterlevel, bool islava, int xpBonus, int rpBonus, int bpBonus, int coinBonus)
 Creates a new Zone object.
void Delete ()
eRealm GetRealm ()
void ObjectEnterZone (GameObject p_Obj)
 Handle a GameObject entering a zone.
IList GetAreasOfSpot (IPoint3D spot)
 Convinientmethod for Region.GetAreasOfZone(), since zone.Region.getAreasOfZone(zone,x,y,z) is a bit confusing ...
IList GetAreasOfSpot (int x, int y, int z)
IList GetAreasOfSpot (IPoint3D spot, bool checkZ)
GameNPC GetRandomNPCByCon (eRealm realm, int compareLevel, int conLevel)
 Get's a random NPC based on a con level.
GameNPC GetRandomNPC (eRealm realm)
 Get a random NPC belonging to a realm.
GameNPC GetRandomNPC (eRealm realm, int minLevel, int maxLevel)
 Get a random NPC belonging to a realm between levels minlevel and maxlevel.
GameNPC GetRandomNPC (eRealm[] realms)
 Get a random npc from zone with given realms.
GameNPC GetRandomNPC (eRealm[] realms, int minLevel, int maxLevel)
 Get a random npc from zone with given realms.
List< GameNPCGetNPCsOfZone (eRealm realm)
 Gets all NPC's in zone.
List< GameNPCGetNPCsOfZone (eRealm[] realms, int minLevel, int maxLevel, int compareLevel, int conLevel, bool firstOnly)
 Get NPCs of a zone given various parameters.

Static Public Member Functions

static eRealm GetRealmByZoneID (ushort id)
 Gets the Zones Realm by passing the ZoneID.
static bool CheckSquareDistance (int x1, int y1, int z1, int x2, int y2, int z2, uint sqDistance, bool ignoreZ)
 Checks that the square distance between two arbitary points in space is lower or equal to the given square distance.

Public Attributes

const ushort MAX_REFRESH_INTERVAL = 2000

Properties

bool IsDungeon [get]
Region ZoneRegion [get, set]
 Returns the region of this zone.
ushort ID [get]
 Returns the ID of this zone.
ushort ZoneSkinID [get]
 The ID we send to the client, for client-side positioning of gameobjects and npcs.
string Description [get, set]
 Return the description of this zone.
int XOffset [get]
 Returns the XOffset of this Zone.
int YOffset [get]
 Returns the YOffset of this Zone.
int Width [get]
 Returns the Width of this Zone.
int Height [get]
 Returns the Height of this Zone.
int Waterlevel [get, set]
bool IsDivingEnabled [get, set]
virtual bool IsLava [get, set]
 Is water in this zone lava?
int TotalNumberOfObjects [get]
 Returns the total number of objects held in the zone.
int BonusExperience [get, set]
 Bonus XP Gained (%)
int BonusRealmpoints [get, set]
 Bonus RP Gained (%)
int BonusBountypoints [get, set]
 Bonus BP Gained (%)
int BonusCoin [get, set]
 Bonus Money Gained (%)

Detailed Description

This class represents one Zone in DAOC. It holds all relevant information that is needed to do different calculations.


Member Enumeration Documentation

Object Type is Item.


Constructor & Destructor Documentation

DOL.GS.Zone.Zone ( Region  region,
ushort  id,
string  desc,
int  xoff,
int  yoff,
int  width,
int  height,
ushort  zoneskinID,
bool  isDivingEnabled,
int  waterlevel,
bool  islava,
int  xpBonus,
int  rpBonus,
int  bpBonus,
int  coinBonus 
)

Creates a new Zone object.

Parameters:
regionthe parent region
idthe zone id (eg. 15)
descthe zone description (eg. "Camelot Hills")
xoffthe X offset of this zone inside the region
yoffthe Y offset of this zone inside the region
widththe Width of this zone
heightthe Height of this zone
zoneskinIDFor clientside positioning in instances: The 'fake' zoneid we send to clients.

Member Function Documentation

static bool DOL.GS.Zone.CheckSquareDistance ( int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2,
uint  sqDistance,
bool  ignoreZ 
) [static]

Checks that the square distance between two arbitary points in space is lower or equal to the given square distance.

Parameters:
x1X of Point1
y1Y of Point1
z1Z of Point1
x2X of Point2
y2Y of Point2
z2Z of Point2
sqDistancethe square distance to check for
Returns:
The distance
IList DOL.GS.Zone.GetAreasOfSpot ( IPoint3D  spot)

Convinientmethod for Region.GetAreasOfZone(), since zone.Region.getAreasOfZone(zone,x,y,z) is a bit confusing ...

Parameters:
spot
Returns:
List<GameNPC> DOL.GS.Zone.GetNPCsOfZone ( eRealm  realm)

Gets all NPC's in zone.

Parameters:
realm
Returns:
List<GameNPC> DOL.GS.Zone.GetNPCsOfZone ( eRealm[]  realms,
int  minLevel,
int  maxLevel,
int  compareLevel,
int  conLevel,
bool  firstOnly 
)

Get NPCs of a zone given various parameters.

Parameters:
realms
minLevel
maxLevel
compareLevel
conLevel
firstOnly
Returns:
GameNPC DOL.GS.Zone.GetRandomNPC ( eRealm  realm,
int  minLevel,
int  maxLevel 
)

Get a random NPC belonging to a realm between levels minlevel and maxlevel.

Parameters:
realmThe realm the NPC belong to
minLevelThe minimal level of the NPC
maxLevelThe maximal level NPC
Returns:
A npc
GameNPC DOL.GS.Zone.GetRandomNPC ( eRealm  realm)

Get a random NPC belonging to a realm.

Parameters:
realmThe realm the NPC belong to
Returns:
a npc
GameNPC DOL.GS.Zone.GetRandomNPC ( eRealm[]  realms,
int  minLevel,
int  maxLevel 
)

Get a random npc from zone with given realms.

Parameters:
realmsThe realms to get the NPC from
maxLevelThe minimal level of the NPC
minLevelThe maximum level of the NPC
Returns:
The NPC
GameNPC DOL.GS.Zone.GetRandomNPC ( eRealm[]  realms)

Get a random npc from zone with given realms.

Parameters:
realmsThe realms to get the NPC from
Returns:
The NPC
GameNPC DOL.GS.Zone.GetRandomNPCByCon ( eRealm  realm,
int  compareLevel,
int  conLevel 
)

Get's a random NPC based on a con level.

Parameters:
realm
compareLevel
conLevel-3 grey, -2 green, -1 blue, 0 yellow, 1 - orange, 2 red, 3 purple
Returns:
static eRealm DOL.GS.Zone.GetRealmByZoneID ( ushort  id) [static]

Gets the Zones Realm by passing the ZoneID.

Parameters:
id
Returns:
void DOL.GS.Zone.ObjectEnterZone ( GameObject  p_Obj)

Handle a GameObject entering a zone.

Parameters:
p_ObjThe GameObject object

Property Documentation

int DOL.GS.Zone.BonusBountypoints [get, set]

Bonus BP Gained (%)

int DOL.GS.Zone.BonusCoin [get, set]

Bonus Money Gained (%)

int DOL.GS.Zone.BonusExperience [get, set]

Bonus XP Gained (%)

int DOL.GS.Zone.BonusRealmpoints [get, set]

Bonus RP Gained (%)

string DOL.GS.Zone.Description [get, set]

Return the description of this zone.

int DOL.GS.Zone.Height [get]

Returns the Height of this Zone.

ushort DOL.GS.Zone.ID [get]

Returns the ID of this zone.

virtual bool DOL.GS.Zone.IsLava [get, set]

Is water in this zone lava?

int DOL.GS.Zone.TotalNumberOfObjects [get]

Returns the total number of objects held in the zone.

int DOL.GS.Zone.Width [get]

Returns the Width of this Zone.

int DOL.GS.Zone.XOffset [get]

Returns the XOffset of this Zone.

int DOL.GS.Zone.YOffset [get]

Returns the YOffset of this Zone.

Region DOL.GS.Zone.ZoneRegion [get, set]

Returns the region of this zone.

ushort DOL.GS.Zone.ZoneSkinID [get]

The ID we send to the client, for client-side positioning of gameobjects and npcs.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events