icecap.domain.dto
Data transfer objects for the application.
This module contains data structures used to transfer data between different parts of the application.
Classes:
-
GameObjectFields–Data class representing the fields of a game object.
-
Position–Data class representing a 3D position with rotation.
-
UnitFields–Data class representing the fields of a unit.
GameObjectFields
dataclass
Data class representing the fields of a game object.
Important note: The DTO does not contain all fields of the game object. For ah exhaustive list of available data, please refer to the C structs definitions in the infrastructure layer.
Attributes:
-
display_id(int) –The display ID of the game object.
-
entry_id(int) –The entry ID of the game object.
-
owner_guid(int) –The GUID of the owner of the game object.
-
state(int) –The state of the game object.
display_id
instance-attribute
display_id: int
The display ID of the game object.
It is used to determine the visual representation of the game object.
entry_id
instance-attribute
entry_id: int
The entry ID of the game object.
It indicates the game which template to use when placing the object in the world.
state
instance-attribute
state: int
The state of the game object.
For example, it can be used to check if a bobber is bobbing or not.
Position
dataclass
UnitFields
dataclass
UnitFields(
level: int,
hit_points: int,
max_hit_points: int,
faction: Faction | None = None,
player_class: PlayerClass | None = None,
race: Race | None = None,
gender: Gender | None = None,
channel_spell: int | None = None,
channel_object: int | None = None,
)
Data class representing the fields of a unit.
This object is shared between players and units.
Attributes:
-
channel_object(int | None) –The channel object of the unit, if applicable.
-
channel_spell(int | None) –The channel spell of the unit, if applicable.
-
faction(Faction | None) –The faction of the unit, if applicable.
-
gender(Gender | None) –The gender of the unit, if applicable.
-
hit_points(int) –The current hit points of the unit.
-
level(int) –The level of the unit.
-
max_hit_points(int) –The maximum hit points of the unit.
-
player_class(PlayerClass | None) –The class of the player, if applicable.
-
race(Race | None) –The race of the unit, if applicable.
channel_object
class-attribute
instance-attribute
channel_object: int | None = None
The channel object of the unit, if applicable.
channel_spell
class-attribute
instance-attribute
channel_spell: int | None = None
The channel spell of the unit, if applicable.
faction
class-attribute
instance-attribute
faction: Faction | None = None
The faction of the unit, if applicable.
gender
class-attribute
instance-attribute
gender: Gender | None = None
The gender of the unit, if applicable.
player_class
class-attribute
instance-attribute
player_class: PlayerClass | None = None
The class of the player, if applicable.
race
class-attribute
instance-attribute
race: Race | None = None
The race of the unit, if applicable.