pvp === .. py:module:: sidequest_common.schemas.pvp .. autoapi-nested-parse:: Battleground scoreboards the addon records, and the members-only match history and PvP boards built from them. The ``battlegrounds`` block is additive on top of the ``SQX1:`` export ``v: 2``: older sites ignore it, so the version number doesn't change. The game hides the scoreboard while a match runs (``C_PvP.GetScoreInfo`` is secret in an active match), so the addon records it once the match has ended. .. py:data:: MAX_BATTLEGROUNDS :value: 50 Matches in one export. .. py:data:: MAX_BATTLEGROUND_PLAYERS :value: 80 Scoreboard rows in one match (40 a side is the largest battleground). .. py:data:: SAME_MATCH_SECONDS :value: 120 Two recordings of the same battleground ending this close together are one match (several members record it). .. py:data:: PVP_MATCHES_PAGE_SIZE :value: 25 .. py:data:: PVP_BOARD_SIZE :value: 10 .. py:class:: BattlegroundWinner Bases: :py:obj:`enum.StrEnum` Which side won a battleground. .. py:attribute:: ALLIANCE :value: 'alliance' .. py:attribute:: HORDE :value: 'horde' .. py:attribute:: DRAW :value: 'draw' .. py:class:: BattlegroundFaction Bases: :py:obj:`enum.StrEnum` A scoreboard row's side. .. py:attribute:: ALLIANCE :value: 'alliance' .. py:attribute:: HORDE :value: 'horde' .. py:class:: ExportBattlegroundPlayer Bases: :py:obj:`pydantic.BaseModel` One scoreboard row, as ``C_PvP.GetScoreInfo`` gives it once the match has ended. ``name`` is the player's name as the scoreboard shows it. ``wow_class`` is the class file name (``WARRIOR``), lowercased by the site. Counters the scoreboard doesn't show for this battleground are 0. .. py:attribute:: model_config .. py:attribute:: name :type: str .. py:attribute:: faction :type: BattlegroundFaction .. py:attribute:: race :type: str | None .. py:attribute:: wow_class :type: str | None .. py:attribute:: killing_blows :type: int .. py:attribute:: honorable_kills :type: int .. py:attribute:: deaths :type: int .. py:attribute:: honor_gained :type: int .. py:attribute:: damage_done :type: int .. py:attribute:: healing_done :type: int .. py:class:: ExportBattleground Bases: :py:obj:`pydantic.BaseModel` One finished battleground in the export payload. ``id`` is the addon's own id for the recording (recorder plus end time); the site also merges recordings of the same match by other members (same ``instance_id``, ``ended_at`` within ``SAME_MATCH_SECONDS``). ``my_faction`` is the recorder's side. ``winner`` is ``None`` if the game didn't say. .. py:attribute:: id :type: str .. py:attribute:: map :type: str .. py:attribute:: instance_id :type: int .. py:attribute:: ended_at :type: int .. py:attribute:: duration :type: int .. py:attribute:: winner :type: BattlegroundWinner | None :value: None .. py:attribute:: my_faction :type: BattlegroundFaction .. py:attribute:: players :type: list[ExportBattlegroundPlayer] .. py:class:: BattlegroundImportCounts Bases: :py:obj:`pydantic.BaseModel` Counts for the ``battlegrounds`` section of one import. ``merged`` matches another member already recorded. .. py:attribute:: new :type: int :value: 0 .. py:attribute:: merged :type: int :value: 0 .. py:class:: PvpPlayerRow Bases: :py:obj:`pydantic.BaseModel` One scoreboard row on the site. ``character_slug`` links a guild character's row to its character page. .. py:attribute:: model_config .. py:attribute:: name :type: str .. py:attribute:: faction :type: BattlegroundFaction .. py:attribute:: race :type: str | None .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:attribute:: killing_blows :type: int .. py:attribute:: honorable_kills :type: int .. py:attribute:: deaths :type: int .. py:attribute:: honor_gained :type: int .. py:attribute:: damage_done :type: int .. py:attribute:: healing_done :type: int .. py:attribute:: guild_member :type: bool True when the row is a SideQuest character. .. py:attribute:: character_slug :type: str | None .. py:class:: PvpMatchSummary Bases: :py:obj:`pydantic.BaseModel` One battleground in the match history. .. py:attribute:: id :type: uuid.UUID .. py:attribute:: map :type: str .. py:attribute:: ended_at :type: datetime.datetime .. py:attribute:: duration :type: int .. py:attribute:: winner :type: BattlegroundWinner | None .. py:attribute:: guild_faction :type: BattlegroundFaction The side the recording member played on. .. py:attribute:: won :type: bool | None Whether the guild's side won; ``None`` if the winner is unknown or a draw. .. py:attribute:: guild_players :type: list[str] The SideQuest characters in the match. .. py:attribute:: recorded_by :type: str .. py:class:: PvpMatchDetail Bases: :py:obj:`PvpMatchSummary` One battleground with its full scoreboard, highest honorable kills first. .. py:attribute:: players :type: list[PvpPlayerRow] .. py:class:: PvpMatchPage Bases: :py:obj:`pydantic.BaseModel` One page of the match history, newest first. .. py:attribute:: page :type: int .. py:attribute:: page_count :type: int .. py:attribute:: matches :type: list[PvpMatchSummary] .. py:class:: PvpBoardEntry Bases: :py:obj:`pydantic.BaseModel` One guild character on a PvP board. .. py:attribute:: model_config .. py:attribute:: name :type: str .. py:attribute:: wow_class :type: sidequest_common.schemas.events.WowClass | None .. py:attribute:: character_slug :type: str | None .. py:attribute:: value :type: int .. py:class:: PvpBoards Bases: :py:obj:`pydantic.BaseModel` Totals over every recorded battleground for SideQuest characters, ten to a board. .. py:attribute:: matches :type: int Battlegrounds recorded in total. .. py:attribute:: wins :type: list[PvpBoardEntry] .. py:attribute:: honorable_kills :type: list[PvpBoardEntry] .. py:attribute:: killing_blows :type: list[PvpBoardEntry] .. py:attribute:: honor_gained :type: list[PvpBoardEntry] .. py:attribute:: damage_done :type: list[PvpBoardEntry] .. py:attribute:: healing_done :type: list[PvpBoardEntry]