Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CountAsLoss + fix CheckStartSolo3v3Arena #19

Merged
merged 6 commits into from
Sep 29, 2024

Conversation

laasker
Copy link
Collaborator

@laasker laasker commented Sep 23, 2024

this changes need azerothcore/azerothcore-wotlk@f6de601 (merged already)

Changes Proposed:

  • config 'Solo.3v3.StopGameIncomplete' now works, before it would always end the arena despite havin 6 players
  • now applies Deserter if a player doesn't accept queue, or logout while queue pops
  • now count as a loss if a player leaves arena or doesn't accept queue
  • statistics option now shows solo MMR

Issues Addressed:

  • Closes

SOURCE:

Tests Performed:

  • Tested ingame

How to Test the Changes:

@@ -66,7 +66,6 @@ class Solo3v3BG : public AllBattlegroundScript
uint32 oldTeamRatingHorde;

void OnQueueUpdate(BattlegroundQueue* queue, uint32 /*diff*/, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType, bool isRated, uint32 /*arenaRatedTeamId*/) override;
void OnBattlegroundUpdate(Battleground* bg, uint32 /*diff*/) override;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you delete this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the hook OnArenaStart now, so we can use it to call CheckStartSolo3v3.

But we could use OnBGUpdate and check if there's a player that didn't accept the queue and then end the solo earlier, while not in progress, instead of waiting the arena to start

@Helias
Copy link
Member

Helias commented Sep 25, 2024

pipeline error

/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/modules/mod-arena-3v3-solo-queue/src/solo3v3_sc.cpp:670:14: fatal error: use of undeclared identifier 'ARENA_DESERTION_TYPE_LEAVE_BG'; did you mean 'BG_DESERTION_TYPE_LEAVE_BG'?
  670 |         case ARENA_DESERTION_TYPE_LEAVE_BG:
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |              BG_DESERTION_TYPE_LEAVE_BG
/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/src/server/game/Battlegrounds/Battleground.h:50:5: note: 'BG_DESERTION_TYPE_LEAVE_BG' declared here
   50 |     BG_DESERTION_TYPE_LEAVE_BG          = 0, // player leaves the BG
      |     ^
1 error generated.

@laasker
Copy link
Collaborator Author

laasker commented Sep 26, 2024

pipeline error

/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/modules/mod-arena-3v3-solo-queue/src/solo3v3_sc.cpp:670:14: fatal error: use of undeclared identifier 'ARENA_DESERTION_TYPE_LEAVE_BG'; did you mean 'BG_DESERTION_TYPE_LEAVE_BG'?
  670 |         case ARENA_DESERTION_TYPE_LEAVE_BG:
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |              BG_DESERTION_TYPE_LEAVE_BG
/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/src/server/game/Battlegrounds/Battleground.h:50:5: note: 'BG_DESERTION_TYPE_LEAVE_BG' declared here
   50 |     BG_DESERTION_TYPE_LEAVE_BG          = 0, // player leaves the BG
      |     ^
1 error generated.

It needs azerothcore/azerothcore-wotlk#20039

@Helias
Copy link
Member

Helias commented Sep 29, 2024

minor issue

/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/modules/mod-arena-3v3-solo-queue/src/solo3v3.cpp:144:24: fatal error: comparison of integers of different signs: 'int' and 'uint32' (aka 'unsigned int') [-Wsign-compare]
  144 |     if (PlayersInArena < AmountPlayersSolo3v3)
      |         ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [modules/CMakeFiles/modules.dir/build.make:104: modules/CMakeFiles/modules.dir/mod-arena-3v3-solo-queue/src/solo3v3.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....

@laasker
Copy link
Collaborator Author

laasker commented Sep 29, 2024

minor issue

/home/runner/work/mod-arena-3v3-solo-queue/mod-arena-3v3-solo-queue/modules/mod-arena-3v3-solo-queue/src/solo3v3.cpp:144:24: fatal error: comparison of integers of different signs: 'int' and 'uint32' (aka 'unsigned int') [-Wsign-compare]
  144 |     if (PlayersInArena < AmountPlayersSolo3v3)
      |         ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
1 error generated.
gmake[2]: *** [modules/CMakeFiles/modules.dir/build.make:104: modules/CMakeFiles/modules.dir/mod-arena-3v3-solo-queue/src/solo3v3.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....

My bad, it's fixed now

@laasker laasker changed the title WIP - CountAsLoss + fix CheckStartSolo3v3Arena CountAsLoss + fix CheckStartSolo3v3Arena Sep 29, 2024
@Helias Helias merged commit 1313a6c into azerothcore:master Sep 29, 2024
1 check passed
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.

2 participants