C# Class Aura.Channel.World.Entities.Prop

Not all options are used in all props. Things like ExtraData, State, etc. are all very prop specific.
Inheritance: Entity
Exibir arquivo Open project: aura-project/aura Class Usage Examples

Public Properties

Property Type Description
Data PropsDbData
Info Aura.Shared.Mabi.Structs.PropInfo
_resource float

Public Methods

Method Description
Disappear ( ) : void

Removes prop from its current region.

GetDropBehavior ( int dropType ) : PropFunc

Returns prop behavior for dropping.

GetEmptyBehavior ( ) : PropFunc

Returns a prop behavior that doesn't do anything.

Use to prevent unimplemented messages.

GetPosition ( ) : Position

Returns prop's static position (Info.X|Y).

GetTargetableCreaturesInRange ( Creature owner, int range ) : ICollection

Returns targetable creatures in given range of prop. Owner of the prop and creatures he can't target are excluded.

GetWarpBehavior ( int region, int x, int y ) : PropFunc

Returns prop behavior for warping.

HasTag ( string tag ) : bool

Returns true if prop's data has the tag.

IsInside ( int x, int y ) : bool

Returns true if the given position is inside the prop.

Prop ( PropData propData, int regionId, string regionName, string areaName ) : System

Creates new prop, based on prop data.

Prop ( int id, int regionId, int x, int y, float direction, float scale = 1f, float altitude, string state = "", string ident = "", string title = "" ) : System

Creates new prop with no specific entity id.

The entity id is assigned automatically when the prop is added to a region, as the id depends on the prop's location and the region it's eventually added to. If the entity id is not supposed to be set upon adding the prop to a region, it should be set to anything but 0.

Prop ( long entityId, int id, int regionId, int x, int y, float direction, float scale, float altitude, string state, string ident, string title ) : System

Creates new prop with given entity id.

SetState ( string state ) : void

Sets prop's state and broadcasts update.

ToString ( ) : string

Returns information about the prop as string.

UpdateShapes ( ) : void

Updates shapes for current state from defaults db.

Private Methods

Method Description
UpdateCollisions ( ) : void

Updates prop's shapes and collisions in current region.

Method Details

Disappear() public method

Removes prop from its current region.
public Disappear ( ) : void
return void

GetDropBehavior() public static method

Returns prop behavior for dropping.
public static GetDropBehavior ( int dropType ) : PropFunc
dropType int
return PropFunc

GetEmptyBehavior() public static method

Returns a prop behavior that doesn't do anything.
Use to prevent unimplemented messages.
public static GetEmptyBehavior ( ) : PropFunc
return PropFunc

GetPosition() public method

Returns prop's static position (Info.X|Y).
public GetPosition ( ) : Position
return Position

GetTargetableCreaturesInRange() public method

Returns targetable creatures in given range of prop. Owner of the prop and creatures he can't target are excluded.
public GetTargetableCreaturesInRange ( Creature owner, int range ) : ICollection
owner Creature Owner of the prop, who is excluded and used as reference for CanTarget (null to ignore).
range int
return ICollection

GetWarpBehavior() public static method

Returns prop behavior for warping.
public static GetWarpBehavior ( int region, int x, int y ) : PropFunc
region int
x int
y int
return PropFunc

HasTag() public method

Returns true if prop's data has the tag.
public HasTag ( string tag ) : bool
tag string
return bool

IsInside() public method

Returns true if the given position is inside the prop.
public IsInside ( int x, int y ) : bool
x int
y int
return bool

Prop() public method

Creates new prop, based on prop data.
public Prop ( PropData propData, int regionId, string regionName, string areaName ) : System
propData PropData
regionId int
regionName string
areaName string
return System

Prop() public method

Creates new prop with no specific entity id.
The entity id is assigned automatically when the prop is added to a region, as the id depends on the prop's location and the region it's eventually added to. If the entity id is not supposed to be set upon adding the prop to a region, it should be set to anything but 0.
public Prop ( int id, int regionId, int x, int y, float direction, float scale = 1f, float altitude, string state = "", string ident = "", string title = "" ) : System
id int
regionId int
x int
y int
direction float
scale float
altitude float
state string
ident string
title string
return System

Prop() public method

Creates new prop with given entity id.
public Prop ( long entityId, int id, int regionId, int x, int y, float direction, float scale, float altitude, string state, string ident, string title ) : System
entityId long
id int
regionId int
x int
y int
direction float
scale float
altitude float
state string
ident string
title string
return System

SetState() public method

Sets prop's state and broadcasts update.
public SetState ( string state ) : void
state string
return void

ToString() public method

Returns information about the prop as string.
public ToString ( ) : string
return string

UpdateShapes() public method

Updates shapes for current state from defaults db.
public UpdateShapes ( ) : void
return void

Property Details

Data public_oe property

Data about the prop from the db.
public PropsDbData Data
return PropsDbData

Info public_oe property

Marshable prop information used for packets.
public PropInfo,Aura.Shared.Mabi.Structs Info
return Aura.Shared.Mabi.Structs.PropInfo

_resource public_oe property

public float _resource
return float