Interface IStat
Interface for stats in the game.
Namespace: Fibula.Creatures.Contracts.Abstractions
Assembly: Fibula.Creatures.Contracts.dll
Syntax
public interface IStat
Properties
| Improve this Doc View SourceCurrent
Gets this stat's current value.
Declaration
uint Current { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Maximum
Gets this stat's maximum value.
Declaration
uint Maximum { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Percent
Gets the current percentual value between current and maximum values.
Declaration
byte Percent { get; }
Property Value
Type | Description |
---|---|
System.Byte |
Type
Gets this stat's type.
Declaration
CreatureStat Type { get; }
Property Value
Type | Description |
---|---|
CreatureStat |
Methods
| Improve this Doc View SourceDecrease(Int32)
Decreases this stats's value.
Declaration
bool Decrease(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The amount by which to decrease this stat's value. |
Returns
Type | Description |
---|---|
System.Boolean | True if the value was actually decreased, false otherwise. |
Increase(Int32)
Increases this stats's value.
Declaration
bool Increase(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The amount by which to increase this stat's value. |
Returns
Type | Description |
---|---|
System.Boolean | True if the value was actually increased, false otherwise. |
Set(UInt32)
Sets this stats's value.
Declaration
bool Set(uint value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | value | The value to set in the stat. This is bounded by [0, Maximum]. |
Returns
Type | Description |
---|---|
System.Boolean | True if the value was actually changed, false otherwise. |
Events
| Improve this Doc View SourceChanged
Event triggered when this stat changes.
Declaration
event OnStatChanged Changed
Event Type
Type | Description |
---|---|
OnStatChanged |