[Summoning] Make Summon a bit more live like (#1539)

Pretty sure the distance should probably be melee range / 2 but ahh
yeah. Can't do that. Hopefully 5 units isn't too far.
This commit is contained in:
Michael Cook (mackal)
2021-09-19 16:19:29 -04:00
committed by GitHub
parent df9d6bc506
commit 80493719f2
3 changed files with 36 additions and 2 deletions
+9 -2
View File
@@ -2838,10 +2838,17 @@ bool Mob::HateSummon() {
if(summon_level == 1) {
entity_list.MessageClose(this, true, 500, Chat::Say, "%s says 'You will not evade me, %s!' ", GetCleanName(), target->GetCleanName() );
auto new_pos = m_Position;
float angle = new_pos.w - target->GetHeading();
new_pos.w = target->GetHeading();
// probably should be like half melee range, but we can't get melee range nicely because reasons :)
new_pos = target->TryMoveAlong(new_pos, 5.0f, angle);
if (target->IsClient())
target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_Position.x, m_Position.y, m_Position.z, target->GetHeading(), 0, SummonPC);
target->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), new_pos.x, new_pos.y, new_pos.z, new_pos.w, 0, SummonPC);
else
target->GMMove(m_Position.x, m_Position.y, m_Position.z, target->GetHeading());
target->GMMove(new_pos.x, new_pos.y, new_pos.z, new_pos.w);
return true;
} else if(summon_level == 2) {