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

The WorldMgr is used to retrieve information and objects from the world. It contains lots of functions that can be used. It is a static class. More...

List of all members.

Static Public Member Functions

static Teleport GetTeleportLocation (eRealm realm, String teleportKey)
 Returns the teleport given an ID and a realm.
static bool AddTeleportLocation (Teleport teleport)
 Add a new teleport destination (used by /teleport add).
static bool EarlyInit (out RegionData[] regionsData)
 Initializes the most important things that is needed for some code.
static string LoadTeleports ()
 Load available teleport locations.
static bool Init (RegionData[] regionsData)
 Initializes the WorldMgr. This function must be called before the WorldMgr can be used!
static GameTimer.TimeManager[] GetRegionTimeManagers ()
 Gets all region time managers.
static StackTrace GetRelocateRegionsStacktrace ()
 Gets the RelocateRegions() thread stacktrace.
static void StartDay (uint dayInc, uint dayStart)
 Starts a new day with a certain increment.
static uint GetCurrentGameTime (GamePlayer player)
 Gets the game time for a players current region.
static uint GetCurrentGameTime ()
 Gets the current game time.
static uint GetDayIncrement (GamePlayer player)
 Returns the day increment.
static uint GetDayIncrement ()
static StackTrace GetWorldUpdateStacktrace ()
 Gets the world update thread stacktrace.
static void Exit ()
 Cleans up and stops all the RegionMgr tasks inside the regions.
static Region RegisterRegion (GameTimer.TimeManager time, RegionData data)
 Creates and adds a new region to the WorldMgr.
static RegionEntry[] GetRegionList ()
 Creates an array of region entries.
static ICollection GetAllRegions ()
 Returns all the regions of the world.
static void RegisterZone (ZoneData zoneData, ushort zoneID, ushort regionID, string zoneName, int xpBonus, int rpBonus, int bpBonus, int coinBonus)
 Registers a Zone into a Region.
static bool StartRegionMgrs ()
 Starts all RegionMgrs inside the Regions.
static void StopRegionMgrs ()
 Stops all Regionmgrs inside the Regions.
static Region GetRegion (ushort regionID)
 Fetch a Region by it's ID.
static Zone GetZone (ushort zoneID)
 Gets a Zone object by it's ID.
static int CreateSessionID (GameClient obj)
 Creates a new SessionID for a GameClient object.
static GameObject[] GetobjectsFromRegion (ushort regionID, Type objectType)
 Searches for all objects from a specific region.
static GameStaticItem[] GetStaticItemFromRegion (ushort regionID)
 Searches for all GameStaticItem from a specific region.
static GameObject[] GetObjectsByNameFromRegion (string name, ushort regionID, eRealm realm, Type objectType)
 Searches for all objects with the given name, from a specific region and realm.
static GameNPC[] GetNPCsFromRegion (ushort regionID)
 Returns the npcs in a given region.
static GameObject[] GetObjectsByName (string name, eRealm realm, Type objectType)
 Searches for all objects with the given name and realm in ALL regions!
static GameNPC[] GetNPCsByNameFromRegion (string name, ushort regionID, eRealm realm)
 Searches for all NPCs with the given name, from a specific region and realm.
static GameNPC[] GetNPCsByName (string name, eRealm realm)
 Searches for all NPCs with the given name and realm in ALL regions!
static List< GameNPCGetNPCsByGuild (string guild, eRealm realm)
 Searches for all NPCs with the given guild and realm in ALL regions!
static List< GameNPCGetNPCsByType (Type type, eRealm realm)
 Searches for all NPCs with the given type and realm in ALL regions!
static List< GameNPCGetNPCsByType (Type type, eRealm realm, ushort region)
 Searches for all NPCs with the given type and realm in a specific region.
static GameClient GetClientFromID (int id)
 Fetch a GameClient based on it's ID.
static void RemoveClient (GameClient entry)
 Removes a GameClient and free's it's ID again!
static void RemoveSessionID (int id)
 Removes a GameClient based on it's ID.
static int GetDistance (GameObject obj1, GameObject obj2)
 Get's the distance of two GameObjects.
static int GetDistance (GameObject obj1, GameObject obj2, double zfactor)
 Get's the distance of two GameObjects.
static int GetDistance (int x1, int y1, int z1, int x2, int y2, int z2)
 Gets the distance of two arbitary points in space.
