C# 클래스 Aura.Channel.World.Region

파일 보기 프로젝트 열기: aura-project/aura 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Limbo Region

보호된 프로퍼티들

프로퍼티 타입 설명
_clientEvents ClientEvent>.Dictionary
_clients HashSet
_creatures Creature>.Dictionary
_creaturesRWLS System.Threading.ReaderWriterLockSlim
_items Item>.Dictionary
_props Prop>.Dictionary

공개 메소드들

메소드 설명
ActivateAis ( Creature creature, Position from, Position to ) : void

Activates AIs in range of the movement path.

AddCreature ( Creature creature ) : void

Adds creature to region, sends EntityAppears.

AddItem ( Item item ) : void

Adds item, sends EntityAppears.

Use Item's Drop method to drop items in a region, unless you know what you're doing.

AddProp ( Prop prop ) : void

Spawns prop, sends EntityAppears.

Broadcast ( Aura.Shared.Network.Packet packet ) : void

Broadcasts packet in region.

Broadcast ( Aura.Shared.Network.Packet packet, Entity source, bool sendToSource = true, int range = -1 ) : void

Broadcasts packet to all creatures in range of source.

CountAggro ( Creature target ) : int

Returns amount of creatures of race that are targetting target in this region.

CountAggro ( Creature target, int raceId ) : int

Returns amount of creatures of race that are targetting target in this region.

CountPlayers ( ) : int

Returns amount of players in region.

CreatureExists ( long entityId ) : bool

Returns true if creature with given entity id exists.

GetAllGoodNpcs ( List &list ) : void

Adds all good NPCs of region to list.

GetAllItems ( ) : List

Returns a list of all items on the floor.

GetAllPlayers ( ) : List

Returns all player creatures in region.

GetAreaId ( int x, int y ) : int

Returns id of area at the given coordinates and adjusts it if region is dynamic, or 0 if area wasn't found.

GetClientEvent ( bool>.Func predicate ) : Aura.Channel.World.Entities.ClientEvent

Returns first event that matches the predicate.

GetClientEvent ( long eventId ) : Aura.Channel.World.Entities.ClientEvent

Returns event by id or null if it doesn't exist.

GetClientEvent ( string eventName ) : Aura.Channel.World.Entities.ClientEvent

Returns event by name or null if it doesn't exist.

GetClientEvents ( bool>.Func predicate ) : Aura.Channel.World.Entities.ClientEvent[]

Returns all events that matches the predicate.

GetCreature ( long entityId ) : Creature

Returns creature by entityId, or null, if it doesn't exist.

GetCreature ( string name ) : Creature

Returns creature by name, or null, if it doesn't exist.

GetCreatureSafe ( long entityId ) : Creature

Returns creature by entity id, throws SevereViolation exception if creature doesn't exist.

GetCreatures ( bool>.Func predicate ) : ICollection

Returns list of creatures that match predicate.

GetCreaturesInPolygon ( ) : List

Returns new list of all creatures within the specified polygon.

GetCreaturesInRange ( Position pos, int range ) : List

Returns new list of all creatures within range of position.

GetEntitiesInRange ( Entity source, int range = -1 ) : List

Returns new list of all entities within range of source.

GetItem ( bool>.Func predicate ) : Item

Returns first item that matches predicate, or null if none were found.

GetItem ( long entityId ) : Item

Returns item or null.

GetMatchingEvents ( string eventPath ) : List

Returns a list of events that start with the given path, e.g. "Uladh_main/field_Tir_S_aa/fish_tircho_stream_", to get all fishing events starting with that name.

GetNpc ( long entityId ) : NPC

Returns NPC by entityId, or null, if no NPC with that id exists.

GetNpcSafe ( long entityId ) : NPC

Returns NPC by entity id, throws SevereViolation exception if NPC doesn't exist.

GetNpcs ( bool>.Func predicate ) : ICollection

Returns list of creatures that match predicate.

GetPlayer ( string name ) : Aura.Channel.World.Entities.PlayerCreature

Returns first player creature with the given name, or null.

GetPlayersInRange ( Position pos, int range = VisibleRange ) : List

