-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix EmpyreanCrucibleInstance #5
base: 4.8
Are you sure you want to change the base?
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. |
game-server/data/handlers/ai/instance/empyreanCrucible/SpectralWarriorAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/WarriorPreceptorAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/EmpyreanArbiterAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/ArminosDrakyAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/EmpyreanAdministratorArminosAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/EmpyreanArbiterAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/EmpyreanRecordKeeperAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/PriestPreceptorElyosAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/KingConsierdAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/MagePreceptorAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/PriestPreceptorElyosAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/RM1337AI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/RM1337AI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/RM1337AI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/RM1337AI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/TakunGojiraAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/ai/instance/empyreanCrucible/VanktristAI.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
game-server/data/handlers/instance/crucible/EmpyreanCrucibleInstance.java
Outdated
Show resolved
Hide resolved
npc.getController().delete(); | ||
break; | ||
case 217502: | ||
sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_INSTANCE_COMPLETE_ROUND_IDARENA()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message IDs are not correct.
Example: STR_CHAT_IDArena_STAGE7_D_R1_Die
D
means dark faction (Asmodians). Each faction has their own message (Elyos haveL
)R1
means round 1,R2
round 2, and so on. Each round has their own messages.Die
means the message belongs to the death event of the npc.
There is alsoSkill1
,Skill2
and 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
19553 no longer gets cast in this AI. Was this an intentional change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also 19554, which could belong to this npc (haven't checked).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -28,11 +27,16 @@ protected void handleSpawned() { | |||
private void startEventTask() { | |||
ThreadPoolManager.getInstance().schedule(() -> { | |||
if (!isDead()) | |||
SkillEngine.getInstance().getSkill(getOwner(), 19554, 1, getOwner()).useNoAnimationSkill(); | |||
getOwner().queueSkill(19554, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
*/ | ||
@AIName("king_consierd") | ||
public class KingConsierdAI extends AggressiveNpcAI implements HpPhases.PhaseHandler { | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field can be removed by instantiating hpPhases via new HpPhases(100, 75, 25)
and starting the tasks from handleHpPhase
in case 100
.
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)