L2JPREMIUM  5M
com.premium.game.model.world.L2World Class Reference

Public Member Functions

L2PetInstance addPet (int ownerId, L2PetInstance pet)
 
void addToAllPlayers (L2PcInstance cha)
 
void addVisibleObject (L2Object object, L2Character dropper)
 
synchronized void deleteVisibleNpcSpawns ()
 
L2Character findCharacter (int objectId)
 
L2Object findObject (int objectId)
 
boolean findObject (L2Object obj)
 
L2PcInstance findPlayer (int objectId)
 
Collection< L2PetInstancegetAllPets ()
 
Collection< L2PcInstancegetAllPlayers ()
 
int getAllPlayersCount ()
 
L2Object[] getAllVisibleObjects ()
 
final int getAllVisibleObjectsCount ()
 
L2WorldRegion[][] getAllWorldRegions ()
 
L2Object[] getObjectsInRadius (int x, int y, int radius)
 
L2PetInstance getPet (int ownerId)
 
L2PcInstance getPlayer (int objectId)
 
L2PcInstance getPlayer (String name)
 
L2WorldRegion getRegion (int x, int y)
 
L2WorldRegion getRegion (Point3D point)
 
void removeFromAllPlayers (L2PcInstance cha)
 
void removeObject (L2Object object)
 
void removeObjects (L2Object[] objects)
 
void removeObjects (List< L2Object > list)
 
void removePet (int ownerId)
 
void removePet (L2PetInstance pet)
 
void removeVisibleObject (L2Object object, L2WorldRegion oldRegion)
 
void storeObject (L2Object object)
 

Static Public Member Functions

static List< L2PcInstancegetAllGMs ()
 
static L2World getInstance ()
 
static L2Object[] getVisibleObjects (L2Object object, int radius)
 
static L2Object[] getVisibleObjects3D (L2Object object, int radius)
 
static L2Playable[] getVisiblePlayable (L2Object object)
 

Static Public Attributes

static final int SHIFT_BY = 12
 
static final int MAP_MIN_X = -131072
 
static final int MAP_MAX_X = 2286608
 
static final int MAP_MIN_Y = -262144
 
static final int MAP_MAX_Y = 262144
 
static final int SHIFT_BY_FOR_Z = 9
 
static final int OFFSET_X = Math.abs(MAP_MIN_X >> SHIFT_BY)
 
static final int OFFSET_Y = Math.abs(MAP_MIN_Y >> SHIFT_BY)
 
static final int REGIONS_X = (MAP_MAX_X >> SHIFT_BY) + OFFSET_X
 
static final int REGIONS_Y = (MAP_MAX_Y >> SHIFT_BY) + OFFSET_Y
 

Member Function Documentation

◆ deleteVisibleNpcSpawns()

synchronized void com.premium.game.model.world.L2World.deleteVisibleNpcSpawns ( )
inline

Deleted all spawns in the world.

◆ getAllPlayersCount()

int com.premium.game.model.world.L2World.getAllPlayersCount ( )
inline

Return how many players are online.

Returns
number of online players.

◆ getAllVisibleObjectsCount()

final int com.premium.game.model.world.L2World.getAllVisibleObjectsCount ( )
inline

Get the count of all visible objects in world.

Returns
count off all L2World objects

◆ getAllWorldRegions()

L2WorldRegion [][] com.premium.game.model.world.L2World.getAllWorldRegions ( )
inline

Returns the whole 2d array containing the world regions

Returns

◆ removeObject()

void com.premium.game.model.world.L2World.removeObject ( L2Object  object)
inline

Remove L2Object object from _objects of L2World.

Example of use :

Delete item from inventory, tranfer Item from inventory to warehouse Crystallize item Remove NPC/PC/Pet from the world

Parameters
objectL2Object to remove from _objects of L2World

◆ removeVisibleObject()

void com.premium.game.model.world.L2World.removeVisibleObject ( L2Object  object,
L2WorldRegion  oldRegion 
)
inline

Remove a L2Object from the world.

Concept :

L2Object (including L2PcInstance) are identified in _visibleObjects of his current L2WorldRegion and in _knownObjects of other surrounding L2Characters
L2PcInstance are identified in _players of L2World, in _players of his current L2WorldRegion and in _knownPlayer of other surrounding L2Characters

Actions :

Remove the L2Object object from _players* of L2World Remove the L2Object object from _visibleObjects and _players* of L2WorldRegion Remove the L2Object object from _gmList** of GmListTable Remove object from _knownObjects and _knownPlayer* of all surrounding L2WorldRegion L2Characters
If object is a L2Character, remove all L2Object from its _knownObjects and all L2PcInstance from its _knownPlayer

<FONT COLOR=#FF0000>> Caution : This method DOESN'T REMOVE the object from _objects of L2World</FONT>

* only if object is a L2PcInstance
** only if object is a GM L2PcInstance

Example of use :

Pickup an Item Decay a L2Character

Parameters
objectL2object to remove from the world
oldRegionL2WorldRegion in wich the object was before removing

Member Data Documentation

◆ MAP_MIN_X

final int com.premium.game.model.world.L2World.MAP_MIN_X = -131072
static

Map dimensions

◆ REGIONS_X

final int com.premium.game.model.world.L2World.REGIONS_X = (MAP_MAX_X >> SHIFT_BY) + OFFSET_X
static

number of regions


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