Returns all player creatures in range.

GetProp ( bool>.Func predicate ) : Prop

Returns first prop that matches the predicate, or null if no matching props were found.

GetProp ( long entityId ) : Prop

Returns prop or null.

GetProps ( bool>.Func predicate ) : IList

Returns list of all props that match the predicate.

GetVisibleCreaturesInRange ( Entity entity, int range = VisibleRange ) : ICollection

Returns all visible creatures in range of entity, excluding itself.

GetVisibleEntities ( Creature creature ) : List

Returns a list of visible entities, from the view point of creature.

IsOnStreet ( Position pos ) : bool

Returns true if given position is on the street.

OnPlayerEntered ( Creature creature, int prevRegionId ) : void
RemoveCreature ( Creature creature ) : void

Removes creature from region, sends EntityDisappears.

RemoveItem ( Item item ) : void

Despawns item, sends EntityDisappears.

RemoveProp ( Prop prop ) : void

Despawns prop, sends EntityDisappears.

RemoveScriptedEntities ( ) : void

Removes all scripted entites from this region.

UpdateEntities ( ) : void

Updates all entites, removing dead ones, updating visibility, etc.

보호된 메소드들

메소드 설명
InitializeFromData ( ) : void

Adds all props found in the client for this region and creates a list of areas.

LoadClientEvents ( ) : void

Adds all props found in the client for this region.

LoadProps ( ) : void

Adds all props found in the client for this region.

Region ( int regionId ) : System

Initializes class.

비공개 메소드들

메소드 설명
AddClientEvent ( Aura.Channel.World.Entities.ClientEvent clientEvent ) : void

Adds client event to region.

GetNewPropEntityId ( Prop prop ) : long

Generates entity id for prop.

RemoveOverdueEntities ( ) : void

Removes expired entities.

UpdateVisibility ( ) : void

Updates visible entities on all clients.

메소드 상세

ActivateAis() 공개 메소드

Activates AIs in range of the movement path.
public ActivateAis ( Creature creature, Position from, Position to ) : void
creature Aura.Channel.World.Entities.Creature
from Position
to Position
리턴 void

AddCreature() 공개 메소드

Adds creature to region, sends EntityAppears.
public AddCreature ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
리턴 void

AddItem() 공개 메소드

Adds item, sends EntityAppears.
Use Item's Drop method to drop items in a region, unless you know what you're doing.
public AddItem ( Item item ) : void
item Item
리턴 void

AddProp() 공개 메소드

Spawns prop, sends EntityAppears.
public AddProp ( Prop prop ) : void
prop Aura.Channel.World.Entities.Prop
리턴 void

Broadcast() 공개 메소드

Broadcasts packet in region.
public Broadcast ( Aura.Shared.Network.Packet packet ) : void
packet Aura.Shared.Network.Packet
리턴 void

Broadcast() 공개 메소드

Broadcasts packet to all creatures in range of source.
public Broadcast ( Aura.Shared.Network.Packet packet, Entity source, bool sendToSource = true, int range = -1 ) : void
packet Aura.Shared.Network.Packet
source Entity
sendToSource bool
range int
리턴 void

CountAggro() 공개 메소드

Returns amount of creatures of race that are targetting target in this region.
public CountAggro ( Creature target ) : int
target Aura.Channel.World.Entities.Creature
리턴 int

CountAggro() 공개 메소드

Returns amount of creatures of race that are targetting target in this region.
public CountAggro ( Creature target, int raceId ) : int
target Aura.Channel.World.Entities.Creature
raceId int
리턴 int

CountPlayers() 공개 메소드

Returns amount of players in region.
public CountPlayers ( ) : int
리턴 int

CreatureExists() 공개 메소드

Returns true if creature with given entity id exists.
public CreatureExists ( long entityId ) : bool
entityId long
리턴 bool

GetAllGoodNpcs() 공개 메소드

Adds all good NPCs of region to list.
public GetAllGoodNpcs ( List &list ) : void
list List
리턴 void

GetAllItems() 공개 메소드

