C# 클래스 Aura.Channel.World.Entities.Creature

Base class for all "creaturly" entities.
상속: Entity, IDisposable
파일 보기 프로젝트 열기: aura-project/aura 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
_hitTrackerIds long
_hitTrackers HitTracker>.Dictionary
_totalHits int

보호된 프로퍼티들

프로퍼티 타입 설명
_battleStance bool

공개 메소드들

메소드 설명
AcquireItem ( Item item ) : void

Adds item to creature's inventory and shows an acquire window.

Activate ( CreatureStates state ) : void
Activate ( CreatureStatesEx state ) : void
AgeUp ( short years ) : void

Increases age by years and sends update packets.

Aggro ( Creature target ) : void

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

AttackRangeFor ( Creature target ) : int

Returns the max distance the creature can have to attack.

This might not be the 100% accurate formula, but it should be good enough to work with for now.

Bless ( ) : void

Blesses given items and updates client.

BlessAll ( ) : void

Blesses all main equip items and updates client.

BurnMana ( float amount = 100 ) : void

Removes the given percentage of the creature's mana and updates client.

CalculateElementalDamageMultiplier ( Creature target ) : float

Calculates the creature's elemental damage modifier, against the target's elements.

CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, Creature target ) : float

Calculates the elemental damage modifier, based on the given affinities, against target.

CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, int targetLightning, int targetFire, int targetIce ) : float

Calculates the elemental damage modifier, between the "my" and the "target" affinities.

Since nobody seems to know the exact way elementals work, this function is mostly based on guess. First, all elementals are stacked against each other. If you have 1 affinity for an element that the enemy has as well, you lose 11.1% damage. Afterwards, you gain 11.1% for each very effective combination, and 3.7% for each slightly effective combination. The basic idea is that the same elements cancel each other out, while Fire and Ice are very, and Ice and Lightning are slightly effective against each other, as is hinted at in the in-game book "Understanding Elementals". The book also mentions that Fire and Lightning don't affect each other. The acual values, 11.1 and 3.7 (11.1 / 3) are based on the max affinity number 9, 11.1 * 9 being 99.9, and findings of the community, stating the need for at least 3 affinity for a noticible effect.

Can ( System.Collections.Generic.Locks locks ) : bool

Returns true if given lock isn't activated.

CanPickUp ( Item item ) : bool

Returns whether creature is allowed to pick up the given item from the ground.

CanTarget ( Creature creature ) : bool

Returns true if creature is able to attack this creature.

Deactivate ( CreatureStates state ) : void
Deactivate ( CreatureStatesEx state ) : void
Disappear ( ) : void

Disposes creature and removes it from its current region.

Dispose ( ) : void

Called when creature is removed from the server. (Killed NPC, disconnect, etc)

FullHeal ( ) : void

Heals all life, mana, stamina, hunger, and wounds and updates client.

FullLifeHeal ( ) : void

Fully heals life and updates client.

GetActualCreature ( ) : Creature

If this creature is an RP character, it returns the player's character behind the RP character, if not it just returns itself.

Use in cases where you want to execute an action on the actual player character, but you don't know if you're working with an RP character or not. For example, maybe you want to give a player a quest item at the end of the dungeon, but the dungeon can be played as RP or non-RP. Using just the creature would give it to the RP character, with the player never getting it.

GetAdjustedManaCost ( float baseVal ) : float

Returns given Mana cost adjusted for this creature, factoring in bonuses and modifications.

GetAllHitters ( ) : List

Returns all creatures that have hit this creature and are still in the same region.

GetChainCastLevel ( SkillId skillId ) : int

Returns the chain cast level the creature can use for the given skill.

Checks passive monster skill and upgrades of equipped weapons.

GetDestination ( ) : Position

Returns current destination.

GetHitTracker ( long entityId ) : HitTracker

Returns the tracker for the creature with the given id, or null if it doesn't exist.

GetLeftCritChance ( float protection ) : float

Calculates left hand crit chance, taking stat bonuses and given protection into consideration. Capped at 0~30.

GetPosition ( ) : Position

Returns current position.

GetPowerRating ( Creature compareCreature ) : PowerRating

Returns the power rating (Weak, Boss, etc) of compareCreature towards creature.

