Skip to content

Add Monk vocation#48

Open
szmalcher88-ai wants to merge 1 commit into
Galarzaa90:mainfrom
szmalcher88-ai:add-monk-vocation
Open

Add Monk vocation#48
szmalcher88-ai wants to merge 1 commit into
Galarzaa90:mainfrom
szmalcher88-ai:add-monk-vocation

Conversation

@szmalcher88-ai

Copy link
Copy Markdown

What

Adds the Monk vocation (and its promotion, Exalted Monk) to tibiapy.enums, fixing the bazaar parse failure reported in #47.

Why

Vocation has no MONK/EXALTED_MONK member. When a Monk is on a Char Bazaar page, try_enum(Vocation, "Monk") returns None, and the required Auction.vocation field rejects it — so the entire page fails with:

InvalidContentError: content does not belong to the bazaar at Tibia.com

Monks are now common on the bazaar, so fetch_current_auctions / fetch_auction_history break on any page containing one.

Changes

  • Vocation: add MONK = "Monk" and EXALTED_MONK = "Exalted Monk", and map EXALTED_MONK.base → MONK.
  • AuctionVocationFilter.MONK, HighscoresProfession.MONKS, SpellVocationFilter.MONK for complete vocation coverage.
  • Regression test in tests/tests_enums.py (covers Vocation("Monk"), Vocation("Exalted Monk").base, and the try_enum path the parser actually uses).
  • CHANGELOG entry.

Notes

  • Focused on the vocation only. (Prior PR Add monk vocation #45 added this too, but bundled an unrelated WeaponProficiency feature and was orphaned when its author's account was deleted — so the fix was lost rather than rejected.)
  • I left __version__ untouched and used a 6.4.0 (unreleased) CHANGELOG header — happy to adjust the version/date to match your release process.
  • The numeric filter values (AuctionVocationFilter.MONK = 6, HighscoresProfession.MONKS = 6) follow the existing sequential pattern (and match Add monk vocation #45); worth a quick double-check against the live forms.

Testing

tests_enums.py, tests_bazaar.py, tests_character.py pass locally (28 passed). The new test fails on main and passes with this change.

Fixes #47

🤖 Generated with Claude Code

tibiapy.enums.Vocation had no member for the Monk vocation, so a Monk / Exalted
Monk character on a Char Bazaar page made try_enum(Vocation, "Monk") return None
and the Auction model rejected the whole page with InvalidContentError.

- Vocation: add MONK / EXALTED_MONK (+ base property maps Exalted Monk -> Monk)
- AuctionVocationFilter.MONK, HighscoresProfession.MONKS, SpellVocationFilter.MONK
- regression test in tests_enums.py + CHANGELOG entry

Fixes Galarzaa90#47

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vocation enum missing Monk/Exalted Monk breaks bazaar parsing (InvalidContentError)

1 participant