mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 13:37:22 +00:00
Use radii from settings
Override the DB aggro and tether radii from the settings if they are present.
This commit is contained in:
parent
835cf2b794
commit
082a2a418f
@ -61,6 +61,15 @@ BaseCombatAIComponent::BaseCombatAIComponent(Entity* parent, const uint32_t id)
|
||||
|
||||
componentResult.finalize();
|
||||
|
||||
// Get aggro and tether radius from settings and use this if it is present. Only overwrite the
|
||||
// radii if it is greater than the one in the database.
|
||||
if (m_Parent) {
|
||||
auto aggroRadius = m_Parent->GetVar<float>(u"aggroRadius");
|
||||
m_AggroRadius = std::max(aggroRadius, m_AggroRadius);
|
||||
auto tetherRadius = m_Parent->GetVar<float>(u"tetherRadius");
|
||||
m_HardTetherRadius = std::max(tetherRadius, m_HardTetherRadius);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find skills
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user