Returns a list of all items on the floor.
public GetAllItems ( ) : List
리턴 List

GetAllPlayers() 공개 메소드

Returns all player creatures in region.
public GetAllPlayers ( ) : List
리턴 List

GetAreaId() 공개 메소드

Returns id of area at the given coordinates and adjusts it if region is dynamic, or 0 if area wasn't found.
public GetAreaId ( int x, int y ) : int
x int
y int
리턴 int

GetClientEvent() 공개 메소드

Returns first event that matches the predicate.
public GetClientEvent ( bool>.Func predicate ) : Aura.Channel.World.Entities.ClientEvent
predicate bool>.Func
리턴 Aura.Channel.World.Entities.ClientEvent

GetClientEvent() 공개 메소드

Returns event by id or null if it doesn't exist.
public GetClientEvent ( long eventId ) : Aura.Channel.World.Entities.ClientEvent
eventId long
리턴 Aura.Channel.World.Entities.ClientEvent

GetClientEvent() 공개 메소드

Returns event by name or null if it doesn't exist.
public GetClientEvent ( string eventName ) : Aura.Channel.World.Entities.ClientEvent
eventName string
리턴 Aura.Channel.World.Entities.ClientEvent

GetClientEvents() 공개 메소드

Returns all events that matches the predicate.
public GetClientEvents ( bool>.Func predicate ) : Aura.Channel.World.Entities.ClientEvent[]
predicate bool>.Func
리턴 Aura.Channel.World.Entities.ClientEvent[]

GetCreature() 공개 메소드

Returns creature by entityId, or null, if it doesn't exist.
public GetCreature ( long entityId ) : Creature
entityId long
리턴 Aura.Channel.World.Entities.Creature

GetCreature() 공개 메소드

Returns creature by name, or null, if it doesn't exist.
public GetCreature ( string name ) : Creature
name string
리턴 Aura.Channel.World.Entities.Creature

GetCreatureSafe() 공개 메소드

Returns creature by entity id, throws SevereViolation exception if creature doesn't exist.
public GetCreatureSafe ( long entityId ) : Creature
entityId long
리턴 Aura.Channel.World.Entities.Creature

GetCreatures() 공개 메소드

Returns list of creatures that match predicate.
public GetCreatures ( bool>.Func predicate ) : ICollection
predicate bool>.Func
리턴 ICollection

GetCreaturesInPolygon() 공개 메소드

Returns new list of all creatures within the specified polygon.
public GetCreaturesInPolygon ( ) : List
리턴 List

GetCreaturesInRange() 공개 메소드

Returns new list of all creatures within range of position.
public GetCreaturesInRange ( Position pos, int range ) : List
pos Position
range int
리턴 List

GetEntitiesInRange() 공개 메소드

Returns new list of all entities within range of source.
public GetEntitiesInRange ( Entity source, int range = -1 ) : List
source Entity
range int Leave at default for visible range.
리턴 List

GetItem() 공개 메소드

Returns first item that matches predicate, or null if none were found.
public GetItem ( bool>.Func predicate ) : Item
predicate bool>.Func
리턴 Item

GetItem() 공개 메소드

Returns item or null.
public GetItem ( long entityId ) : Item
entityId long
리턴 Item

GetMatchingEvents() 공개 메소드

Returns a list of events that start with the given path, e.g. "Uladh_main/field_Tir_S_aa/fish_tircho_stream_", to get all fishing events starting with that name.
public GetMatchingEvents ( string eventPath ) : List
eventPath string
리턴 List

GetNpc() 공개 메소드

Returns NPC by entityId, or null, if no NPC with that id exists.
public GetNpc ( long entityId ) : NPC
entityId long
리턴 Aura.Channel.World.Entities.NPC

GetNpcSafe() 공개 메소드

Returns NPC by entity id, throws SevereViolation exception if NPC doesn't exist.
public GetNpcSafe ( long entityId ) : NPC
entityId long
리턴 Aura.Channel.World.Entities.NPC

GetNpcs() 공개 메소드

Returns list of creatures that match predicate.
public GetNpcs ( bool>.Func predicate ) : ICollection
predicate bool>.Func
리턴 ICollection

