[DK-Quest #12641] - Death Comes From On High
After taking control of the eye of Acherus, the eye of Acherus automatically goes to New Avalon as planned, but due to the very slow manner, it is also possible to cast spells with the eye before reaching the destination.
Once arrived in New Avalon, it is not possible to go up or down with the eye immediately, it is necessary to advance a little before having this possibility.
https://www.youtube.com/watch?v=9V8KWMMa0aU
https://www.wowhead.com/quest=12641/death-comes-from-on-high
https://wowgaming.altervista.org/aowow/?quest=12641
master
https://github.com/azerothcore/azerothcore-wotlk/commit/9f690a37412c521fd0cd7a333d4cc0b554ccc905
Ubuntu 18.04
No custom
Bump, I can confirm that this is an issue.
MySQL [acore_world]> SELECT name, speed_walk, speed_run, scriptname FROM creature_template WHERE entry IN ('28511');
+----------------+------------+-----------+--------------------+
| name | speed_walk | speed_run | scriptname |
+----------------+------------+-----------+--------------------+
| Eye of Acherus | 1 | 1.14286 | npc_eye_of_acherus |
+----------------+------------+-----------+--------------------+
The above shows the default speeds for the NPC that you control, adjusting the speed_walk field makes the Eye of Acherus faster including when it's following the set path. I'm going to play around with it and get it close to retails speed, I'll also take a look at why the Scarlet Crusade NPCs don't aggro the Eye of Acherus when it gets within range.
EDIT:
void MovementInform(uint32 type, uint32 point) override
{
if (type == ESCORT_MOTION_TYPE || point !=0)
events.ScheduleEvent(EVENT_REGAIN_CONTROL, 1000);
}
The above code executes which gives you the ability to cast spells before it's reached the end of its set path. I think it may be because of "point != 0"? I wonder if you remove that and just check whether the type is != ESCORT_MOTION_TYPE. Once the set path has finished the type in theory should change. I'll test in the morning and edit to update.
switch (events.ExecuteEvent())
{
case EVENT_REMOVE_CONTROL:
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
SetControl(player, false);
}
break;
...
case EVENT_REGAIN_CONTROL:
if (Player* player = me->GetCharmerOrOwnerPlayerOrPlayerItself())
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
SetControl(player, true);
Talk(EYE_TEXT_CONTROL, player);
}
break;
}
EVENT_REMOVE_CONTROL is called in the InitializeAI() method, I've added a line of code to stun the Eye of Acherus by applying the UNIT_FLAG_STUNNED flag to the NPC. I've also further added a line of code to remove this flag when control is given back to the player. This looks to be effective at preventing the player from using the abilities whilst the Eye of Acherus is transporting along its set path. EDIT: I've further tested this and it works.
I'll further look into the issue causing the player to regain control too early and the slow speed that the Eye of Acherus travels at along its set path.
EDIT: I've resolved the issue causing the player to gain "control" of the Eye of Acherus too early. I've also further discovered that the Eye of Archerus's speed isn't affected by changes to the database under fields speed_walk and speed_run.
Just to update, I've been looking at the Scarlet NPCs aggroing issue, I don't see any reason for them not to aggro. The only thing I can think of doing is either scripting them using SmartAI to aggro on the Eye when it isn't using Shroud but, I'm not sure how to approach this. Any input would be appreciated :)
If you figure something out, that works, feel free to make a PR :)
I am definitely not against the idea of turning something from C++ to SAI :)
@iThorgrim-hub @Maurowin https://github.com/azerothcore/azerothcore-wotlk/pull/2939 fix here! :)
Most helpful comment
If you figure something out, that works, feel free to make a PR :)
I am definitely not against the idea of turning something from C++ to SAI :)