fix(PATCH): lfg-solo.patch (#24)

* Update README.md

Updated readme.

* Update to work with AzerothCore 17/09/2021

Update to work with AzerothCore 17/09/2021, since the core added a m_Testing variable the vanilla lfg-solo.patch didn't account for.

* Update README.md

* Update lfg-solo.patch

Fix to handle core commit 606ea32 changes (or previous commits).

* Update README.md

Restored the original git clone link (git clone https://github.com/azerothcore/mod-solo-lfg.git) to make this compatible for the pull request.

* update

Co-authored-by: Patrick Lewis <pat@lo5t.com>
This commit is contained in:
Artanis
2021-09-27 00:46:10 +00:00
committed by GitHub
parent af1365fe3c
commit ac351ece83
2 changed files with 12 additions and 10 deletions

View File

@@ -6,12 +6,14 @@ Allows for players to use dungeon finder solo or in groups less than and up to 5
## Standard Installation ## Standard Installation
``` ```
1. Apply lfg-solo.patch to your core. 1. Go inside your /modules/ folder
2. Simply place the module under the `modules` directory of your AzerothCore source. 2. git clone https://github.com/azerothcore/mod-solo-lfg.git
3. Apply lfg-solo.patch to your core. 3. Apply lfg-solo.patch to your core.
a. In order to do this, please go to the root /azerothcore-wotlk of your installation. a. In order to do this, please go to the root /azerothcore-wotlk of your installation.
b. Then do git apply modules/mod-solo-lfg/lfg-solo.patch b. Then do git apply modules/mod-solo-lfg/lfg-solo.patch
4. Re-run cmake and launch a clean build of AzerothCore. 4. Re-run cmake and launch a clean build of AzerothCore.
a. If using AzerothCore Bash Dashboard setup: Do a ./acore.sh compiler configure followed by ./acore.sh compiler build.
b. If using standard installation, refer to https://www.azerothcore.org/wiki/installation
``` ```
## Docker Installation ## Docker Installation
@@ -60,4 +62,4 @@ copy the file SoloLfg.conf.dist to SoloLfg.conf and edit it (keep both files).
* [Traesh: Original Script](https://github.com/Traesh) * [Traesh: Original Script](https://github.com/Traesh)
* [Micrah/Milestorme: Module Creator](https://github.com/milestorme). * [Micrah/Milestorme: Module Creator](https://github.com/milestorme).
* [Conan513](https://github.com/conan513). * [Conan513](https://github.com/conan513).
* [Artanisx](https://github.com/Artanisx) - Update for Docker installations. * [Artanisx](https://github.com/Artanisx) - Update for Docker installations. Updated LFG-Solo.patch to work with the latest AzerothCore version (17/09/2021). Updated standard installation instructions.

View File

@@ -7,8 +7,8 @@ index 6d32c5760..1d17ab738 100644
namespace lfg namespace lfg
{ {
- -
- LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)) - LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(false)
+ LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_isSoloLFG(false) + LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_isSoloLFG(false), m_Testing(false)
{ {
new LFGPlayerScript(); new LFGPlayerScript();
new LFGGroupScript(); new LFGGroupScript();
@@ -17,7 +17,7 @@ index 6d32c5760..1d17ab738 100644
if (itPlayers->second.accept != LFG_ANSWER_AGREE) // No answer (-1) or not accepted (0) if (itPlayers->second.accept != LFG_ANSWER_AGREE) // No answer (-1) or not accepted (0)
allAnswered = false; allAnswered = false;
- -
- if (!allAnswered) - if (!m_Testing && !allAnswered)
+ if (!sLFGMgr->IsSoloLFG() && !allAnswered) + if (!sLFGMgr->IsSoloLFG() && !allAnswered)
{ {
for (LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it) for (LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
@@ -63,7 +63,7 @@ index e43080c14..e532ddb57 100644
return LFG_INCOMPATIBLES_MULTIPLE_LFG_GROUPS; return LFG_INCOMPATIBLES_MULTIPLE_LFG_GROUPS;
// Group with less that MAXGROUPSIZE members always compatible // Group with less that MAXGROUPSIZE members always compatible
- if (check.size() == 1 && numPlayers < MAXGROUPSIZE) - if (!sLFGMgr->IsTesting() && check.size() == 1 && numPlayers < MAXGROUPSIZE)
+ if (!sLFGMgr->IsSoloLFG() && numPlayers != MAXGROUPSIZE) // solo lfg + if (!sLFGMgr->IsSoloLFG() && numPlayers != MAXGROUPSIZE) // solo lfg
{ {
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(check.front()); LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(check.front());
@@ -72,7 +72,7 @@ index e43080c14..e532ddb57 100644
} }
// Enough players? // Enough players?
- if (numPlayers != MAXGROUPSIZE) - if (!sLFGMgr->IsTesting() && numPlayers != MAXGROUPSIZE)
+ if (!sLFGMgr->IsSoloLFG() && numPlayers != MAXGROUPSIZE) // solo lfg + if (!sLFGMgr->IsSoloLFG() && numPlayers != MAXGROUPSIZE) // solo lfg
{ {
strGuids.addRoles(proposalRoles); strGuids.addRoles(proposalRoles);