static int GetDistance (int x1, int y1, int z1, int x2, int y2, int z2, double zfactor)
 Gets the distance of two arbitary points in space.
static int GetDistance (GameObject obj, int x, int y, int z)
 Gets the distance of an Object to an arbitary point.
static bool CheckDistance (int x1, int y1, int z1, int x2, int y2, int z2, int radius)
static bool CheckDistance (IPoint3D obj, IPoint3D obj2, int radius)
static bool CheckDistance (GameObject obj, int x2, int y2, int z2, int radius)
static bool CheckDistance (GameObject obj, GameObject obj2, int radius)
static int GetClientsOfRealmCount (eRealm realm)
 Returns the number of playing Clients inside a realm.
static IList< GameClientGetClientsOfRealm (eRealm realm)
 Returns an array of GameClients currently playing from a specific realm.
static int GetClientsOfRegionCount (ushort regionID)
 Returns the number of playing Clients in a certain Region.
static int GetClientsOfRegionCount (ushort regionID, eRealm realm)
 Returns the number of playing Clients in a certain Region.
static IList< GameClientGetClientsOfRegion (ushort regionID)
 Returns a list of playing clients inside a region.
static GameClient GetClientByPlayerID (string playerID, bool exactMatch, bool activeRequired)
 Find a GameClient by the Player's ID Case-insensitive, make sure you use returned Player.Name instead of what player typed.
static GameClient GetClientByAccountName (string accountName, bool exactMatch)
 Finds a GameClient by the AccountName.
static GameClient GetClientByPlayerName (string playerName, bool exactMatch, bool activeRequired)
 Find a GameClient by the Player's name Case-insensitive, make sure you use returned Player.Name instead of what player typed.
static GameClient GetClientByPlayerNameAndRealm (string playerName, eRealm realm, bool activeRequired)
 Find a GameClient by the Player's name. Case-insensitive now, make sure you use returned Player.Name instead of what player typed.
static GameClient GuessClientByPlayerNameAndRealm (string playerName, eRealm realm, bool activeRequired, out int result)
 Guess a GameClient by first letters of Player's name Case-insensitive, make sure you use returned Player.Name instead of what player typed.
static GameClient GetClientByPlayerNameFromRegion (string playerName, ushort regionID, bool exactMatch, bool activeRequired)
 Find a GameClient by the Player's name from a specific region.
static IList< GameClientGetAllPlayingClients ()
 Gets a copy of all playing clients.
static int GetAllPlayingClientsCount ()
 Returns the number of all playing clients.
static IList< GameClientGetAllClients ()
 Gets a copy of ALL clients no matter at what state they are.
static int GetAllClientsCount ()
 Gets a count of ALL clients no matter at what state they are.
static GameObject GetObjectByIDFromRegion (ushort regionID, ushort oID)
 Fetch an Object from a specific Region by it's ID.
static GameObject GetObjectTypeByIDFromRegion (ushort regionID, ushort oID, Type type)
 Fetch an Object of specific type from a specific Region.
static IEnumerable GetPlayersCloseToSpot (ushort regionid, int x, int y, int z, ushort radiusToCheck, bool withDistance)
 Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.
static IEnumerable GetPlayersCloseToSpot (IGameLocation location, ushort radiusToCheck)
 Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.
static IEnumerable GetPlayersCloseToSpot (ushort regionid, IPoint3D point, ushort radiusToCheck)
 Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.
static IEnumerable GetPlayersCloseToSpot (ushort regionid, int x, int y, int z, ushort radiusToCheck)
 Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.
static IEnumerable GetNPCsCloseToSpot (ushort regionid, int x, int y, int z, ushort radiusToCheck, bool withDistance)
 Returns an IEnumerator of GameNPCs that are close to a certain spot in the region.
static IEnumerable GetNPCsCloseToSpot (ushort regionid, int x, int y, int z, ushort radiusToCheck)
 Returns an IEnumerator of GameNPCs that are close to a certain spot in the region.
static IEnumerable GetItemsCloseToSpot (ushort regionid, int x, int y, int z, ushort radiusToCheck, bool withDistance)
 Returns an IEnumerator of GameItems that are close to a certain spot in the region.
static int SavePlayers ()
 Saves all players into the database.
static BaseInstance CreateInstance (ushort skinID, Type instanceType)
 Creates a new instance, with the given 'skin' (the regionID to display client side).
static BaseInstance CreateInstance (ushort requestedID, ushort skinID, Type instanceType)
 Tries to create an instance with the suggested ID and a given 'skin' (the regionID to display client side).
