mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-28 16:16:27 +00:00
feat(Core/Config): rework config and delete ACE inherited (#4608)
This commit is contained in:
@@ -336,7 +336,6 @@ void PetAI::UpdateAI(uint32 diff)
|
||||
delete itr->second;
|
||||
}
|
||||
|
||||
|
||||
// Update speed as needed to prevent dropping too far behind and despawning
|
||||
me->UpdateSpeed(MOVE_RUN, true);
|
||||
me->UpdateSpeed(MOVE_WALK, true);
|
||||
|
||||
@@ -1839,7 +1839,6 @@ void Creature::LoadSpellTemplateImmunity()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Creature::IsImmunedToSpell(SpellInfo const* spellInfo)
|
||||
{
|
||||
if (!spellInfo)
|
||||
|
||||
@@ -897,7 +897,6 @@ bool Object::PrintIndexError(uint32 index, bool set) const
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Position::operator==(Position const& a)
|
||||
{
|
||||
return (G3D::fuzzyEq(a.m_positionX, m_positionX) &&
|
||||
|
||||
@@ -2140,7 +2140,7 @@ bool Guild::Validate()
|
||||
_SetLeaderGUID(pLeader);
|
||||
|
||||
// Check config if multiple guildmasters are allowed
|
||||
if (!sConfigMgr->GetBoolDefault("Guild.AllowMultipleGuildMaster", 0))
|
||||
if (!sConfigMgr->GetOption<bool>("Guild.AllowMultipleGuildMaster", 0))
|
||||
for (Members::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (itr->second->GetRankId() == GR_GUILDMASTER && !itr->second->IsSamePlayer(m_leaderGuid))
|
||||
itr->second->ChangeRank(GR_OFFICER);
|
||||
|
||||
@@ -2303,7 +2303,6 @@ bool Map::HasEnoughWater(WorldObject const* searcher, LiquidData liquidData) con
|
||||
return liquidData.level > INVALID_HEIGHT && liquidData.level > liquidData.depth_level && liquidData.level - liquidData.depth_level >= minHeightInWater;
|
||||
}
|
||||
|
||||
|
||||
char const* Map::GetMapName() const
|
||||
{
|
||||
return i_mapEntry ? i_mapEntry->name[sWorld->GetDefaultDbcLocale()] : "UNNAMEDMAP\x0";
|
||||
|
||||
@@ -1131,7 +1131,6 @@ bool PathGenerator::IsSwimmableSegment(float const* v1, float const* v2, bool ch
|
||||
return IsSwimmableSegment(v1[2], v1[0], v1[1], v2[2], v2[0], v2[1], checkSwim);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief predict if a certain segment is underwater and the unit can swim
|
||||
* Must only be used for very short segments since this check doesn't work on
|
||||
|
||||
@@ -65,7 +65,6 @@ bool ChaseMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
(owner->CanFly())
|
||||
; // closes "bool forceDest", that way it is more appropriate, so we can comment out crap whenever we need to
|
||||
|
||||
|
||||
Unit* target = i_target.getTarget();
|
||||
|
||||
bool const mutualChase = IsMutualChase(owner, target);
|
||||
@@ -272,7 +271,6 @@ bool FollowMovementGenerator<T>::DoUpdate(T* owner, uint32 time_diff)
|
||||
(i_target->GetTypeId() == TYPEID_PLAYER && i_target->ToPlayer()->IsGameMaster()) // for .npc follow
|
||||
; // closes "bool forceDest", that way it is more appropriate, so we can comment out crap whenever we need to
|
||||
|
||||
|
||||
i_recheckDistance.Update(time_diff);
|
||||
if (i_recheckDistance.Passed())
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@ protected:
|
||||
FollowerReference i_target;
|
||||
};
|
||||
|
||||
|
||||
template<class T>
|
||||
class ChaseMovementGenerator : public MovementGeneratorMedium<T, ChaseMovementGenerator<T>>, public TargetedMovementGeneratorBase
|
||||
{
|
||||
|
||||
@@ -30,13 +30,13 @@ PacketLog* PacketLog::instance()
|
||||
|
||||
void PacketLog::Initialize()
|
||||
{
|
||||
std::string logsDir = sConfigMgr->GetStringDefault("LogsDir", "");
|
||||
std::string logsDir = sConfigMgr->GetOption<std::string>("LogsDir", "");
|
||||
|
||||
if (!logsDir.empty())
|
||||
if ((logsDir.at(logsDir.length() - 1) != '/') && (logsDir.at(logsDir.length() - 1) != '\\'))
|
||||
logsDir.push_back('/');
|
||||
|
||||
std::string logname = sConfigMgr->GetStringDefault("PacketLogFile", "");
|
||||
std::string logname = sConfigMgr->GetOption<std::string>("PacketLogFile", "");
|
||||
if (!logname.empty())
|
||||
_file = fopen((logsDir + logname).c_str(), "wb");
|
||||
}
|
||||
|
||||
@@ -222,9 +222,9 @@ WorldSocketMgr* WorldSocketMgr::instance()
|
||||
int
|
||||
WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
{
|
||||
m_UseNoDelay = sConfigMgr->GetBoolDefault ("Network.TcpNodelay", true);
|
||||
m_UseNoDelay = sConfigMgr->GetOption<bool> ("Network.TcpNodelay", true);
|
||||
|
||||
int num_threads = sConfigMgr->GetIntDefault ("Network.Threads", 1);
|
||||
int num_threads = sConfigMgr->GetOption<int32> ("Network.Threads", 1);
|
||||
|
||||
if (num_threads <= 0)
|
||||
{
|
||||
@@ -239,9 +239,9 @@ WorldSocketMgr::StartReactiveIO (uint16 port, const char* address)
|
||||
sLog->outBasic ("Max allowed socket connections %d", ACE::max_handles());
|
||||
|
||||
// -1 means use default
|
||||
m_SockOutKBuff = sConfigMgr->GetIntDefault ("Network.OutKBuff", -1);
|
||||
m_SockOutKBuff = sConfigMgr->GetOption<int32> ("Network.OutKBuff", -1);
|
||||
|
||||
m_SockOutUBuff = sConfigMgr->GetIntDefault ("Network.OutUBuff", 65536);
|
||||
m_SockOutUBuff = sConfigMgr->GetOption<int32> ("Network.OutUBuff", 65536);
|
||||
|
||||
if (m_SockOutUBuff <= 0)
|
||||
{
|
||||
|
||||
@@ -238,4 +238,3 @@ WardenCheckResult const* WardenCheckMgr::GetWardenResultById(uint16 Id)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user