Skip to content

Commit 0069cf4

Browse files
committed
Added exalted_dust and exalted_dust_limit attributes to auctions.
1 parent 6faa1eb commit 0069cf4

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Changelog
66
Due to this library relying on external content, older versions are not guaranteed to work.
77
Try to always use the latest version.
88

9+
.. v5.2.0
10+
11+
5.2.0 (2021-12-31)
12+
==================
13+
- Added ``exalted_dust`` and ``exalted_dust_limit`` attributes to auctions.
14+
15+
916
.. v5.1.0
1017
1118
5.1.0 (2021-09-16)

tibiapy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Tibia.com parsing and fetching library."""
2-
__version__ = '5.1.0'
2+
__version__ = '5.2.0'
33
__author__ = 'Allan Galarza'
44
__license__ = 'Apache-2.0 License'
55

tibiapy/bazaar.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,10 @@ class Auction(AuctionEntry):
869869
The number of hireling jobs the character has.
870870
hireling_outfits: :class:`int`
871871
The number of hireling outfits the character has.
872+
exalted_dust: :class:`int`
873+
The amount of exalted dust the character has.
874+
exalted_dust_limit: :class:`int`
875+
The dust limit of the character.
872876
items: :class:`ItemSummary`
873877
The items the character has across inventory, depot and item stash.
874878
store_items: :class:`ItemSummary`
@@ -930,6 +934,8 @@ def __init__(self, **kwargs):
930934
self.hirelings: int = kwargs.get("hirelings", 0)
931935
self.hireling_jobs: int = kwargs.get("hireling_jobs", 0)
932936
self.hireling_outfits: int = kwargs.get("hireling_outfits", 0)
937+
self.exalted_dust: int = kwargs.get("exalted_dust", 0)
938+
self.exalted_dust_limit: int = kwargs.get("exalted_dust_limit", 0)
933939
self.items: ItemSummary = kwargs.get("items")
934940
self.store_items: ItemSummary = kwargs.get("store_items")
935941
self.mounts: Mounts = kwargs.get("mounts")
@@ -971,6 +977,8 @@ def __init__(self, **kwargs):
971977
"hirelings",
972978
"hireling_jobs",
973979
"hireling_outfits",
980+
"exalted_dust",
981+
"exalted_dust_limit",
974982
"items",
975983
"store_items",
976984
"mounts",
@@ -1312,6 +1320,11 @@ def _parse_general_table(self, table):
13121320
self.hirelings = parse_integer(hirelings_data.get("hirelings", ""))
13131321
self.hireling_jobs = parse_integer(hirelings_data.get("hireling_jobs", ""))
13141322
self.hireling_outfits = parse_integer(hirelings_data.get("hireling_outfits", ""))
1323+
if len(content_containers) == 9:
1324+
dust_data = self._parse_data_table(content_containers[8])
1325+
dust_values = dust_data.get("exalted_dust", "0/0").split("/")
1326+
self.exalted_dust = parse_integer(dust_values[0])
1327+
self.exalted_dust_limit = parse_integer(dust_values[1])
13151328
# endregion
13161329

13171330

0 commit comments

Comments
 (0)