static void RemoveInstance (BaseInstance instance)
 Removes the given instance from the server.

Public Attributes

const long PING_TIMEOUT = 360
 Ping timeout definition in seconds.
const int MAX_EXPFORKILL_DISTANCE = 16384
 Holds the distance which player get experience from a living object.
const int WHISPER_DISTANCE = 512
 Is the distance a whisper can be heard.
const int SAY_DISTANCE = 512
 Is the distance a say is broadcast.
const int INFO_DISTANCE = 512
 Is the distance info messages are broadcast (player attacks, spell cast, player stunned/rooted/mezzed, loot dropped)
const ushort DEATH_MESSAGE_DISTANCE = ushort.MaxValue
 Is the distance a death message is broadcast when player dies.
const int YELL_DISTANCE = 1024
 Is the distance a yell is broadcast.
const int GIVE_ITEM_DISTANCE = 128
 Is the distance at which livings can give a item.
const int INTERACT_DISTANCE = 192
 Is the distance at which livings can interact.
const int VISIBILITY_DISTANCE = 3600
 Is the distance an player can see.
const int REFRESH_DISTANCE = 1000
 Moving greater than this distance requires the player to do a full world refresh.
const int VISIBILITY_SQUARE_DISTANCE = 12960000
 Is the square distance a player can see.
const int OBJ_UPDATE_DISTANCE = 4096
 Holds the distance at which objects are updated.
const int DEFAULT_VALUE_FOR_INSTANCE_ID_SEARCH_START = 1000
 Where do we start looking for an instance id from if none is requested?

Static Public Attributes

static Dictionary< string,
DateTime > 
RvRLinkDeadPlayers = new Dictionary<string, DateTime>()
static ushort m_lastZoneError = 0

Properties

static Hashtable Regions [get]
static Hashtable Zones [get]
static Hashtable RegionData [get]
static Dictionary< ushort,
List< ZoneData > > 
ZonesData [get]

Detailed Description

The WorldMgr is used to retrieve information and objects from the world. It contains lots of functions that can be used. It is a static class.


Member Function Documentation

static bool DOL.GS.WorldMgr.AddTeleportLocation ( Teleport  teleport) [static]

Add a new teleport destination (used by /teleport add).

Parameters:
teleport
Returns:
static BaseInstance DOL.GS.WorldMgr.CreateInstance ( ushort  skinID,
Type  instanceType 
) [static]

Creates a new instance, with the given 'skin' (the regionID to display client side).

Parameters:
skinID
Returns:
static BaseInstance DOL.GS.WorldMgr.CreateInstance ( ushort  requestedID,
ushort  skinID,
Type  instanceType 
) [static]

Tries to create an instance with the suggested ID and a given 'skin' (the regionID to display client side).

Parameters:
requestedID0 for random
skinID
instanceType
Returns:
static int DOL.GS.WorldMgr.CreateSessionID ( GameClient  obj) [static]

Creates a new SessionID for a GameClient object.

Parameters:
objThe GameClient for which we need an ID
Returns:
The new ID or -1 if none free
static bool DOL.GS.WorldMgr.EarlyInit ( out RegionData[]  regionsData) [static]

Initializes the most important things that is needed for some code.

Parameters:
regionsDataThe loaded regions data
static void DOL.GS.WorldMgr.Exit ( ) [static]

Cleans up and stops all the RegionMgr tasks inside the regions.

static IList<GameClient> DOL.GS.WorldMgr.GetAllClients ( ) [static]

Gets a copy of ALL clients no matter at what state they are.

Returns:
ArrayList of GameClients
static int DOL.GS.WorldMgr.GetAllClientsCount ( ) [static]

Gets a count of ALL clients no matter at what state they are.

Returns:
ArrayList of GameClients
static IList<GameClient> DOL.GS.WorldMgr.GetAllPlayingClients ( ) [static]

Gets a copy of all playing clients.

Returns:
ArrayList of playing GameClients
static int DOL.GS.WorldMgr.GetAllPlayingClientsCount ( ) [static]

Returns the number of all playing clients.

Returns:
Count of all playing clients
static ICollection DOL.GS.WorldMgr.GetAllRegions ( ) [static]

Returns all the regions of the world.

Returns:
static GameClient DOL.GS.WorldMgr.GetClientByAccountName ( string  accountName,
bool  exactMatch 
) [static]

