mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
@@ -43,9 +44,6 @@ namespace lfg
|
||||
{
|
||||
LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(false)
|
||||
{
|
||||
new LFGPlayerScript();
|
||||
new LFGGroupScript();
|
||||
|
||||
for (uint8 team = 0; team < 2; ++team)
|
||||
{
|
||||
m_raidBrowserUpdateTimer[team] = 10000;
|
||||
@@ -2128,14 +2126,6 @@ namespace lfg
|
||||
return;
|
||||
}
|
||||
|
||||
if (out)
|
||||
{
|
||||
if (player->GetMapId() == uint32(dungeon->map))
|
||||
player->TeleportToEntryPoint();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
LfgTeleportError error = LFG_TELEPORTERROR_OK;
|
||||
|
||||
if (!player->IsAlive())
|
||||
@@ -2158,6 +2148,13 @@ namespace lfg
|
||||
{
|
||||
error = LFG_TELEPORTERROR_COMBAT;
|
||||
}
|
||||
else if (out && error == LFG_TELEPORTERROR_OK)
|
||||
{
|
||||
if (player->GetMapId() == uint32(dungeon->map))
|
||||
player->TeleportToEntryPoint();
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 mapid = dungeon->map;
|
||||
@@ -2183,11 +2180,18 @@ namespace lfg
|
||||
}
|
||||
|
||||
if (error != LFG_TELEPORTERROR_OK)
|
||||
{
|
||||
player->GetSession()->SendLfgTeleportError(uint8(error));
|
||||
|
||||
//LOG_DEBUG("lfg", "TeleportPlayer: Player {} is being teleported in to map {} "
|
||||
// "(x: {}, y: {}, z: {}) Result: {}", player->GetName(), dungeon->map,
|
||||
// dungeon->x, dungeon->y, dungeon->z, error);
|
||||
LOG_DEBUG("lfg", "Player [{}] could NOT be teleported in to map [{}] (x: {}, y: {}, z: {}) Error: {}",
|
||||
player->GetName(), dungeon->map, dungeon->x, dungeon->y, dungeon->z, error);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("lfg", "Player [{}] is being teleported in to map [{}] (x: {}, y: {}, z: {})",
|
||||
player->GetName(), dungeon->map, dungeon->x, dungeon->y, dungeon->z);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -633,6 +633,9 @@ namespace lfg
|
||||
bool m_Testing;
|
||||
};
|
||||
|
||||
template <typename T, FMT_ENABLE_IF(std::is_enum_v<T>)>
|
||||
auto format_as(T f) { return fmt::underlying(f); }
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#define sLFGMgr lfg::LFGMgr::instance()
|
||||
|
||||
@@ -297,4 +297,9 @@ namespace lfg
|
||||
}
|
||||
}
|
||||
|
||||
void AddSC_LFGScripts()
|
||||
{
|
||||
new LFGPlayerScript();
|
||||
new LFGGroupScript();
|
||||
}
|
||||
} // namespace lfg
|
||||
|
||||
@@ -19,16 +19,15 @@
|
||||
* Interaction between core and LFGScripts
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "GroupScript.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "PlayerScript.h"
|
||||
|
||||
class Player;
|
||||
class Group;
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
class LFGPlayerScript : public PlayerScript
|
||||
{
|
||||
public:
|
||||
@@ -55,4 +54,6 @@ namespace lfg
|
||||
void OnInviteMember(Group* group, ObjectGuid guid) override;
|
||||
};
|
||||
|
||||
void AddSC_LFGScripts();
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
Reference in New Issue
Block a user