Fix EmpyreanCrucibleInstance#5
Conversation
|
Hey, I finally found the time to review your changes (couldn't test them though). There are quite a few occurrences of If you need more information about the instance and the AIs, you would have to extract it from the 4.6 PTS leak. Ofc, you can contact me on discord if you need help analyzing the retail data. In summary, it would be nice to remove the SkillEngine calls and handle this with the SkillQueue instead. |
| npc.getController().delete(); | ||
| break; | ||
| case 217502: | ||
| sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_INSTANCE_COMPLETE_ROUND_IDARENA()); |
There was a problem hiding this comment.
This does not compile due to the missing parameter. It also looks like this message should be used in other places too, as well as STR_MSG_INSTANCE_START_ROUND_IDARENA and STR_MSG_INSTANCE_JOIN_ROUND_IDARENA.
| @Override | ||
| public void handleHpPhase(int phaseHpPercent) { | ||
| switch (phaseHpPercent) { | ||
| case 100 -> PacketSendUtility.broadcastMessage(getOwner(), 0); // FIXME |
There was a problem hiding this comment.
The message ID is missing here.
| PacketSendUtility.broadcastMessage(getOwner(), 1500210); // STR_CHAT_IDArena_STAGE7_D_R1_Die TODO correct msg | ||
| startPhaseTask(); | ||
| } | ||
| case 50 -> PacketSendUtility.broadcastMessage(getOwner(), 1500211); // STR_CHAT_IDArena_STAGE7_L_R2_Skill1 TODO different msg for L/D |
There was a problem hiding this comment.
The message IDs are not correct.
Example: STR_CHAT_IDArena_STAGE7_D_R1_Die
Dmeans dark faction (Asmodians). Each faction has their own message (Elyos haveL)R1means round 1,R2round 2, and so on. Each round has their own messages.Diemeans the message belongs to the death event of the npc.
There is alsoSkill1,Skill2and so on, which corresponds to a specific skill cast event. Not sure if messages are tied to certain skill IDs or if it's a random chance on each skill cast.
| public void handleBackHome() { | ||
| super.handleBackHome(); | ||
| hpPhases.reset(); | ||
| ThreadPoolManager.getInstance().schedule(() -> getOwner().queueSkill(19612, 46), 1000); |
There was a problem hiding this comment.
All skill casts in this file have changed to skill level 46. Is this correct?
| @Override | ||
| public void run() { | ||
| if (!isDead()) { | ||
| SkillEngine.getInstance().getSkill(getOwner(), 19553, 10, target).useNoAnimationSkill(); |
There was a problem hiding this comment.
19553 no longer gets cast in this AI. Was this an intentional change?
There was a problem hiding this comment.
There is also 19554, which could belong to this npc (haven't checked).
There was a problem hiding this comment.
Are all marabata and marabata_controller changes related to this instance? Because the handlers are used in Dark Poeta.
The marabata AI even spawns other npcs at Dark Poeta coordinates, so you at least need to modify those AIs or extend / copy them.
| ThreadPoolManager.getInstance().schedule(() -> { | ||
| if (!isDead()) | ||
| SkillEngine.getInstance().getSkill(getOwner(), 19554, 1, getOwner()).useNoAnimationSkill(); | ||
| getOwner().queueSkill(19554, 1); |
There was a problem hiding this comment.
Queueing a skill on spawn does not cast it immediately, and only if the npc has aggro towards a target in range.
Therefore skills cast on spawn should not use queueSkill.
|
|
||
| private final HpPhases hpPhases = new HpPhases(75, 25); | ||
| private AtomicBoolean isHome = new AtomicBoolean(true); | ||
| private final AtomicBoolean isHome = new AtomicBoolean(true); |
There was a problem hiding this comment.
This field can be removed by instantiating hpPhases via new HpPhases(100, 75, 25) and starting the tasks from handleHpPhase in case 100.
6bb2c97 to
693f741
Compare
I tried to do the best I could with the time I had, I wasn't able to test as much as I would have liked. I believe that adjustments and even npcAI may be missing. I need more information to be able to do a better job, if someone could test and point out the errors I could correct them all.
Changes:
(https://www.youtube.com/watch?v=dDTlv5iKlr4&list=PL7519772E07E8BE68&index=1)