Finds a GameClient by the AccountName.

Parameters:
accountNameAccountName to search
exactMatchtrue if AccountName match exactly
Returns:
The found GameClient or null
static GameClient DOL.GS.WorldMgr.GetClientByPlayerID ( string  playerID,
bool  exactMatch,
bool  activeRequired 
) [static]

Find a GameClient by the Player's ID Case-insensitive, make sure you use returned Player.Name instead of what player typed.

Parameters:
playerIDID to search
exactMatchtrue if AccountName match exactly
activeRequired
Returns:
The found GameClient or null
static GameClient DOL.GS.WorldMgr.GetClientByPlayerName ( string  playerName,
bool  exactMatch,
bool  activeRequired 
) [static]

Find a GameClient by the Player's name Case-insensitive, make sure you use returned Player.Name instead of what player typed.

Parameters:
playerNameName to search
exactMatchtrue if AccountName match exactly
activeRequired
Returns:
The found GameClient or null
static GameClient DOL.GS.WorldMgr.GetClientByPlayerNameAndRealm ( string  playerName,
eRealm  realm,
bool  activeRequired 
) [static]

Find a GameClient by the Player's name. Case-insensitive now, make sure you use returned Player.Name instead of what player typed.

Parameters:
playerNameName to search
realmIDsearch in: 0=all realms or player.Realm
activeRequired
Returns:
The found GameClient or null
static GameClient DOL.GS.WorldMgr.GetClientByPlayerNameFromRegion ( string  playerName,
ushort  regionID,
bool  exactMatch,
bool  activeRequired 
) [static]

Find a GameClient by the Player's name from a specific region.

Parameters:
playerNameName to search
regionIDRegion ID of region to search through
exactMatchtrue if the Name must match exactly
activeRequired
Returns:
The first found GameClient or null
static GameClient DOL.GS.WorldMgr.GetClientFromID ( int  id) [static]

Fetch a GameClient based on it's ID.

Parameters:
idID to search
Returns:
The found GameClient or null if not found
static IList<GameClient> DOL.GS.WorldMgr.GetClientsOfRealm ( eRealm  realm) [static]

Returns an array of GameClients currently playing from a specific realm.

Parameters:
realmIDID of Realm (1=Alb, 2=Mid, 3=Hib)
Returns:
An ArrayList of clients
static int DOL.GS.WorldMgr.GetClientsOfRealmCount ( eRealm  realm) [static]

Returns the number of playing Clients inside a realm.

Parameters:
realmIDID of Realm (1=Alb, 2=Mid, 3=Hib)
Returns:
Client count of that realm
static IList<GameClient> DOL.GS.WorldMgr.GetClientsOfRegion ( ushort  regionID) [static]

Returns a list of playing clients inside a region.

Parameters:
regionIDThe ID of the Region
Returns:
Array of GameClients from that Region
static int DOL.GS.WorldMgr.GetClientsOfRegionCount ( ushort  regionID) [static]

Returns the number of playing Clients in a certain Region.

Parameters:
regionIDThe ID of the Region
Returns:
Number of playing Clients in that Region
static int DOL.GS.WorldMgr.GetClientsOfRegionCount ( ushort  regionID,
eRealm  realm 
) [static]

Returns the number of playing Clients in a certain Region.

Parameters:
regionIDThe ID of the Region
realmThe realm of clients to check
Returns:
Number of playing Clients in that Region
static uint DOL.GS.WorldMgr.GetCurrentGameTime ( GamePlayer  player) [static]

Gets the game time for a players current region.

Parameters:
client
Returns:
static uint DOL.GS.WorldMgr.GetCurrentGameTime ( ) [static]

Gets the current game time.

Returns:
current time
static uint DOL.GS.WorldMgr.GetDayIncrement ( GamePlayer  player) [static]

Returns the day increment.

Returns:
the day increment
static int DOL.GS.WorldMgr.GetDistance ( GameObject  obj1,
GameObject  obj2 
) [static]

Get's the distance of two GameObjects.

Parameters:
obj1Object1
obj2Object2
Returns:
The distance in units or -1 if they are not the same Region
static int DOL.GS.WorldMgr.GetDistance ( GameObject  obj1,
GameObject  obj2,
double  zfactor 
) [static]

Get's the distance of two GameObjects.

