docs: Added DamageDescription class

+ fix for string -> str format in the ItemGround  docs
This commit is contained in:
AURUMVORXX
2024-11-06 11:23:17 +03:00
parent fa24d77ea6
commit d235a28a1d
4 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
# `class` DamageDescription
---
::: g2o.damage.DamageDescription

View File

@@ -1,7 +1,35 @@
import sqg2o import sqg2o
class DamageDescription(sqg2o.DamageDescription): class DamageDescription(sqg2o.DamageDescription):
"""
This class represents damage information.
Original: [DamageDescription](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/item/DamageDescription//)
## `int` flags
Represents the damage flags.
## `int` damage
Represents the total damage taken.
## `str` item_instance *(read-only)*
!!! note
Can be empty if there is no weapon.
Represents the weapon instance used to deal damage.
## `int` distance
Represents the total distance, calculated from origin point to target.
## `int` spell_id
Represents the spell id.
## `int` spell_level
Represents the level of chargeable spells.
## `str` node
!!! note
Can be empty if there was no projectile.
Represents the name of the node hit by a point projectile.
"""
def __init__(self): def __init__(self):
return super().__init__() return super().__init__()

View File

@@ -8,13 +8,13 @@ class ItemGround(sqg2o.ItemGround):
## `int` id *(read-only)* ## `int` id *(read-only)*
Represents the unique id of the item ground. Represents the unique id of the item ground.
## `string` instance *(read-only)* ## `str` instance *(read-only)*
Represents the item instance of the item ground. Represents the item instance of the item ground.
## `int` amount *(read-only)* ## `int` amount *(read-only)*
Represents the item amount of item ground. Represents the item amount of item ground.
## `string` world *(read-only)* ## `str` world *(read-only)*
Represents the item ground world (.ZEN file path). Represents the item ground world (.ZEN file path).
## `int` virtualWorld ## `int` virtualWorld

View File

@@ -18,6 +18,8 @@ nav:
- How to use: index.md - How to use: index.md
- QnA: qna.md - QnA: qna.md
- Classes: - Classes:
- Game:
- DamageDescription: classes/game/DamageDescription.md
- Item: - Item:
- ItemGround: classes/item/ItemGround.md - ItemGround: classes/item/ItemGround.md
- Network: - Network: