Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection * Added possibility to apply conditions to trajectory spells * Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received (cherry picked from commit c6060dd0c511ddad3cb1f0423aa9ccf2de7aedec)
This commit is contained in:
1 parent
a07f73c846
commit
9da4acce08
12 files changed
+105
-122
No files matched your search
@@ -104,13 +104,13 @@ struct npc_grim_batol_twilight_beguiler : public ScriptedAI
|
||||
Position pos = gronn->GetHomePosition();
|
||||
pos.SetOrientation(pos.GetOrientation() + (float)M_PI / 1.5f);
|
||||
|
||||
if (pos.HasInLine(&me->GetHomePosition(), 15.0f))
|
||||
if (pos.HasInLine(&me->GetHomePosition(), 15.0f, 0.f))
|
||||
DoCastSelf(SPELL_ENSLAVE_GRONN_COSMETIC_LEFT);
|
||||
else
|
||||
{
|
||||
pos = gronn->GetHomePosition();
|
||||
pos.SetOrientation(pos.GetOrientation() - (float)M_PI / 1.5f);
|
||||
if (pos.HasInLine(&me->GetHomePosition(), 15.0f))
|
||||
if (pos.HasInLine(&me->GetHomePosition(), 15.0f, 0.f))
|
||||
DoCastSelf(SPELL_ENSLAVE_GRONN_COSMETIC_RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -752,7 +752,7 @@ struct npc_brazie_fertilitize_o_tron_2000 : public ScriptedAI
|
||||
Position pos = me->GetPosition();
|
||||
pos.SetOrientation(pos.GetAngle(spitterTarget));
|
||||
|
||||
if (pos.HasInLine(who, 5.0f))
|
||||
if (pos.HasInLine(who, 5.0f, 0.f))
|
||||
CreatureAI::AttackStart(who);
|
||||
}
|
||||
}
|
||||
@@ -855,7 +855,7 @@ struct npc_brazie_spot : public ScriptedAI
|
||||
Position pos = me->GetPosition();
|
||||
pos.SetOrientation(pos.GetAngle(spitterTarget));
|
||||
|
||||
if (pos.HasInLine(who, 5.0f))
|
||||
if (pos.HasInLine(who, 5.0f, 0.f))
|
||||
{
|
||||
me->SetFacingToObject(spitterTarget);
|
||||
me->SetNoCallAssistance(true);
|
||||
@@ -989,7 +989,7 @@ struct npc_brazie_zombie : public ScriptedAI
|
||||
Position pos = me->GetPosition();
|
||||
pos.SetOrientation(pos.GetAngle(GoalStalkerPositions[_pathIndex]));
|
||||
|
||||
if (pos.HasInLine(who, 4.8f))
|
||||
if (pos.HasInLine(who, 4.8f, 0.f))
|
||||
{
|
||||
if (Creature* target = who->ToCreature())
|
||||
{
|
||||
|
||||
@@ -658,7 +658,7 @@ struct npc_alakir_ice_storm : public ScriptedAI
|
||||
std::vector<Position> possibleDestinations;
|
||||
for (Position destination : _iceStormPositions)
|
||||
{
|
||||
if (pos.HasInLine(&destination, alakir->GetCombatReach()))
|
||||
if (pos.HasInLine(&destination, alakir->GetCombatReach(), 0.f))
|
||||
possibleDestinations.push_back(destination);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user