icecap.domain.models
This module contains models that represent various game entities. All models are read-only and represent the state of the game at a specific point in time.
Important note: The models do not contain all fields of the game entities. For ah exhaustive list of available data, please refer to the C structs definitions in the infrastructure layer.
Classes:
-
Entity
–Minimal lightweight representation of an object in the game.
-
GameObject
–Representation of a game object.
-
Player
–Representation of a player in the game.
-
Unit
–Representation of a non-player unit in the game.
Entity
dataclass
Entity(guid: int, object_address: int, entity_type: EntityType)
Minimal lightweight representation of an object in the game.
This class serves as the base for all entity types and can be used for more detailed querying of the game state.
Attributes:
-
entity_type
(EntityType
) –Entity type of the object.
-
guid
(int
) –Global unique identifier of the entity.
-
object_address
(int
) –Memory address of the object in the game.
entity_type
instance-attribute
entity_type: EntityType
Entity type of the object.
This is used to differentiate between different types of entities in the game.
guid
instance-attribute
guid: int
Global unique identifier of the entity.
For players, this changes each time the player enters the world.
GameObject
dataclass
GameObject(
guid: int,
object_address: int,
entity_type: EntityType,
position: Position,
name: str,
game_object_fields: GameObjectFields,
)
Bases: Entity
Representation of a game object.
Game objects are entities in the world that can be interacted with, manipulated, or observed.
Attributes:
-
entity_type
(EntityType
) –Entity type of the object.
-
game_object_fields
(GameObjectFields
) –Fields specific to the game object.
-
guid
(int
) –Global unique identifier of the entity.
-
name
(str
) –Human-readable name of the game object.
-
object_address
(int
) –Memory address of the object in the game.
-
position
(Position
) –The position of the game object in the world.
entity_type
instance-attribute
entity_type: EntityType
Entity type of the object.
This is used to differentiate between different types of entities in the game.
game_object_fields
instance-attribute
game_object_fields: GameObjectFields
Fields specific to the game object.
guid
instance-attribute
guid: int
Global unique identifier of the entity.
For players, this changes each time the player enters the world.
Player
dataclass
Player(
guid: int,
object_address: int,
entity_type: EntityType,
position: Position,
name: str,
unit_fields: UnitFields,
)
Bases: Entity
Representation of a player in the game.
Methods:
-
is_enemy
–Determines if the other player is an enemy.
Attributes:
-
entity_type
(EntityType
) –Entity type of the object.
-
guid
(int
) –Global unique identifier of the entity.
-
name
(str
) –The name of the player.
-
object_address
(int
) –Memory address of the object in the game.
-
position
(Position
) –The position of the player in the world.
-
unit_fields
(UnitFields
) –Fields specific to the player.
entity_type
instance-attribute
entity_type: EntityType
Entity type of the object.
This is used to differentiate between different types of entities in the game.
guid
instance-attribute
guid: int
Global unique identifier of the entity.
For players, this changes each time the player enters the world.
Unit
dataclass
Unit(
guid: int,
object_address: int,
entity_type: EntityType,
position: Position,
name: str,
unit_fields: UnitFields,
)
Bases: Entity
Representation of a non-player unit in the game.
Attributes:
-
entity_type
(EntityType
) –Entity type of the object.
-
guid
(int
) –Global unique identifier of the entity.
-
name
(str
) –The name of the unit, typically a creature or NPC.
-
object_address
(int
) –Memory address of the object in the game.
-
position
(Position
) –The position of the unit in the world.
-
unit_fields
(UnitFields
) –Fields specific to the unit.
entity_type
instance-attribute
entity_type: EntityType
Entity type of the object.
This is used to differentiate between different types of entities in the game.
guid
instance-attribute
guid: int
Global unique identifier of the entity.
For players, this changes each time the player enters the world.