Parameters:
obj1Object1
obj2Object2
zfactorFactor for Z distance use lower 0..1 to lower Z influence
Returns:
The distance in units or -1 if they are not the same Region
static int DOL.GS.WorldMgr.GetDistance ( int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2 
) [static]

Gets the distance of two arbitary points in space.

Parameters:
x1X of Point1
y1Y of Point1
z1Z of Point1
x2X of Point2
y2Y of Point2
z2Z of Point2
Returns:
The distance
static int DOL.GS.WorldMgr.GetDistance ( GameObject  obj,
int  x,
int  y,
int  z 
) [static]

Gets the distance of an Object to an arbitary point.

Parameters:
objGameObject used as Point1
xX of Point2
yY of Point2
zZ of Point2
Returns:
The distance
static int DOL.GS.WorldMgr.GetDistance ( int  x1,
int  y1,
int  z1,
int  x2,
int  y2,
int  z2,
double  zfactor 
) [static]

Gets the distance of two arbitary points in space.

Parameters:
x1X of Point1
y1Y of Point1
z1Z of Point1
x2X of Point2
y2Y of Point2
z2Z of Point2
zfactorFactor for Z distance use lower 0..1 to lower Z influence
Returns:
The distance
static IEnumerable DOL.GS.WorldMgr.GetItemsCloseToSpot ( ushort  regionid,
int  x,
int  y,
int  z,
ushort  radiusToCheck,
bool  withDistance 
) [static]

Returns an IEnumerator of GameItems that are close to a certain spot in the region.

Parameters:
regionidRegion to search
xX inside region
yY inside region
zZ inside region
radiusToCheckRadius to sarch for GameItems
withDistanceWether or not to return the objects with distance
Returns:
IEnumerator that can be used to go through all items
static List<GameNPC> DOL.GS.WorldMgr.GetNPCsByGuild ( string  guild,
eRealm  realm 
) [static]

Searches for all NPCs with the given guild and realm in ALL regions!

Parameters:
guildThe guild name for the npc
realmThe realm of the npc
Returns:
A collection of NPCs which match the result
static GameNPC [] DOL.GS.WorldMgr.GetNPCsByName ( string  name,
eRealm  realm 
) [static]

Searches for all NPCs with the given name and realm in ALL regions!

Parameters:
nameThe name of the object to search
realmThe realm of the object we search!
Returns:
All NPCs with the specified parameters

b

static GameNPC [] DOL.GS.WorldMgr.GetNPCsByNameFromRegion ( string  name,
ushort  regionID,
eRealm  realm 
) [static]

Searches for all NPCs with the given name, from a specific region and realm.

Parameters:
nameThe name of the object to search
regionIDThe region to search
realmThe realm of the object we search!
Returns:
All NPCs with the specified parameters
static List<GameNPC> DOL.GS.WorldMgr.GetNPCsByType ( Type  type,
eRealm  realm,
ushort  region 
) [static]

Searches for all NPCs with the given type and realm in a specific region.

Parameters:
type
realm
Returns:
static List<GameNPC> DOL.GS.WorldMgr.GetNPCsByType ( Type  type,
eRealm  realm 
) [static]

Searches for all NPCs with the given type and realm in ALL regions!

Parameters:
type
realm
Returns:
static IEnumerable DOL.GS.WorldMgr.GetNPCsCloseToSpot ( ushort  regionid,
int  x,
int  y,
int  z,
ushort  radiusToCheck,
bool  withDistance 
) [static]

Returns an IEnumerator of GameNPCs that are close to a certain spot in the region.

Parameters:
regionidRegion to search
xX inside region
yY inside region
zZ inside region
radiusToCheckRadius to sarch for GameNPCs
withDistanceWether or not to return the objects with distance
Returns:
IEnumerator that can be used to go through all NPCs
static IEnumerable DOL.GS.WorldMgr.GetNPCsCloseToSpot ( ushort  regionid,
int  x,
int  y,
int  z,
ushort  radiusToCheck 
) [static]

Returns an IEnumerator of GameNPCs that are close to a certain spot in the region.

Parameters:
regionidRegion to search
xX inside region
yY inside region
zZ inside region
radiusToCheckRadius to sarch for GameNPCs
Returns:
IEnumerator that can be used to go through all NPCs
static GameNPC [] DOL.GS.WorldMgr.GetNPCsFromRegion ( ushort  regionID) [static]

Returns the npcs in a given region.

Returns:
static GameObject DOL.GS.WorldMgr.GetObjectByIDFromRegion ( ushort  regionID,
ushort  oID 
) [static]

