mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 03:06:38 +00:00
[Quest API] Expand SaveGuardSpot (#2258)
* Expand SaveGuardSpot - Adds -- mob:saveguardspot() -- mob:saveguardspot(true) * Perl Support Thanks to KinglyKrab for the perl implementation.
This commit is contained in:
@@ -557,6 +557,20 @@ void NPC::SetWaypointPause()
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::SaveGuardSpot(bool ClearGuardSpot) {
|
||||
if (ClearGuardSpot) {
|
||||
LogAI("Clearing guard order.");
|
||||
m_GuardPoint = glm::vec4();
|
||||
} else {
|
||||
m_GuardPoint = m_Position;
|
||||
|
||||
if (m_GuardPoint.w == 0) {
|
||||
m_GuardPoint.w = 0.0001; //hack to make IsGuarding simpler
|
||||
}
|
||||
LogAI("Setting guard position to {0}", to_string(static_cast<glm::vec3>(m_GuardPoint)));
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::SaveGuardSpot(const glm::vec4 &pos)
|
||||
{
|
||||
m_GuardPoint = pos;
|
||||
|
||||
Reference in New Issue
Block a user