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

Inheritance: Creature
ファイルを表示 Open project: aura-project/aura Class Usage Examples

Public Methods

Method Description
Aggro ( Creature target ) : void

Aggroes target, setting target and putting creature in battle stance.

CanTarget ( Creature creature ) : bool

Returns whether the NPC can target the given creature.

Dispose ( ) : void

Disposes AI.

GetFavor ( Creature other ) : int

Returns favor of the NPC towards the other creature.

GetMemory ( Creature other ) : int

Returns how well the NPC remembers the other creature.

GetNewNpcEntityId ( ) : long

Returns a new, unused entity id in the NPC range.

GetStress ( Creature other ) : int

Gets how much the other creature is stressing the NPC.

Kill ( Creature killer ) : void

Kills NPC, rewarding the killer.

ModifyFavor ( Creature other, int value ) : int

Modifies favor of the NPC towards the other creature.

ModifyMemory ( Creature other, int value ) : int

Sets how well the NPC remembers the other creature.

ModifyStress ( Creature other, int value ) : int

Modifies how much the other creature is stressing the NPC.

NPC ( ) : System.Collections.Generic

Creates new NPC

NPC ( ActorData actorData ) : System.Collections.Generic

Creates new NPC from actor data.

NPC ( int raceId ) : System.Collections.Generic

Creates new NPC and loads defaults for race.

SetFavor ( Creature other, int value ) : int

Sets favor of the NPC towards the other creature.

SetMemory ( Creature other, int value ) : int

Modifies how well the NPC remembers the other creature.

SetStress ( Creature other, int value ) : int

Sets how much the other creature is stressing the NPC.

Spawn ( int regionId, int x, int y ) : bool

Sets SpawnLocation and places NPC in region.

Warp ( int regionId, int x, int y ) : bool

Moves NPC to target location and adds it to the region. Returns false if region doesn't exist.

WarpFlash ( int regionId, int x, int y ) : bool

Like Warp, except it sends a screen flash and sound effect to the departing region and arriving region.

Ideal for NPCs like Tarlach. Be careful not to "double flash" if you're swapping two NPCs. Only ONE of the NPCs needs to use this method, the other can use the regular Warp.

Protected Methods

Method Description
ShouldSurvive ( float damage, Creature from, float lifeBefore ) : bool

NPCs may survive randomly.

http://wiki.mabinogiworld.com/view/Stats#Life More Will supposedly increases the chance. Unknown if this applies to players as well. Before certain Gs, NPCs weren't able to survive attacks under any circumstances.

Method Details

Aggro() public method

Aggroes target, setting target and putting creature in battle stance.
public Aggro ( Creature target ) : void
target Creature
return void

CanTarget() public method

Returns whether the NPC can target the given creature.
public CanTarget ( Creature creature ) : bool
creature Creature
return bool

Dispose() public method

Disposes AI.
public Dispose ( ) : void
return void

GetFavor() public method

Returns favor of the NPC towards the other creature.
public GetFavor ( Creature other ) : int
other Creature
return int

GetMemory() public method

Returns how well the NPC remembers the other creature.
public GetMemory ( Creature other ) : int
other Creature
return int

GetNewNpcEntityId() public static method

Returns a new, unused entity id in the NPC range.
public static GetNewNpcEntityId ( ) : long
return long

GetStress() public method

Gets how much the other creature is stressing the NPC.
public GetStress ( Creature other ) : int
other Creature
return int

Kill() public method

Kills NPC, rewarding the killer.
public Kill ( Creature killer ) : void
killer Creature
return void

ModifyFavor() public method

Modifies favor of the NPC towards the other creature.
public ModifyFavor ( Creature other, int value ) : int
other Creature
value int
return int

ModifyMemory() public method

Sets how well the NPC remembers the other creature.
public ModifyMemory ( Creature other, int value ) : int
other Creature
value int
return int

ModifyStress() public method

Modifies how much the other creature is stressing the NPC.
public ModifyStress ( Creature other, int value ) : int
other Creature
value int
return int

NPC() public method

Creates new NPC
public NPC ( ) : System.Collections.Generic
return System.Collections.Generic

NPC() public method

Creates new NPC from actor data.
public NPC ( ActorData actorData ) : System.Collections.Generic
actorData ActorData
return System.Collections.Generic

NPC() public method

Creates new NPC and loads defaults for race.
public NPC ( int raceId ) : System.Collections.Generic
raceId int
return System.Collections.Generic

SetFavor() public method

Sets favor of the NPC towards the other creature.
public SetFavor ( Creature other, int value ) : int
other Creature
value int
return int

SetMemory() public method

Modifies how well the NPC remembers the other creature.
public SetMemory ( Creature other, int value ) : int
other Creature
value int
return int

SetStress() public method

Sets how much the other creature is stressing the NPC.
public SetStress ( Creature other, int value ) : int
other Creature
value int
return int

ShouldSurvive() protected method

NPCs may survive randomly.
http://wiki.mabinogiworld.com/view/Stats#Life More Will supposedly increases the chance. Unknown if this applies to players as well. Before certain Gs, NPCs weren't able to survive attacks under any circumstances.
protected ShouldSurvive ( float damage, Creature from, float lifeBefore ) : bool
damage float
from Creature
lifeBefore float
return bool

Spawn() public method

Sets SpawnLocation and places NPC in region.
public Spawn ( int regionId, int x, int y ) : bool
regionId int
x int
y int
return bool

Warp() public method

Moves NPC to target location and adds it to the region. Returns false if region doesn't exist.
public Warp ( int regionId, int x, int y ) : bool
regionId int
x int
y int
return bool

WarpFlash() public method

Like Warp, except it sends a screen flash and sound effect to the departing region and arriving region.
Ideal for NPCs like Tarlach. Be careful not to "double flash" if you're swapping two NPCs. Only ONE of the NPCs needs to use this method, the other can use the regular Warp.
public WarpFlash ( int regionId, int x, int y ) : bool
regionId int
x int
y int
return bool