Fetch an Object from a specific Region by it's ID.

Parameters:
regionIDRegion ID of Region to search through
oIDObject ID to search
Returns:
GameObject found in the Region or null
static GameObject [] DOL.GS.WorldMgr.GetObjectsByName ( string  name,
eRealm  realm,
Type  objectType 
) [static]

Searches for all objects with the given name and realm in ALL regions!

Parameters:
nameThe name of the object to search
realmThe realm of the object we search!
objectTypeThe type of the object you search
Returns:
All objects with the specified parameters

b

static GameObject [] DOL.GS.WorldMgr.GetObjectsByNameFromRegion ( string  name,
ushort  regionID,
eRealm  realm,
Type  objectType 
) [static]

Searches for all objects with the given name, from a specific region and realm.

Parameters:
nameThe name of the object to search
regionIDThe region to search
realmThe realm of the object we search!
objectTypeThe type of the object you search
Returns:
All objects with the specified parameters
static GameObject [] DOL.GS.WorldMgr.GetobjectsFromRegion ( ushort  regionID,
Type  objectType 
) [static]

Searches for all objects from a specific region.

Parameters:
regionIDThe region to search
objectTypeThe type of the object you search
Returns:
All objects with the specified parameters
static GameObject DOL.GS.WorldMgr.GetObjectTypeByIDFromRegion ( ushort  regionID,
ushort  oID,
Type  type 
) [static]

Fetch an Object of specific type from a specific Region.

Parameters:
regionIDRegion ID of Regin to search through
oIDObject ID to search
typeType of Object to search
Returns:
GameObject of specific type or null if not found
static IEnumerable DOL.GS.WorldMgr.GetPlayersCloseToSpot ( IGameLocation  location,
ushort  radiusToCheck 
) [static]

Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.

Parameters:
locationthe game location to search from
radiusToCheckRadius to sarch for GameClients
Returns:
IEnumerator that can be used to go through all players
static IEnumerable DOL.GS.WorldMgr.GetPlayersCloseToSpot ( ushort  regionid,
int  x,
int  y,
int  z,
ushort  radiusToCheck 
) [static]

Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.

Parameters:
regionidRegion to search
xX inside region
yY inside region
zZ inside region
radiusToCheckRadius to sarch for GameClients
Returns:
IEnumerator that can be used to go through all players
static IEnumerable DOL.GS.WorldMgr.GetPlayersCloseToSpot ( ushort  regionid,
int  x,
int  y,
int  z,
ushort  radiusToCheck,
bool  withDistance 
) [static]

Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.

Parameters:
regionidRegion to search
xX inside region
yY inside region
zZ inside region
withDistanceWether or not to return the objects with distance
radiusToCheckRadius to sarch for GameClients
Returns:
IEnumerator that can be used to go through all players
static IEnumerable DOL.GS.WorldMgr.GetPlayersCloseToSpot ( ushort  regionid,
IPoint3D  point,
ushort  radiusToCheck 
) [static]

Returns an IEnumerator of GamePlayers that are close to a certain spot in the region.

Parameters:
regionidRegion to search
pointthe 3D point to search from
radiusToCheckRadius to sarch for GameClients
Returns:
IEnumerator that can be used to go through all players
static Region DOL.GS.WorldMgr.GetRegion ( ushort  regionID) [static]

Fetch a Region by it's ID.

Parameters:
regionIDID to search
Returns:
Region or null if not found
static RegionEntry [] DOL.GS.WorldMgr.GetRegionList ( ) [static]

Creates an array of region entries.

Returns:
An array of regions available on the server
static GameTimer.TimeManager [] DOL.GS.WorldMgr.GetRegionTimeManagers ( ) [static]

Gets all region time managers.

Returns:
A copy of region time managers array
static StackTrace DOL.GS.WorldMgr.GetRelocateRegionsStacktrace ( ) [static]

Gets the RelocateRegions() thread stacktrace.

Returns:
static GameStaticItem [] DOL.GS.WorldMgr.GetStaticItemFromRegion ( ushort  regionID) [static]

Searches for all GameStaticItem from a specific region.

Parameters:
regionIDThe region to search
Returns:
All NPCs with the specified parameters
static Teleport DOL.GS.WorldMgr.GetTeleportLocation ( eRealm  realm,
String  teleportKey 
) [static]

Returns the teleport given an ID and a realm.

