Property | Type | Description | |
---|---|---|---|
_hitTrackerIds | long | ||
_hitTrackers | HitTracker>.Dictionary | ||
_totalHits | int |
Property | Type | Description | |
---|---|---|---|
_battleStance | bool |
Method | Description | |
---|---|---|
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 ( |
Aggroes target, setting target and putting creature in battle stance.
|
|
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. |
|
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 ( |
Calculates the creature's elemental damage modifier, against the target's elements.
|
|
CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, |
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 ( |
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 |
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. |
Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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 |
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.
|
public Activate ( CreatureStates state ) : void | ||
state | CreatureStates | |
return | void |
public Activate ( CreatureStatesEx state ) : void | ||
state | CreatureStatesEx | |
return | void |
public abstract Aggro ( |
||
target | ||
return | void |
public AttackRangeFor ( |
||
target | ||
return | int |
public CalculateElementalDamageMultiplier ( |
||
target | ||
return | float |
public CalculateElementalDamageMultiplier ( int myLightning, int myFire, int myIce, |
||
myLightning | int | |
myFire | int | |
myIce | int | |
target | ||
return | float |
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 | |
return | float |
public Can ( System.Collections.Generic.Locks locks ) : bool | ||
locks | System.Collections.Generic.Locks | |
return | bool |
public CanTarget ( |
||
creature | ||
return | bool |
public Deactivate ( CreatureStates state ) : void | ||
state | CreatureStates | |
return | void |
public Deactivate ( CreatureStatesEx state ) : void | ||
state | CreatureStatesEx | |
return | void |
public GetAdjustedManaCost ( float baseVal ) : float | ||
baseVal | float | |
return | float |
public GetChainCastLevel ( SkillId skillId ) : int | ||
skillId | SkillId | |
return | int |
public GetHitTracker ( long entityId ) : HitTracker | ||
entityId | long | |
return | HitTracker |
public GetLeftCritChance ( float protection ) : float | ||
protection | float | |
return | float |
public GetPowerRating ( Creature compareCreature ) : PowerRating | ||
compareCreature | Creature | Creature to compare to |
return | PowerRating |
public GetProductionPartyBonus ( Skill skill ) : float | ||
skill | Skill | |
return | float |
public GetProductionSuccessChance ( Skill skill, ProductionCategory category, int baseChance, int rainBonus ) : float | ||
skill | Skill | |
category | ProductionCategory | |
baseChance | int | |
rainBonus | int | |
return | float |
public GetRightCritChance ( float protection ) : float | ||
protection | float | |
return | float |
public GetRndBalance ( int baseBalance ) : int | ||
baseBalance | int | |
return | int |
protected GetRndDamage ( float min, float max, int balance ) : float | ||
min | float | |
max | float | |
balance | int | |
return | float |
public GetRndMagicBalance ( int baseBalance = BaseMagicBalance ) : int | ||
baseBalance | int | |
return | int |
public GetRndMagicDamage ( Skill skill, float baseMin, float baseMax ) : float | ||
skill | Skill | |
baseMin | float | |
baseMax | float | |
return | float |
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. |
return | ICollection |
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. |
return | ICollection |
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. |
return | ICollection |
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. |
return | ICollection |
public GetTargetableCreaturesInRange ( int range, TargetableOptions options = TargetableOptions.None ) : ICollection |
||
range | int | Radius around position. |
options | TargetableOptions | Options to change the result. |
return | ICollection |
public GetTotalCritChance ( float protection ) : float | ||
protection | float | Protection to subtract from crit. |
return | float |
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. |
return | float |
public GiveItem ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
return | bool |
public GiveItemWithEffect ( Item item ) : void | ||
item | Item | |
return | void |
public Inquiry ( Action |
||
callback | Action |
|
format | string | |
return | void |
public Lock ( Locks locks, bool updateClient = false ) : Locks | ||
locks | Locks | Locks to activate. |
updateClient | bool | Sends CharacterLock to client if true. |
return | Locks |
public Move ( Position destination, bool walking ) : void | ||
destination | Position | |
walking | bool | |
return | void |
public RemoveItem ( int itemId, int amount = 1 ) : void | ||
itemId | int | |
amount | int | |
return | void |
public Revive ( ReviveOptions option ) : void | ||
option | ReviveOptions | Determines the penalty and stat recovery. |
return | void |
public SetLocation ( int region, int x, int y ) : void | ||
region | int | |
x | int | |
y | int | |
return | void |
public SetLocationNear ( Entity entity, int range ) : void | ||
entity | Entity | |
range | int | |
return | void |
public SetPosition ( int x, int y ) : Position | ||
x | int | |
y | int | |
return | Position |
protected abstract ShouldSurvive ( float damage, Creature from, float lifeBefore ) : bool | ||
damage | float | |
from | Creature | |
lifeBefore | float | |
return | bool |
public Shove ( Creature target, int distance ) : Position | ||
target | Creature | Entity to be knocked back |
distance | int | Distance to knock back the target |
return | Position |
public TakeDamage ( float damage, Creature from ) : void | ||
damage | float | |
from | Creature | |
return | void |
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. |
return | bool |
public Unlock ( Locks locks, bool updateClient = false ) : Locks | ||
locks | Locks | Locks to deactivate. |
updateClient | bool | Sends CharacterUnlock to client if true. |
return | Locks |
public Warp ( int regionId, Position position ) : bool | ||
regionId | int | |
position | Position | |
return | bool |
public abstract Warp ( int regionId, int x, int y ) : bool | ||
regionId | int | |
x | int | |
y | int | |
return | bool |