GetProductionPartyBonus ( Skill skill ) : float

Returns party production bonus for the given skill if creature is in a party.

http://wiki.mabinogiworld.com/view/Party#Production_Bonus

GetProductionSuccessChance ( Skill skill, ProductionCategory category, int baseChance, int rainBonus ) : float

Calculates and returns general production skill success chance.

Unofficial, but seems to work fine in most cases. Dex bonus: http://mabination.com/threads/57123-Chaos-Life-Skill-Guide-Refining

GetRestPose ( ) : byte

Returns Rest pose based on skill's rank.

GetRightCritChance ( float protection ) : float

Calculates right (or bare) hand crit chance, taking stat bonuses and given protection into consideration. Capped at 0~30.

GetRndBalance ( int baseBalance ) : int

Calculates random balance with given base balance, adding the dex bonus along the way.

GetRndLeftHandDamage ( ) : float

Calculates random damage for the left hand (off-hand).

Uses bare hand damage if creature has 0 stamina.

GetRndMagicBalance ( int baseBalance = BaseMagicBalance ) : int

Calculates random magic balance (0.0~1.0).

GetRndMagicDamage ( Skill skill, float baseMin, float baseMax ) : float

Calculates random base Magic damage for skill, using the given values.

http://wiki.mabinogiworld.com/view/Stats#Magic_Damage

GetRndRangedDamage ( ) : float

Returns random base damage for a ranged attack, e.g. Ranged Attack or Magnum Shot, based on race, weapon, etc.

GetRndRightHandDamage ( ) : float

Calculates random damage for the right hand (default).

Method is used for bare hand attacks as well, if right hand is empty, use bare hand attack values. Uses bare hand damage if creature has 0 stamina.

GetRndTotalDamage ( ) : float

Calculates the damage of left-and-right slots together

GetSpeed ( ) : float

Returns current movement speed (x/s).

GetSplashAngle ( Item item ) : float

Returns creature's splash angle, based on given weapon.

GetSplashDamage ( Item item ) : float

Returns creature's splash damage, based on given weapon.

GetSplashRadius ( Item item ) : float

Returns creature's splash radius, based on given weapon.

GetTargetableCreaturesAround ( Position position, int range, TargetableOptions options = TargetableOptions.None ) : ICollection

Returns targetable creatures in given range around position. Optionally factors in attack range.

