mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 23:09:05 +00:00
Bugs fixes to Abilities
- Add Hit Scan to Laser - Switching Dimensions Ability fix - Chained Ability Targeting Conditions Fix - Chained Ability Previewing - Lang Keys Added
This commit is contained in:
1 parent
1569204d83
commit
48f6c162d5
9 files changed
+343
-76
No files matched your search
@@ -581,6 +581,51 @@ public class PlayerAbilityData extends AbstractDataAbilities implements IPlayerA
|
||||
interruptCurrentAbility(null, 0);
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// DIMENSION CHANGE RESET
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
/**
|
||||
* Fully reset ability state when changing dimensions.
|
||||
* Unlike interruptCurrentAbility(), this does NOT roll any cooldowns
|
||||
* and ensures the player can immediately use abilities in the new dimension.
|
||||
* Also re-syncs to client since the entity may be re-created.
|
||||
*/
|
||||
public void resetOnDimensionChange() {
|
||||
// Clean up any executing ability without rolling cooldowns
|
||||
if (currentAbility != null && currentAbility.isExecuting()) {
|
||||
removeTelegraph(currentAbility);
|
||||
currentAbility.cleanup();
|
||||
currentAbility.interrupt();
|
||||
stopAbilityAnimation();
|
||||
releaseRotationControl();
|
||||
releaseLockedPosition();
|
||||
}
|
||||
|
||||
// Clear chain state
|
||||
currentChain = null;
|
||||
chainEntryIndex = -1;
|
||||
chainDelayRemaining = -1;
|
||||
|
||||
// Clear all transient state
|
||||
currentAbility = null;
|
||||
currentAbilityKey = null;
|
||||
currentTarget = null;
|
||||
|
||||
// Reset cooldowns completely
|
||||
cooldownEndTime = 0;
|
||||
interruptCooldownRolled = false;
|
||||
|
||||
// Sync cleared state to client
|
||||
EntityPlayer player = playerData.player;
|
||||
if (player != null) {
|
||||
syncAbilityStateClear(player);
|
||||
}
|
||||
|
||||
// Re-sync ability data (unlocked list, selection) to client
|
||||
syncToClient();
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// DAMAGE HANDLING
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in new issue
Block a user