mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 10:33:46 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
namespace MMAP
|
||||
{
|
||||
static char const* const MAP_FILE_NAME_FORMAT = "%s/mmaps/%03i.mmap";
|
||||
static char const* const TILE_FILE_NAME_FORMAT = "%s/mmaps/%03i%02i%02i.mmtile";
|
||||
static char const* const MAP_FILE_NAME_FORMAT = "{}/mmaps/{:03}.mmap";
|
||||
static char const* const TILE_FILE_NAME_FORMAT = "{}/mmaps/{:03}{:02}{:02}.mmtile";
|
||||
|
||||
// ######################## MMapMgr ########################
|
||||
MMapMgr::~MMapMgr()
|
||||
|
||||
@@ -3481,7 +3481,7 @@ void Creature::UpdateMovementFlags()
|
||||
|
||||
float Creature::GetNativeObjectScale() const
|
||||
{
|
||||
return GetCreatureTemplate()->scale;
|
||||
return ObjectMgr::ChooseDisplayId(GetCreatureTemplate())->DisplayScale;
|
||||
}
|
||||
|
||||
void Creature::SetObjectScale(float scale)
|
||||
|
||||
@@ -265,7 +265,7 @@ void Player::Update(uint32 p_time)
|
||||
|
||||
if (!IsPositionValid()) // pussywizard: will crash below at eg. GetZoneAndAreaId
|
||||
{
|
||||
LOG_INFO("misc", "Player::Update - invalid position ({0:.1f}, {0:.1f}, {0:.1f})! Map: {}, MapId: {}, {}",
|
||||
LOG_INFO("misc", "Player::Update - invalid position ({:0.1f}, {:0.1f}, {:0.1f})! Map: {}, MapId: {}, {}",
|
||||
GetPositionX(), GetPositionY(), GetPositionZ(), (FindMap() ? FindMap()->GetId() : 0), GetMapId(), GetGUID().ToString());
|
||||
GetSession()->KickPlayer("Invalid position");
|
||||
return;
|
||||
|
||||
@@ -1041,6 +1041,10 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
|
||||
if (!victim->IsPlayer())
|
||||
{
|
||||
/// @fix: Hack to avoid premature leashing
|
||||
if (damagetype != DOT && damage > 0 && !victim->GetOwnerGUID().IsPlayer() && (!spellProto || !spellProto->HasAura(SPELL_AURA_DAMAGE_SHIELD)))
|
||||
victim->ToCreature()->UpdateLeashExtensionTime();
|
||||
|
||||
if (attacker)
|
||||
{
|
||||
if (spellProto && victim->CanHaveThreatList() && !victim->HasUnitState(UNIT_STATE_EVADE) && !victim->IsInCombatWith(attacker))
|
||||
@@ -13554,8 +13558,6 @@ void Unit::SetInCombatWith(Unit* enemy, uint32 duration)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (Creature* pCreature = ToCreature())
|
||||
pCreature->UpdateLeashExtensionTime();
|
||||
|
||||
SetInCombatState(false, enemy, duration);
|
||||
}
|
||||
@@ -13714,6 +13716,8 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy, uint32 duration)
|
||||
|
||||
if (enemy)
|
||||
{
|
||||
creature->UpdateLeashExtensionTime();
|
||||
|
||||
if (IsAIEnabled)
|
||||
creature->AI()->JustEngagedWith(enemy);
|
||||
|
||||
|
||||
@@ -627,7 +627,7 @@ public:
|
||||
|
||||
if (object->GetTransport())
|
||||
{
|
||||
handler->PSendSysMessage("Transport offset: %.2f, %.2f, %.2f, %.2f", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
|
||||
handler->PSendSysMessage("Transport offset: {:0.2f}, {:0.2f}, {:0.2f}, {:0.2f}", object->m_movementInfo.transport.pos.GetPositionX(), object->m_movementInfo.transport.pos.GetPositionY(), object->m_movementInfo.transport.pos.GetPositionZ(), object->m_movementInfo.transport.pos.GetOrientation());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1130,7 +1130,7 @@ public:
|
||||
me->LoadCreaturesAddon(true);
|
||||
me->SetLootRecipient(nullptr);
|
||||
me->ResetPlayerDamageReq();
|
||||
me->UpdateLeashExtensionTime();
|
||||
me->ClearLastLeashExtensionTimePtr();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -122,6 +122,8 @@ foreach(TOOL_NAME ${TOOLS_BUILD_LIST})
|
||||
PUBLIC
|
||||
database
|
||||
PRIVATE
|
||||
modules
|
||||
scripts
|
||||
acore-core-interface)
|
||||
|
||||
# Install config
|
||||
@@ -153,6 +155,8 @@ foreach(TOOL_NAME ${TOOLS_BUILD_LIST})
|
||||
target_include_directories(${TOOL_PROJECT_NAME}
|
||||
PUBLIC
|
||||
${TOOL_PUBLIC_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_SOURCE_DIR}/modules
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${TOOL_NAME})
|
||||
|
||||
|
||||
@@ -103,8 +103,15 @@ bool StartDB()
|
||||
{
|
||||
MySQL::Library_Init();
|
||||
|
||||
// Load databases
|
||||
DatabaseLoader loader("dbimport");
|
||||
// Load modules conditionally based on what modules are allowed to auto-update or none
|
||||
std::string modules = sConfigMgr->GetOption<std::string>("Updates.AllowedModules", "all");
|
||||
LOG_INFO("dbimport", "Loading modules: {}", modules.empty() ? "none" : modules);
|
||||
|
||||
DatabaseLoader loader =
|
||||
modules.empty() ? DatabaseLoader("dbimport") :
|
||||
(modules == "all") ? DatabaseLoader("dbimport", DatabaseLoader::DATABASE_NONE, AC_MODULES_LIST) :
|
||||
DatabaseLoader("dbimport", DatabaseLoader::DATABASE_NONE, modules);
|
||||
|
||||
loader
|
||||
.AddDatabase(LoginDatabase, "Login")
|
||||
.AddDatabase(CharacterDatabase, "Character")
|
||||
|
||||
@@ -159,6 +159,17 @@ CharacterDatabase.SynchThreads = 1
|
||||
|
||||
Updates.EnableDatabases = 7
|
||||
|
||||
#
|
||||
# Updates.AllowedModules
|
||||
# Description: A list of modules that are allowed to be updated automatically by the DBImport tool.
|
||||
# If the list is empty, no modules are allowed to automatically update. (current behavior)
|
||||
# Default: "" - (No modules are allowed)
|
||||
#
|
||||
# Example: "mod_name,mod_name2,mod_name3" (selected modules)
|
||||
# "all" - (All modules are allowed)
|
||||
#
|
||||
Updates.AllowedModules = "all"
|
||||
|
||||
#
|
||||
# Updates.AutoSetup
|
||||
# Description: Auto populate empty databases.
|
||||
|
||||
Reference in New Issue
Block a user