GetTargetableCreaturesInCone ( Position position, Position targetPosition, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection

Returns targetable creatures in cone, based on the given parameters, with direction of cone being based on the given positions.

GetTargetableCreaturesInCone ( Position targetPosition, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection

Returns targetable creatures in cone, based on the given parameters, with direction of cone being based on the creature's and the target's position.

GetTargetableCreaturesInCone ( Position position, float direction, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection

Returns targetable creatures in cone, based on the given parameters.

GetTargetableCreaturesInRange ( int range, TargetableOptions options = TargetableOptions.None ) : ICollection

Returns targetable creatures in given range around creature.

GetTopDamageDealer ( ) : HitTracker

Returns the tracker for the creature that did the most damage.

GetTopHitter ( ) : HitTracker

Returns the tracker for the creature that did the most hits.

GetTotalCritChance ( float protection ) : float

Calculates total crit chance, taking stat bonuses and given protection and bonus into consideration. Capped at 0~30.

GetTotalCritChance ( float protection, bool magic ) : float

Calculates total crit chance, taking stat bonuses and given protection and bonus into consideration. Capped at 0~30.

GetTotalHits ( ) : int

Returns the total number of hits the creature took.

GetTotalSplashAngle ( ) : float

Returns creature's splash angle, based on equipment.

GetTotalSplashDamage ( ) : float

Returns creature's splash damage, based on equipment.

GetTotalSplashRadius ( ) : float

Returns creature's splash radius, based on equipment.

GiveAp ( int amount ) : void

Increases AP and updates client.

GiveExp ( long val ) : void

Increases exp and levels up creature if appropriate.

GiveItem ( Item item ) : bool

Adds item to creature's inventory.

GiveItem ( int itemId, int amount = 1 ) : bool

Adds item to creature's inventory.

GiveItemWithEffect ( Item item ) : void

Adds item to creature's inventory and shows it above head.

HandleInquiry ( byte id ) : void

Calls inquiry callback for id if there is one.

Has ( CreatureStates state ) : bool
HasTag ( string tag ) : bool

Returns true if creature's race data has the tag.

Inquiry ( Action callback, string format ) : void

Sends a msg box to creature's client, asking a question. The callback is executed if the box is answered with OK.

Is ( RaceStands stand ) : bool
Jump ( Position position ) : void

Warps creature to given coordinates in its current region.

Jump ( int x, int y ) : void

Warps creature to given coordinates in its current region.

Kill ( Creature killer ) : void

Kills creature.

LoadDefault ( ) : void

Loads race and handles some basic stuff, like adding regens.

Has to be called before anything is actually done with the creature, as it initializes the race data, the inventory, and other vital parts.

Lock ( Locks locks, bool updateClient = false ) : Locks

Activates given Locks for creature.

Some locks are lifted automatically on Warp, SkillComplete, and SkillCancel. Only sending the locks when they actually changed can cause problems, e.g. if a lock is removed during a cutscene (skill running out) the unlock after the cutscene isn't sent. The client actually has counted locks, unlike us atm. Implementing those will fix the problem. TODO.

ModifyLife ( float amount ) : void

Changes life and sends stat update.

Move ( Position destination, bool walking ) : void

Starts movement from current position to destination. Sends Running|Walking.

OnMabiTick ( ErinnTime time ) : void

Called every 5 minutes, checks changes through food.

RemoveFromRegion ( ) : void

Removes creature from its current region.

RemoveItem ( int itemId, int amount = 1 ) : void

Removes items with the given id from the creature's inventory.

ResetPosition ( Position pos ) : void

Stops movement and resets creature to the given position.

Revive ( ReviveOptions option ) : void

Revives creature.

SetLocation ( Location loc ) : void

Sets RegionId and position.

SetLocation ( int region, int x, int y ) : void

Sets RegionId and position.

SetLocationNear ( Entity entity, int range ) : void

Sets region, x, and y, to be near entity. Also randomizes direction.

SetPosition ( int x, int y ) : Position

Sets position and destination.

Shove ( Creature target, int distance ) : Position

Sets new position for target, based on attacker's position and the distance, takes collision into consideration.

StopMove ( ) : Position

Stops movement, returning new current position. Sends Force(Walk|Run)To.

TakeDamage ( float damage, Creature from ) : void

Applies damage to Life, kills creature if necessary.

TalkToNpc ( string npcName, string npcNameLocal = null ) : bool

Starts dialog with NPC, returns false if NPC couldn't be found.

TurnTo ( Position pos ) : void

Turns creature in direction of position.

TurnTo ( float x, float y ) : void

Turns creature in given direction.

Unlock ( Locks locks, bool updateClient = false ) : Locks

Deactivates given Locks for creature.

Unlocking movement on the client apparently resets skill stuns.

Warp ( Location loc ) : bool

Warps creature to target location, returns false if warp is unsuccessful.

Warp ( int regionId, Position position ) : bool

Warps creature to target location, returns false if warp is unsuccessful.

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

Warps creature to target location, returns false if warp is unsuccessful.

Warp ( string locationPath ) : bool

Warps creature to target location path, returns false if warp is unsuccessful.

Parses location paths like Uladh_main/SomeArea/SomeEvent and calls Warp with the resulting values.

보호된 메소드들

메소드 설명
Creature ( ) : System
GetRndDamage ( float min, float max, int balance ) : float

Calculates random damage with the given min/max and balance values. Adds attack mods and stat bonuses automatically and randomizes the balance.

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

Returns true if creature should go into deadly by the attack.

비공개 메소드들

메소드 설명
DropGold ( Creature killer, Random rnd, Position pos ) : void

Drops creature's gold.

DropItems ( Creature killer, Random rnd, Position pos ) : void

Drops creature's drop items.

DropItems ( Creature killer, Random rnd, Position pos, IEnumerable dataCollection ) : void

Handles dropping of items in given collection.

EquipmentDecay ( ) : void

Called regularly to reduce equipments durability and give proficiency to armors.

http://wiki.mabinogiworld.com/view/Durability#Per_Tick http://wiki.mabinogiworld.com/view/Proficiency The dura loss actually doesn't seem to be fixed, I've logged varying values on NA. However, *most* of the time the values below are used.

GetCritChance ( float baseCritical, float protection ) : float

Adds stat bonuses to base and calculates crit chance, taking protection into consideration. Capped at 0~30.

OnPlayTimeTick ( ErinnTime now ) : void

Called every 9 minutes, increases play points.

OnSecondsTimeTick ( ErinnTime time ) : void

Called once per second, running updates on different creature components.

UpdateBody ( ) : void

Called regularly to update body, based on what the creature ate.

메소드 상세

AcquireItem() 공개 메소드

Adds item to creature's inventory and shows an acquire window.
public AcquireItem ( Item item ) : void
item Item
리턴 void

Activate() 공개 메소드

public Activate ( CreatureStates state ) : void
state CreatureStates
리턴 void

Activate() 공개 메소드

public Activate ( CreatureStatesEx state ) : void
state CreatureStatesEx
리턴 void

AgeUp() 공개 메소드

Increases age by years and sends update packets.
public AgeUp ( short years ) : void
years short
리턴 void

Aggro() 공개 추상적인 메소드

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

AttackRangeFor() 공개 메소드

Returns the max distance the creature can have to attack.
This might not be the 100% accurate formula, but it should be good enough to work with for now.
public AttackRangeFor ( Creature target ) : int
target Creature
리턴 int

Bless() 공개 메소드

Blesses given items and updates client.
public Bless ( ) : void
리턴 void

BlessAll() 공개 메소드

Blesses all main equip items and updates client.
public BlessAll ( ) : void
리턴 void

BurnMana() 공개 메소드

Removes the given percentage of the creature's mana and updates client.
public BurnMana ( float amount = 100 ) : void
amount float
리턴 void

CalculateElementalDamageMultiplier() 공개 메소드

Calculates the creature's elemental damage modifier, against the target's elements.
public CalculateElementalDamageMultiplier ( Creature target ) : float
target Creature
리턴 float

CalculateElementalDamageMultiplier() 공개 메소드

Calculates the elemental damage modifier, based on the given affinities, against target.
public CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, Creature target ) : float
myLightning int
myFire int
myIce int
target Creature
리턴 float

CalculateElementalDamageMultiplier() 공개 메소드

Calculates the elemental damage modifier, between the "my" and the "target" affinities.
Since nobody seems to know the exact way elementals work, this function is mostly based on guess. First, all elementals are stacked against each other. If you have 1 affinity for an element that the enemy has as well, you lose 11.1% damage. Afterwards, you gain 11.1% for each very effective combination, and 3.7% for each slightly effective combination. The basic idea is that the same elements cancel each other out, while Fire and Ice are very, and Ice and Lightning are slightly effective against each other, as is hinted at in the in-game book "Understanding Elementals". The book also mentions that Fire and Lightning don't affect each other. The acual values, 11.1 and 3.7 (11.1 / 3) are based on the max affinity number 9, 11.1 * 9 being 99.9, and findings of the community, stating the need for at least 3 affinity for a noticible effect.
public CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, int targetLightning, int targetFire, int targetIce ) : float
myLightning int
myFire int
myIce int
targetLightning int
targetFire int
targetIce int
리턴 float

Can() 공개 메소드

Returns true if given lock isn't activated.
public Can ( System.Collections.Generic.Locks locks ) : bool
locks System.Collections.Generic.Locks
리턴 bool

CanPickUp() 공개 메소드

Returns whether creature is allowed to pick up the given item from the ground.
public CanPickUp ( Item item ) : bool
item Item
리턴 bool

CanTarget() 공개 메소드

Returns true if creature is able to attack this creature.
public CanTarget ( Creature creature ) : bool
creature Creature
리턴 bool

Creature() 보호된 메소드

protected Creature ( ) : System
리턴 System

Deactivate() 공개 메소드

public Deactivate ( CreatureStates state ) : void
state CreatureStates
리턴 void

Deactivate() 공개 메소드

public Deactivate ( CreatureStatesEx state ) : void
state CreatureStatesEx
리턴 void

Disappear() 공개 메소드

Disposes creature and removes it from its current region.
public Disappear ( ) : void
리턴 void

Dispose() 공개 메소드

Called when creature is removed from the server. (Killed NPC, disconnect, etc)
public Dispose ( ) : void
리턴 void

FullHeal() 공개 메소드

Heals all life, mana, stamina, hunger, and wounds and updates client.
public FullHeal ( ) : void
리턴 void

FullLifeHeal() 공개 메소드

Fully heals life and updates client.
public FullLifeHeal ( ) : void
리턴 void

GetActualCreature() 공개 메소드

If this creature is an RP character, it returns the player's character behind the RP character, if not it just returns itself.
Use in cases where you want to execute an action on the actual player character, but you don't know if you're working with an RP character or not. For example, maybe you want to give a player a quest item at the end of the dungeon, but the dungeon can be played as RP or non-RP. Using just the creature would give it to the RP character, with the player never getting it.
public GetActualCreature ( ) : Creature
리턴 Creature

GetAdjustedManaCost() 공개 메소드

Returns given Mana cost adjusted for this creature, factoring in bonuses and modifications.
public GetAdjustedManaCost ( float baseVal ) : float
baseVal float
리턴 float

GetAllHitters() 공개 메소드

Returns all creatures that have hit this creature and are still in the same region.
public GetAllHitters ( ) : List
리턴 List

GetChainCastLevel() 공개 메소드

Returns the chain cast level the creature can use for the given skill.
Checks passive monster skill and upgrades of equipped weapons.
public GetChainCastLevel ( SkillId skillId ) : int
skillId SkillId
리턴 int

GetDestination() 공개 메소드

Returns current destination.
public GetDestination ( ) : Position
리턴 Position

GetHitTracker() 공개 메소드

Returns the tracker for the creature with the given id, or null if it doesn't exist.
public GetHitTracker ( long entityId ) : HitTracker
entityId long
리턴 HitTracker

GetLeftCritChance() 공개 메소드

Calculates left hand crit chance, taking stat bonuses and given protection into consideration. Capped at 0~30.
public GetLeftCritChance ( float protection ) : float
protection float
리턴 float

GetPosition() 공개 메소드

Returns current position.
public GetPosition ( ) : Position
리턴 Position

GetPowerRating() 공개 메소드

Returns the power rating (Weak, Boss, etc) of compareCreature towards creature.
public GetPowerRating ( Creature compareCreature ) : PowerRating
compareCreature Creature Creature to compare to
리턴 PowerRating

GetProductionPartyBonus() 공개 메소드

Returns party production bonus for the given skill if creature is in a party.
http://wiki.mabinogiworld.com/view/Party#Production_Bonus
public GetProductionPartyBonus ( Skill skill ) : float
skill Skill
리턴 float

GetProductionSuccessChance() 공개 메소드

Calculates and returns general production skill success chance.
Unofficial, but seems to work fine in most cases. Dex bonus: http://mabination.com/threads/57123-Chaos-Life-Skill-Guide-Refining
public GetProductionSuccessChance ( Skill skill, ProductionCategory category, int baseChance, int rainBonus ) : float
skill Skill
category ProductionCategory
baseChance int
rainBonus int
리턴 float

GetRestPose() 공개 메소드

Returns Rest pose based on skill's rank.
public GetRestPose ( ) : byte
리턴 byte

GetRightCritChance() 공개 메소드

Calculates right (or bare) hand crit chance, taking stat bonuses and given protection into consideration. Capped at 0~30.
public GetRightCritChance ( float protection ) : float
protection float
리턴 float

GetRndBalance() 공개 메소드

Calculates random balance with given base balance, adding the dex bonus along the way.
public GetRndBalance ( int baseBalance ) : int
baseBalance int
리턴 int

GetRndDamage() 보호된 메소드

Calculates random damage with the given min/max and balance values. Adds attack mods and stat bonuses automatically and randomizes the balance.
protected GetRndDamage ( float min, float max, int balance ) : float
min float
max float
balance int
리턴 float

GetRndLeftHandDamage() 공개 메소드

Calculates random damage for the left hand (off-hand).
Uses bare hand damage if creature has 0 stamina.
public GetRndLeftHandDamage ( ) : float
리턴 float

GetRndMagicBalance() 공개 메소드

Calculates random magic balance (0.0~1.0).
public GetRndMagicBalance ( int baseBalance = BaseMagicBalance ) : int
baseBalance int
리턴 int

GetRndMagicDamage() 공개 메소드

Calculates random base Magic damage for skill, using the given values.
http://wiki.mabinogiworld.com/view/Stats#Magic_Damage
public GetRndMagicDamage ( Skill skill, float baseMin, float baseMax ) : float
skill Skill
baseMin float
baseMax float
리턴 float

GetRndRangedDamage() 공개 메소드

Returns random base damage for a ranged attack, e.g. Ranged Attack or Magnum Shot, based on race, weapon, etc.
public GetRndRangedDamage ( ) : float
리턴 float

GetRndRightHandDamage() 공개 메소드

Calculates random damage for the right hand (default).
Method is used for bare hand attacks as well, if right hand is empty, use bare hand attack values. Uses bare hand damage if creature has 0 stamina.
public GetRndRightHandDamage ( ) : float
리턴 float

GetRndTotalDamage() 공개 메소드

Calculates the damage of left-and-right slots together
public GetRndTotalDamage ( ) : float
리턴 float

GetSpeed() 공개 메소드

Returns current movement speed (x/s).
public GetSpeed ( ) : float
리턴 float

GetSplashAngle() 공개 메소드

Returns creature's splash angle, based on given weapon.
public GetSplashAngle ( Item item ) : float
item Item
리턴 float

GetSplashDamage() 공개 메소드

Returns creature's splash damage, based on given weapon.
public GetSplashDamage ( Item item ) : float
item Item
리턴 float

GetSplashRadius() 공개 메소드

Returns creature's splash radius, based on given weapon.
public GetSplashRadius ( Item item ) : float
item Item
리턴 float

GetTargetableCreaturesAround() 공개 메소드

Returns targetable creatures in given range around position. Optionally factors in attack range.
public GetTargetableCreaturesAround ( Position position, int range, TargetableOptions options = TargetableOptions.None ) : ICollection
position Position Reference position.
range int Radius around position.
options TargetableOptions Options to change the result.
리턴 ICollection

GetTargetableCreaturesInCone() 공개 메소드

Returns targetable creatures in cone, based on the given parameters, with direction of cone being based on the given positions.
public GetTargetableCreaturesInCone ( Position position, Position targetPosition, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection
position Position Pointy end of the cone.
targetPosition Position Target's position, used as reference for the direction of the cone.
radius float Cone's radius.
angle float Cone's angle in degree.
options TargetableOptions Options to change the result.
리턴 ICollection

GetTargetableCreaturesInCone() 공개 메소드

Returns targetable creatures in cone, based on the given parameters, with direction of cone being based on the creature's and the target's position.
public GetTargetableCreaturesInCone ( Position targetPosition, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection
targetPosition Position Target's position, used as reference for the direction of the cone.
radius float Cone's radius.
angle float Cone's angle in degree.
options TargetableOptions Options to change the result.
리턴 ICollection

GetTargetableCreaturesInCone() 공개 메소드

Returns targetable creatures in cone, based on the given parameters.
public GetTargetableCreaturesInCone ( Position position, float direction, float radius, float angle, TargetableOptions options = TargetableOptions.None ) : ICollection
position Position Pointy end of the cone.
direction float Cone's direction as radian.
radius float Cone's radius.
angle float Cone's angle in degree.
options TargetableOptions Options to change the result.
리턴 ICollection

GetTargetableCreaturesInRange() 공개 메소드

Returns targetable creatures in given range around creature.
public GetTargetableCreaturesInRange ( int range, TargetableOptions options = TargetableOptions.None ) : ICollection
range int Radius around position.
options TargetableOptions Options to change the result.
리턴 ICollection

GetTopDamageDealer() 공개 메소드

Returns the tracker for the creature that did the most damage.
public GetTopDamageDealer ( ) : HitTracker
리턴 HitTracker

GetTopHitter() 공개 메소드

Returns the tracker for the creature that did the most hits.
public GetTopHitter ( ) : HitTracker
리턴 HitTracker

GetTotalCritChance() 공개 메소드

Calculates total crit chance, taking stat bonuses and given protection and bonus into consideration. Capped at 0~30.
public GetTotalCritChance ( float protection ) : float
protection float Protection to subtract from crit.
리턴 float

GetTotalCritChance() 공개 메소드

Calculates total crit chance, taking stat bonuses and given protection and bonus into consideration. Capped at 0~30.
public GetTotalCritChance ( float protection, bool magic ) : float
protection float Protection to subtract from crit.
magic bool If true, weapon crit bonuses only apply if weapon is a wand.
리턴 float

GetTotalHits() 공개 메소드

Returns the total number of hits the creature took.
public GetTotalHits ( ) : int
리턴 int

GetTotalSplashAngle() 공개 메소드

Returns creature's splash angle, based on equipment.
public GetTotalSplashAngle ( ) : float
리턴 float

GetTotalSplashDamage() 공개 메소드

Returns creature's splash damage, based on equipment.
public GetTotalSplashDamage ( ) : float
리턴 float

GetTotalSplashRadius() 공개 메소드

Returns creature's splash radius, based on equipment.
public GetTotalSplashRadius ( ) : float
리턴 float

GiveAp() 공개 메소드

Increases AP and updates client.
public GiveAp ( int amount ) : void
amount int
리턴 void

GiveExp() 공개 메소드

Increases exp and levels up creature if appropriate.
public GiveExp ( long val ) : void
val long
리턴 void

GiveItem() 공개 메소드

Adds item to creature's inventory.
public GiveItem ( Item item ) : bool
item Item
리턴 bool

GiveItem() 공개 메소드

Adds item to creature's inventory.
public GiveItem ( int itemId, int amount = 1 ) : bool
itemId int
amount int
리턴 bool

GiveItemWithEffect() 공개 메소드

Adds item to creature's inventory and shows it above head.
public GiveItemWithEffect ( Item item ) : void
item Item
리턴 void

HandleInquiry() 공개 메소드

Calls inquiry callback for id if there is one.
public HandleInquiry ( byte id ) : void
id byte
리턴 void

Has() 공개 메소드

public Has ( CreatureStates state ) : bool
state CreatureStates
리턴 bool

HasTag() 공개 메소드

Returns true if creature's race data has the tag.
public HasTag ( string tag ) : bool
tag string
리턴 bool

Inquiry() 공개 메소드

Sends a msg box to creature's client, asking a question. The callback is executed if the box is answered with OK.
public Inquiry ( Action callback, string format ) : void
callback Action
format string
리턴 void

Is() 공개 메소드

public Is ( RaceStands stand ) : bool
stand RaceStands
리턴 bool

Jump() 공개 메소드

Warps creature to given coordinates in its current region.
public Jump ( Position position ) : void
position Position
리턴 void

Jump() 공개 메소드

Warps creature to given coordinates in its current region.
public Jump ( int x, int y ) : void
x int
y int
리턴 void

Kill() 공개 메소드

Kills creature.
public Kill ( Creature killer ) : void
killer Creature
리턴 void

LoadDefault() 공개 메소드

Loads race and handles some basic stuff, like adding regens.
Has to be called before anything is actually done with the creature, as it initializes the race data, the inventory, and other vital parts.
public LoadDefault ( ) : void
리턴 void

Lock() 공개 메소드

Activates given Locks for creature.
Some locks are lifted automatically on Warp, SkillComplete, and SkillCancel. Only sending the locks when they actually changed can cause problems, e.g. if a lock is removed during a cutscene (skill running out) the unlock after the cutscene isn't sent. The client actually has counted locks, unlike us atm. Implementing those will fix the problem. TODO.
public Lock ( Locks locks, bool updateClient = false ) : Locks
locks Locks Locks to activate.
updateClient bool Sends CharacterLock to client if true.
리턴 Locks

ModifyLife() 공개 메소드

Changes life and sends stat update.
public ModifyLife ( float amount ) : void
amount float
리턴 void

Move() 공개 메소드

Starts movement from current position to destination. Sends Running|Walking.
public Move ( Position destination, bool walking ) : void
destination Position
walking bool
리턴 void

OnMabiTick() 공개 메소드

Called every 5 minutes, checks changes through food.
public OnMabiTick ( ErinnTime time ) : void
time ErinnTime
리턴 void

RemoveFromRegion() 공개 메소드

Removes creature from its current region.
public RemoveFromRegion ( ) : void
리턴 void

RemoveItem() 공개 메소드

Removes items with the given id from the creature's inventory.
public RemoveItem ( int itemId, int amount = 1 ) : void
itemId int
amount int
리턴 void

ResetPosition() 공개 메소드

Stops movement and resets creature to the given position.
public ResetPosition ( Position pos ) : void
pos Position
리턴 void

Revive() 공개 메소드

Revives creature.
public Revive ( ReviveOptions option ) : void
option ReviveOptions Determines the penalty and stat recovery.
리턴 void

SetLocation() 공개 메소드

Sets RegionId and position.
public SetLocation ( Location loc ) : void
loc Location
리턴 void

SetLocation() 공개 메소드

Sets RegionId and position.
public SetLocation ( int region, int x, int y ) : void
region int
x int
y int
리턴 void

SetLocationNear() 공개 메소드

Sets region, x, and y, to be near entity. Also randomizes direction.
public SetLocationNear ( Entity entity, int range ) : void
entity Entity
range int
리턴 void

SetPosition() 공개 메소드

Sets position and destination.
public SetPosition ( int x, int y ) : Position
x int
y int
리턴 Position

ShouldSurvive() 보호된 추상적인 메소드

Returns true if creature should go into deadly by the attack.
protected abstract ShouldSurvive ( float damage, Creature from, float lifeBefore ) : bool
damage float
from Creature
lifeBefore float
리턴 bool

Shove() 공개 메소드

Sets new position for target, based on attacker's position and the distance, takes collision into consideration.
public Shove ( Creature target, int distance ) : Position
target Creature Entity to be knocked back
distance int Distance to knock back the target
리턴 Position

StopMove() 공개 메소드

Stops movement, returning new current position. Sends Force(Walk|Run)To.
public StopMove ( ) : Position
리턴 Position

TakeDamage() 공개 메소드

Applies damage to Life, kills creature if necessary.
public TakeDamage ( float damage, Creature from ) : void
damage float
from Creature
리턴 void

TalkToNpc() 공개 메소드

Starts dialog with NPC, returns false if NPC couldn't be found.
public TalkToNpc ( string npcName, string npcNameLocal = null ) : bool
npcName string The ident for the NPC, e.g. _duncan.
npcNameLocal string Defaults to npcName if null.
리턴 bool

TurnTo() 공개 메소드

Turns creature in direction of position.
public TurnTo ( Position pos ) : void
pos Position
리턴 void

TurnTo() 공개 메소드

Turns creature in given direction.
public TurnTo ( float x, float y ) : void
x float
y float
리턴 void

Unlock() 공개 메소드

Deactivates given Locks for creature.
Unlocking movement on the client apparently resets skill stuns.
public Unlock ( Locks locks, bool updateClient = false ) : Locks
locks Locks Locks to deactivate.
updateClient bool Sends CharacterUnlock to client if true.
리턴 Locks

Warp() 공개 메소드

Warps creature to target location, returns false if warp is unsuccessful.
public Warp ( Location loc ) : bool
loc Location
리턴 bool

Warp() 공개 메소드

Warps creature to target location, returns false if warp is unsuccessful.
public Warp ( int regionId, Position position ) : bool
regionId int
position Position
리턴 bool

Warp() 공개 추상적인 메소드

Warps creature to target location, returns false if warp is unsuccessful.
public abstract Warp ( int regionId, int x, int y ) : bool
regionId int
x int
y int
리턴 bool

Warp() 공개 메소드

Warps creature to target location path, returns false if warp is unsuccessful.
Parses location paths like Uladh_main/SomeArea/SomeEvent and calls Warp with the resulting values.
public Warp ( string locationPath ) : bool
locationPath string
리턴 bool

프로퍼티 상세

_battleStance 보호되어 있는 프로퍼티

protected bool _battleStance
리턴 bool

_hitTrackerIds 공개적으로 프로퍼티

public long _hitTrackerIds
리턴 long

_hitTrackers 공개적으로 프로퍼티

public Dictionary _hitTrackers
리턴 HitTracker>.Dictionary

_totalHits 공개적으로 프로퍼티

public int _totalHits
리턴 int