Parameters:
realmThe home realm identifier of the NPC doing the teleporting. Whether or not a teleport is permitted is determined by the home realm of the teleporter NPC, not the home realm of the player who is teleporting. A teleport will be allowed so long as the 'Realm' field in the 'teleport' table matches the 'Realm' field for the teleporter's record in the 'mob' table. For example, a Lurikeen teleporter with a 'mob' table entry that has the Realm field set to 3 (Hibernia), will happily teleport an Albion player to Jordheim so long as the Jordheim record in the 'teleport' table is also tagged as Realm 3. So, the Realm field in the 'teleport' table is not the realm of the destination, but the realm of the NPCs that are allowed to teleport a player to that location.
teleportKeyComposite key into teleport dictionary.
Returns:
static StackTrace DOL.GS.WorldMgr.GetWorldUpdateStacktrace ( ) [static]

Gets the world update thread stacktrace.

Returns:
static Zone DOL.GS.WorldMgr.GetZone ( ushort  zoneID) [static]

Gets a Zone object by it's ID.

Parameters:
zoneIDthe zoneID
Returns:
the zone object or null
static GameClient DOL.GS.WorldMgr.GuessClientByPlayerNameAndRealm ( string  playerName,
eRealm  realm,
bool  activeRequired,
out int  result 
) [static]

Guess a GameClient by first letters of Player's name Case-insensitive, make sure you use returned Player.Name instead of what player typed.

Parameters:
playerNameName to search
realmIDsearch in: 0=all realms or player.Realm
resultreturns: 1=no name found, 2=name is not unique, 3=exact match, 4=guessed name
activeRequired
Returns:
The found GameClient or null
static bool DOL.GS.WorldMgr.Init ( RegionData[]  regionsData) [static]

Initializes the WorldMgr. This function must be called before the WorldMgr can be used!

static string DOL.GS.WorldMgr.LoadTeleports ( ) [static]

Load available teleport locations.

static Region DOL.GS.WorldMgr.RegisterRegion ( GameTimer.TimeManager  time,
RegionData  data 
) [static]

Creates and adds a new region to the WorldMgr.

Parameters:
timeTime manager for the region
dataThe region data
Returns:
Registered region
static void DOL.GS.WorldMgr.RegisterZone ( ZoneData  zoneData,
ushort  zoneID,
ushort  regionID,
string  zoneName,
int  xpBonus,
int  rpBonus,
int  bpBonus,
int  coinBonus 
) [static]

Registers a Zone into a Region.

static void DOL.GS.WorldMgr.RemoveClient ( GameClient  entry) [static]

Removes a GameClient and free's it's ID again!

Parameters:
entryThe GameClient to be removed
static void DOL.GS.WorldMgr.RemoveInstance ( BaseInstance  instance) [static]

Removes the given instance from the server.

Parameters:
instance
static void DOL.GS.WorldMgr.RemoveSessionID ( int  id) [static]

Removes a GameClient based on it's ID.

Parameters:
idThe SessionID to free
static int DOL.GS.WorldMgr.SavePlayers ( ) [static]

Saves all players into the database.

Returns:
The count of players saved
static void DOL.GS.WorldMgr.StartDay ( uint  dayInc,
uint  dayStart 
) [static]

Starts a new day with a certain increment.

Parameters:
dayInc
dayStart
static bool DOL.GS.WorldMgr.StartRegionMgrs ( ) [static]

Starts all RegionMgrs inside the Regions.

Returns:
true
static void DOL.GS.WorldMgr.StopRegionMgrs ( ) [static]

Stops all Regionmgrs inside the Regions.


Member Data Documentation

const ushort DOL.GS.WorldMgr.DEATH_MESSAGE_DISTANCE = ushort.MaxValue

Is the distance a death message is broadcast when player dies.

Where do we start looking for an instance id from if none is requested?

Is the distance at which livings can give a item.

Is the distance info messages are broadcast (player attacks, spell cast, player stunned/rooted/mezzed, loot dropped)

Is the distance at which livings can interact.

Holds the distance which player get experience from a living object.

Holds the distance at which objects are updated.

const long DOL.GS.WorldMgr.PING_TIMEOUT = 360

Ping timeout definition in seconds.

Moving greater than this distance requires the player to do a full world refresh.

Is the distance a say is broadcast.

Is the distance an player can see.

Is the square distance a player can see.

Is the distance a whisper can be heard.

Is the distance a yell is broadcast.


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