Skip to content

Commit

Permalink
chore (lfg-solo): clean up
Browse files Browse the repository at this point in the history
Reduce script diff from master. LFG Solo was literally 90% core edit with a on off bool in a custom script folder. It made no sense. Time to revisit the idea of a cleanup
Remove Lgf_Solo.cpp from custom script folder
Remove announcement on login and in conf
Move  SoloLFG.Enable bool to the exsisting LFGPlayerScript::OnLogin.
  • Loading branch information
acidmanifesto committed Oct 20, 2023
1 parent cd66511 commit 6704af2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 62 deletions.
9 changes: 9 additions & 0 deletions src/server/game/DungeonFinding/LFGScripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "LFGScripts.h"
#include "Common.h"
#include "Config.h"
#include "Group.h"
#include "LFGMgr.h"
#include "Log.h"
Expand Down Expand Up @@ -52,6 +53,14 @@ void LFGPlayerScript::OnLogout(Player* player)

void LFGPlayerScript::OnLogin(Player* player, bool /*loginFirst*/)
{
if (sConfigMgr->GetIntDefault("SoloLFG.Enable", true))
{
if (!sLFGMgr->IsSoloLFG())
{
sLFGMgr->ToggleSoloLFG();
}
}

if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
return;

Expand Down
53 changes: 0 additions & 53 deletions src/server/scripts/Custom/Lfg_Solo.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions src/server/scripts/Custom/custom_script_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
*/

// This is where scripts' loading functions should be declared:
void AddLfgSoloScripts();

// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddCustomScripts()
{
AddLfgSoloScripts();
}
7 changes: 0 additions & 7 deletions src/server/worldserver/worldserver.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4159,12 +4159,5 @@ Metric.OverallStatusInterval = 1

SoloLFG.Enable = 1

# SoloLFG.Announce
# Description: Announce the module.
# Default: 1 - (Enabled)
# 0 - (Disabled)

SoloLFG.Announce = 1

#
###################################################################################################

0 comments on commit 6704af2

Please sign in to comment.