GetPlayer() 공개 메소드

Returns first player creature with the given name, or null.
public GetPlayer ( string name ) : Aura.Channel.World.Entities.PlayerCreature
name string
리턴 Aura.Channel.World.Entities.PlayerCreature

GetPlayersInRange() 공개 메소드

Returns all player creatures in range.
public GetPlayersInRange ( Position pos, int range = VisibleRange ) : List
pos Position
range int
리턴 List

GetProp() 공개 메소드

Returns first prop that matches the predicate, or null if no matching props were found.
public GetProp ( bool>.Func predicate ) : Prop
predicate bool>.Func
리턴 Aura.Channel.World.Entities.Prop

GetProp() 공개 메소드

Returns prop or null.
public GetProp ( long entityId ) : Prop
entityId long
리턴 Aura.Channel.World.Entities.Prop

GetProps() 공개 메소드

Returns list of all props that match the predicate.
public GetProps ( bool>.Func predicate ) : IList
predicate bool>.Func
리턴 IList

GetVisibleCreaturesInRange() 공개 메소드

Returns all visible creatures in range of entity, excluding itself.
public GetVisibleCreaturesInRange ( Entity entity, int range = VisibleRange ) : ICollection
entity Entity
range int
리턴 ICollection

GetVisibleEntities() 공개 메소드

Returns a list of visible entities, from the view point of creature.
public GetVisibleEntities ( Creature creature ) : List
creature Aura.Channel.World.Entities.Creature
리턴 List

InitializeFromData() 보호된 메소드

Adds all props found in the client for this region and creates a list of areas.
protected InitializeFromData ( ) : void
리턴 void

IsOnStreet() 공개 메소드

Returns true if given position is on the street.
public IsOnStreet ( Position pos ) : bool
pos Position
리턴 bool

LoadClientEvents() 보호된 메소드

Adds all props found in the client for this region.
protected LoadClientEvents ( ) : void
리턴 void

LoadProps() 보호된 메소드

Adds all props found in the client for this region.
protected LoadProps ( ) : void
리턴 void

OnPlayerEntered() 공개 메소드

public OnPlayerEntered ( Creature creature, int prevRegionId ) : void
creature Aura.Channel.World.Entities.Creature
prevRegionId int
리턴 void

Region() 보호된 메소드

Initializes class.
protected Region ( int regionId ) : System
regionId int
리턴 System

RemoveCreature() 공개 메소드

Removes creature from region, sends EntityDisappears.
public RemoveCreature ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
리턴 void

RemoveItem() 공개 메소드

Despawns item, sends EntityDisappears.
public RemoveItem ( Item item ) : void
item Item
리턴 void

RemoveProp() 공개 메소드

Despawns prop, sends EntityDisappears.
public RemoveProp ( Prop prop ) : void
prop Aura.Channel.World.Entities.Prop
리턴 void

RemoveScriptedEntities() 공개 메소드

Removes all scripted entites from this region.
public RemoveScriptedEntities ( ) : void
리턴 void

UpdateEntities() 공개 메소드

Updates all entites, removing dead ones, updating visibility, etc.
public UpdateEntities ( ) : void
리턴 void

프로퍼티 상세

Limbo 공개적으로 정적으로 프로퍼티

public static Region,Aura.Channel.World Limbo
리턴 Region

_clientEvents 보호되어 있는 프로퍼티

protected Dictionary _clientEvents
리턴 ClientEvent>.Dictionary

_clients 보호되어 있는 프로퍼티

protected HashSet _clients
리턴 HashSet

_creatures 보호되어 있는 프로퍼티

protected Dictionary _creatures
리턴 Creature>.Dictionary

_creaturesRWLS 보호되어 있는 프로퍼티

protected ReaderWriterLockSlim,System.Threading _creaturesRWLS
리턴 System.Threading.ReaderWriterLockSlim

_items 보호되어 있는 프로퍼티

protected Dictionary _items
리턴 Item>.Dictionary

_props 보호되어 있는 프로퍼티

protected Dictionary _props
리턴 Prop>.Dictionary