Trigger - SetSkill - #394
Conversation
WalkthroughThe pull request updates the Changes
Sequence Diagram(s)sequenceDiagram
participant FS as FieldSkill
participant FM as FieldManager
participant AS as AccelerationStructure
participant Client as Game Client
FS->>FM: Update method invoked (with SkillRecord & Position)
FM->>AS: Query nearby vibrate entities
AS-->>FM: Return list of FieldVibrateEntity objects
FM->>Client: Broadcast VibratePacket for each entity
sequenceDiagram
participant User as User Input
participant TC as TriggerCommand Dispatcher
participant List as ListCommand
participant Reset as ResetCommand
participant Run as RunCommand
User->>TC: Issue trigger command
alt Command is "list"
TC->>List: Execute trigger listing
List-->>TC: Return trigger count and states
else Command is "reset"
TC->>Reset: Execute trigger reset
Reset-->>TC: Confirm reset or report error
else Command is "run"
TC->>Run: Execute trigger run function
Run-->>TC: Return execution result or error
end
TC-->>User: Output command result
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
Maple2.Server.Game/Commands/TriggerCommand.cs (1)
22-46: 💡 Verification agent🧩 Analysis chain
Verify
session.Fieldusage.
InListCommand, you're usingsession.Field!with the null-forgiving operator. Confirm thatsession.Fieldis never null in all contexts where this command can be invoked, or consider adding a safeguard.Please run the following script to check how
session.Fieldis assigned or validated throughout the codebase:
🏁 Script executed:
#!/bin/bash fd -e cs --exec rg 'session\.Field'Length of output: 37411
Action Required: Safeguard against null
session.Fieldin ListCommand
Multiple parts of the codebase explicitly check ifsession.Fieldis null. Given these null-checks, using the null-forgiving operator (!) in theListCommand—specifically on the line initializingfieldTriggers—may lead to unexpected runtime errors ifsession.Fieldisn’t guaranteed to be non-null when the command executes. Consider adding a preliminary null-check in theHandlemethod, for example:
- Verify that
session.Fieldis non-null before enumerating triggers.if (session.Field is null) { ctx.Console.Out.WriteLine("Error: Field is not available."); return; }- Remove the null-forgiving operator once a safeguard is in place.
🧹 Nitpick comments (4)
Maple2.Server.Game/Trigger/TriggerContext.Field.cs (1)
325-340: Implementation improved for SetSkill method.The method has been enhanced to actually set skills instead of just logging. It now iterates through triggerIds, retrieves corresponding skills, validates their metadata, and adds them to the field with proper positioning.
Consider using a Dictionary lookup instead of FirstOrDefault for retrieving skills by triggerId, as this would be more efficient for large collections:
- Ms2TriggerSkill? skill = Field.Entities.Trigger.Skills.FirstOrDefault(x => x.TriggerId == triggerId); + if (!Field.Entities.Trigger.Skills.TryGetValue(triggerId, out Ms2TriggerSkill? skill) || skill == null) { + continue; + }This assumes you could refactor Field.Entities.Trigger.Skills to be a Dictionary<int, Ms2TriggerSkill> rather than a collection that requires linear search.
Maple2.Server.Game/Trigger/TriggerContext.Npc.cs (1)
63-64: Performance improvement: Materialized collection for better efficiencyConverting the LINQ query result to a List improves performance by:
- Materializing the results immediately instead of deferred execution
- Using
Count == 0on a List which is more efficient thanAny()on an IEnumerable- Avoiding re-evaluating the query when iterating in the foreach loop later
Maple2.Server.Game/Commands/TriggerCommand.cs (2)
48-91: Clarify usage for negative state index.
Using-1to reset a trigger is functional but not explicitly documented in the usage help. Consider adding an example or note in the command description to inform users that passing a negative state index performs a reset.Here is a small diff to clarify usage:
public ResetCommand(GameSession session) : base("reset", "Reset a specific trigger") { this.session = session; var triggerName = new Argument<string>("triggerName", "Name of the trigger to reset"); - var stateOption = new Option<int>(["--state", "-s"], () => -1, "State index to set"); + var stateOption = new Option<int>(["--state", "-s"], () => -1, "State index to set (use -1 to reset trigger)');
93-181: Enhance parameter parsing and trigger selection.
- Parsing booleans and integers (
bool.Parse,int.Parse) can throw exceptions if invalid input is passed. Consider graceful error handling to prevent unhandled exceptions.- Currently, the command retrieves only the first trigger in the field (
FirstOrDefault()), which might be insufficient if multiple triggers exist. Consider adding an argument to let users specify the trigger name they want to run.Below is a potential refactor to demonstrate specifying a trigger name:
- var functionName = new Argument<string>("functionName", "Name of the function to run"); - var parameters = new Argument<string[]>("parameters", "Parameters to pass to the function"); + var triggerArg = new Argument<string>("triggerName", "Name of the trigger to use"); + var functionName = new Argument<string>("functionName", "Name of the function to run"); + var parameters = new Argument<string[]>("parameters", () => Array.Empty<string>(), + "Parameters to pass to the function"); - AddArgument(functionName); + AddArgument(triggerArg); AddArgument(functionName); AddArgument(parameters); - this.SetHandler<InvocationContext, string, string[]>(Handle, functionName, parameters); + this.SetHandler<InvocationContext, string, string, string[]>(Handle, triggerArg, functionName, parameters); // Then, inside `Handle`: - FieldTrigger? trigger = session.Field.EnumerateTrigger().FirstOrDefault(); + FieldTrigger? trigger = session.Field.EnumerateTrigger() + .FirstOrDefault(t => t.Value.Name.Equals(triggerName, StringComparison.OrdinalIgnoreCase));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
Maple2.File.Ingest/Mapper/MapDataMapper.cs(1 hunks)Maple2.Model/Game/Field/FieldAccelerationStructure.cs(6 hunks)Maple2.Model/Metadata/FieldEntity/FieldEntity.cs(1 hunks)Maple2.Server.Game/Commands/DebugCommand.cs(1 hunks)Maple2.Server.Game/Commands/TriggerCommand.cs(2 hunks)Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs(2 hunks)Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs(1 hunks)Maple2.Server.Game/Model/Field/Entity/FieldSkill.cs(2 hunks)Maple2.Server.Game/Trigger/TriggerContext.Field.cs(3 hunks)Maple2.Server.Game/Trigger/TriggerContext.Npc.cs(1 hunks)
🧰 Additional context used
🧬 Code Definitions (5)
Maple2.Server.Game/Trigger/TriggerContext.Npc.cs (4)
Maple2.Server.Game/Model/Field/Entity/FieldMobSpawn.cs (1)
List(69-97)Maple2.Server.Game/Manager/Field/AgentNavigation.cs (3)
List(32-34)List(36-38)List(40-158)Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs (2)
FieldNpc(22-474)FieldNpc(97-128)Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.State.cs (2)
FieldNpc(106-126)FieldNpc(128-130)
Maple2.File.Ingest/Mapper/MapDataMapper.cs (1)
Maple2.Model/Metadata/FieldEntity/FieldEntity.cs (1)
FieldEntityId(24-30)
Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs (5)
Maple2.Server.Game/Model/Field/Entity/FieldEntity.cs (2)
FieldEntity(7-26)FieldEntity(16-21)Maple2.Server.Game/Model/Field/Actor/Actor.cs (1)
SkillRecord(214-232)Maple2.Server.Game/Model/Field/Actor/IActor.cs (1)
SkillRecord(29-29)Maple2.Server.Game/Manager/Field/FieldManager/IField.cs (1)
Broadcast(68-68)Maple2.Server.Game/GameServer.cs (1)
Broadcast(185-189)
Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs (2)
Maple2.Server.Game/Model/Field/Actor/ActorStateComponent/MovementState.cs (2)
MovementState(11-320)MovementState(37-48)Maple2.Server.Game/Model/Field/Actor/ActorStateComponent/MovementStateTasks/MovementState.WalkTask.cs (1)
MovementState(7-182)
Maple2.Server.Game/Commands/TriggerCommand.cs (1)
Maple2.Server.Game/Trigger/TriggerContext.Npc.cs (5)
SpawnMonster(22-27)SpawnMonster(47-50)MoveNpc(60-77)SetNpcEmotionSequence(154-159)DestroyMonster(29-45)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (14)
Maple2.Server.Game/Trigger/TriggerContext.Field.cs (1)
386-387: Improved logging level in RemoveBuff.Changed from error logging to debug logging, which is more appropriate for this routine operation.
Maple2.File.Ingest/Mapper/MapDataMapper.cs (1)
103-103:Details
✅ Verification successful
Updated constructor to match revised FieldEntityId signature
Added the new
string.Emptyparameter to align with the modifiedFieldEntityIdconstructor that now accepts a string ID parameter in addition to the numeric identifiers.Run the following script to verify that all other instantiations of
FieldEntityIdhave been properly updated:
🏁 Script executed:
#!/bin/bash # Find all instances of FieldEntityId constructor usage rg -A 1 "new FieldEntityId\(" --type csLength of output: 1653
FieldEntityId Constructor Update Verified Across the Codebase
The update in
MapDataMapper.cs—adding thestring.Emptyparameter to match the revisedFieldEntityIdconstructor—has been confirmed. The verification script output shows that all other usages (in both model and game modules) consistently pass three parameters, ensuring uniformity in instantiation.
- Maple2.Model/Metadata/FieldEntity/FieldEntity.cs uses
new FieldEntityId(high, low, id).- Maple2.Model/Game/Field/FieldAccelerationStructure.cs contains multiple updates using either
string.Emptyor correctly reading a string from a reader.- The targeted change in Maple2.File.Ingest/Mapper/MapDataMapper.cs aligns with these adjustments.
Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs (1)
241-242: Simplified case syntax for consistencyRemoved unnecessary braces around the return statement, making the code more consistent with other case statements in the switch block and improving readability.
Maple2.Model/Metadata/FieldEntity/FieldEntity.cs (2)
18-21: Enhanced FieldEntityId with string representationAdded a new string property to store the original ID representation, which is beneficial for debugging, serialization, or maintaining the original format without needing to reconstruct it.
24-30: Improved string parsing performanceEnhances the
FromStringmethod with more efficient string handling:
- Uses
ReadOnlySpan<char>andAsSpan()for more efficient string slicing without allocations- Uses
ulong.Parsewith explicitNumberStyles.HexNumberinstead ofConvert.ToUInt64- Properly passes the original string ID to the constructor
Maple2.Server.Game/Commands/DebugCommand.cs (1)
304-314: Great enhancement for vibrate object debugging!Adding the counter and displaying the total vibrate object count is a useful improvement for debugging. This will help track the number of vibrate objects in a specified area, making it easier to understand the visual effects distribution in the game.
Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs (2)
14-14: LGTM - Required imports addedThe new imports support the vibrate functionality implementation.
Also applies to: 21-21
567-577:Details
❓ Verification inconclusive
Well-implemented vibrate objects interaction method
The new
VibrateObjectsmethod effectively implements the functionality to trigger vibration effects on field objects when skills are used. The implementation correctly:
- Calculates the range based on the skill's attack range
- Guards against null AccelerationStructure
- Efficiently queries and broadcasts vibration packets to affected objects
The query uses twice the range distance (line 573), which expands the area of effect. This is likely intentional but worth confirming.
🏁 Script executed:
#!/bin/bash # Check if other range calculations in the codebase also double the distance rg "2 \* new Vector3\(.*range" --type csLength of output: 279
VibrateObjects Method Approved – Please Confirm the Expanded Range Behavior
The implementation is solid, with proper null-checks and broadcasting of vibration effects to entities. The method doubles the range—as seen in the call to
QueryVibrateObjectsCenterList(i.e.,2 * new Vector3(rangeDistance, rangeDistance, rangeDistance))—which appears to be intentional since no other parts of the codebase contradict this approach. Please confirm that the increased area of effect is by design.
- Null check for
AccelerationStructureis correctly applied.- The doubled range calculation is uniquely used in this function.
- If the expanded range is expected, no further changes are needed.
Maple2.Server.Game/Model/Field/Entity/FieldSkill.cs (2)
175-175: Good integration of vibrate functionality with skillsAdding the vibration effect before damage application ensures visual feedback is synchronized with gameplay. This enhances player experience by providing visual cues for skill impacts.
186-188: Performance optimization for target packet broadcastingThe conditional check before broadcasting target packets prevents unnecessary network traffic when no targets are hit. This is a good performance optimization, especially for AoE skills that might not always hit targets.
Maple2.Model/Game/Field/FieldAccelerationStructure.cs (2)
367-367: Consistent FieldEntityId structure updateThe changes to
FieldEntityIdinitialization properly integrate the new string parameter across the codebase. Using empty strings as defaults is appropriate for these initialization contexts.Also applies to: 522-523, 568-569, 809-810, 864-865, 872-873
737-738: Serialization update for FieldEntityIdThe added line ensures the string ID is properly written during serialization, maintaining data integrity when storing and retrieving field entities.
Maple2.Server.Game/Commands/TriggerCommand.cs (2)
14-14: Corrected command description.
This updated description better reflects the broadened scope of trigger management in this class.
17-19: Good use of subcommands.
Splitting trigger commands into separate subcommands (ListCommand,ResetCommand,RunCommand) improves clarity, maintainability, and adheres to the single responsibility principle.
Feat: Region Skill Vibrate Objects Reworked trigger command to add the ability of manually running trigger functions
02ee9fe to
986d79f
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (7)
Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs (1)
573-576: Consider performance optimization for large object countsWhile the current implementation works well, in scenarios with many vibrate objects, consider adding a maximum limit to the number of objects that can vibrate simultaneously to prevent potential performance issues.
-List<FieldVibrateEntity> vibrateObjects = AccelerationStructure.QueryVibrateObjectsCenterList(position, 2 * new Vector3(rangeDistance, rangeDistance, rangeDistance)); -foreach (FieldVibrateEntity vibrate in vibrateObjects) { - Broadcast(VibratePacket.Attack(vibrate.Id.Id, record)); -} +const int MaxVibrateObjectsCount = 50; // Adjust based on performance testing +List<FieldVibrateEntity> vibrateObjects = AccelerationStructure.QueryVibrateObjectsCenterList(position, 2 * new Vector3(rangeDistance, rangeDistance, rangeDistance)); + +// Take only a subset if there are too many objects to prevent performance issues +foreach (FieldVibrateEntity vibrate in vibrateObjects.Take(MaxVibrateObjectsCount)) { + Broadcast(VibratePacket.Attack(vibrate.Id.Id, record)); +}Maple2.Server.Game/Commands/TriggerCommand.cs (6)
107-122: Consider using constants for function names and enhancing trigger selectionThe function names are currently hardcoded as string literals. Using constants would improve maintainability.
Also, the code always selects the first trigger found, which may be confusing if multiple triggers exist in the map.
- functionName = functionName.ToLower(); - List<string> functionNames = ["set_skill", "spawn_monster", "move_npc", "set_npc_emotion_sequence", "destroy_monster"]; + functionName = functionName.ToLower(); + // Define constants for function names to improve maintainability + const string FN_SET_SKILL = "set_skill"; + const string FN_SPAWN_MONSTER = "spawn_monster"; + const string FN_MOVE_NPC = "move_npc"; + const string FN_SET_NPC_EMOTION = "set_npc_emotion_sequence"; + const string FN_DESTROY_MONSTER = "destroy_monster"; + + List<string> functionNames = [FN_SET_SKILL, FN_SPAWN_MONSTER, FN_MOVE_NPC, FN_SET_NPC_EMOTION, FN_DESTROY_MONSTER]; - FieldTrigger? trigger = session.Field.EnumerateTrigger().FirstOrDefault(); + // Consider adding an optional trigger name parameter to select a specific trigger + var triggerOption = new Option<string?>(["--trigger", "-t"], "Name of the trigger to use"); + AddOption(triggerOption); + + FieldTrigger? trigger; + if (!string.IsNullOrEmpty(triggerName)) + { + trigger = session.Field.EnumerateTrigger().FirstOrDefault(t => t.Value.Name == triggerName); + if (trigger is null) + { + ctx.Console.Error.WriteLine($"Trigger {triggerName} not found."); + return; + } + } + else + { + trigger = session.Field.EnumerateTrigger().FirstOrDefault(); + }
123-135: Add error handling for parse failures in set_skillThe current implementation might throw exceptions if the skill IDs aren't properly formatted numbers. Consider adding try-catch blocks to handle parse errors.
- var skillIds = parameters[0].Split(',').Select(int.Parse).ToArray(); - bool enabled = parameters.Length > 1 && bool.Parse(parameters[1]); + try { + var skillIds = parameters[0].Split(',').Select(int.Parse).ToArray(); + bool enabled = parameters.Length > 1 && bool.TryParse(parameters[1], out bool result) ? result : false; + + trigger.Context.SetSkill(skillIds, enabled); + } catch (FormatException) { + ctx.Console.Error.WriteLine("Error: Skill IDs must be comma-separated integers"); + return; + } - trigger.Context.SetSkill(skillIds, enabled);
135-146: Add error handling for parse failures in spawn_monsterSimilar to the set_skill command, this could benefit from error handling for parse failures.
- var spawnIds = parameters[0].Split(',').Select(int.Parse).ToArray(); - bool spawnAnimation = parameters.Length > 1 && bool.Parse(parameters[1]); + try { + var spawnIds = parameters[0].Split(',').Select(int.Parse).ToArray(); + bool spawnAnimation = parameters.Length > 1 && bool.TryParse(parameters[1], out bool result) ? result : false; + + trigger.Context.SpawnMonster(spawnIds, spawnAnimation, 0); + } catch (FormatException) { + ctx.Console.Error.WriteLine("Error: Spawn IDs must be comma-separated integers"); + return; + } - trigger.Context.SpawnMonster(spawnIds, spawnAnimation, 0);
146-157: Add error handling for parse failures in move_npcAdd try-catch blocks to handle potential parse errors for the spawn ID.
- int spawnId = int.Parse(parameters[0]); - string patrolName = parameters[1]; + try { + int spawnId = int.Parse(parameters[0]); + string patrolName = parameters[1]; + + trigger.Context.MoveNpc(spawnId, patrolName); + } catch (FormatException) { + ctx.Console.Error.WriteLine("Error: Spawn ID must be an integer"); + return; + } - trigger.Context.MoveNpc(spawnId, patrolName);
158-169: Add error handling for parse failures in set_npc_emotion_sequenceConsider adding try-catch blocks to handle potential parse errors for the spawn ID and duration.
- int npcSpawnId = int.Parse(parameters[0]); - string sequenceName = parameters[1]; - int duration = parameters.Length > 2 ? int.Parse(parameters[2]) : 0; + try { + int npcSpawnId = int.Parse(parameters[0]); + string sequenceName = parameters[1]; + int duration = parameters.Length > 2 ? int.Parse(parameters[2]) : 0; + + trigger.Context.SetNpcEmotionSequence(npcSpawnId, sequenceName, duration); + } catch (FormatException) { + ctx.Console.Error.WriteLine("Error: Spawn ID and duration must be integers"); + return; + } - trigger.Context.SetNpcEmotionSequence(npcSpawnId, sequenceName, duration);
169-179: Add error handling for parse failures in destroy_monsterConsider adding try-catch blocks to handle potential parse errors for the monster spawn IDs.
- int[] monsterSpawnIds = parameters[0].Split(',').Select(int.Parse).ToArray(); + try { + int[] monsterSpawnIds = parameters[0].Split(',').Select(int.Parse).ToArray(); + + trigger.Context.DestroyMonster(monsterSpawnIds, false); + } catch (FormatException) { + ctx.Console.Error.WriteLine("Error: Monster spawn IDs must be comma-separated integers"); + return; + } - trigger.Context.DestroyMonster(monsterSpawnIds, false);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
Maple2.File.Ingest/Mapper/MapDataMapper.cs(1 hunks)Maple2.Model/Game/Field/FieldAccelerationStructure.cs(6 hunks)Maple2.Model/Metadata/FieldEntity/FieldEntity.cs(1 hunks)Maple2.Server.Game/Commands/DebugCommand.cs(1 hunks)Maple2.Server.Game/Commands/TriggerCommand.cs(2 hunks)Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs(2 hunks)Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs(1 hunks)Maple2.Server.Game/Model/Field/Entity/FieldSkill.cs(2 hunks)Maple2.Server.Game/Trigger/TriggerContext.Field.cs(3 hunks)Maple2.Server.Game/Trigger/TriggerContext.Npc.cs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
- Maple2.Server.Game/Trigger/TriggerContext.Npc.cs
- Maple2.Server.Game/Commands/DebugCommand.cs
- Maple2.File.Ingest/Mapper/MapDataMapper.cs
- Maple2.Server.Game/Trigger/TriggerContext.Field.cs
- Maple2.Server.Game/Model/Field/Entity/FieldSkill.cs
- Maple2.Model/Metadata/FieldEntity/FieldEntity.cs
- Maple2.Model/Game/Field/FieldAccelerationStructure.cs
- Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs
🧰 Additional context used
🧬 Code Definitions (2)
Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs (2)
Maple2.Server.Game/Model/Field/Actor/FieldNpc.cs (1)
SkillRecord(355-371)Maple2.Server.Game/Manager/Field/FieldManager/IField.cs (1)
Broadcast(68-68)
Maple2.Server.Game/Commands/TriggerCommand.cs (1)
Maple2.Server.Game/Trigger/TriggerContext.Npc.cs (5)
SpawnMonster(22-27)SpawnMonster(47-50)MoveNpc(60-77)SetNpcEmotionSequence(154-159)DestroyMonster(29-45)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (8)
Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs (2)
14-14: Appropriate imports for the new functionalityThe added imports properly support the new vibration feature, with FieldEntity namespace for vibration entities and the Skill namespace for skill records.
Also applies to: 21-21
567-577: Well-implemented vibration effect functionalityThe
VibrateObjectsmethod effectively implements the vibration feature:
- Properly calculates range based on the skill's attack range
- Has a good null check for the acceleration structure
- Efficiently queries for vibration objects in range
- Correctly broadcasts the vibration effect to all players
The implementation aligns well with the PR objectives for enhancing region skills with vibration effects.
Maple2.Server.Game/Commands/TriggerCommand.cs (6)
14-14: Description update reflects expanded functionalityThe description now accurately reflects that this command manages triggers rather than just resetting them, which aligns with the new subcommands being introduced.
17-20: Good command structure with clear separation of concernsThe refactoring of functionality into separate subcommands (list, reset, run) improves code organization and follows command-line interface best practices.
22-46: ListCommand implementation is clean and effectiveThe ListCommand provides a useful way to enumerate and inspect triggers in the current map. The output formatting is clear and includes both trigger names and their associated states.
48-91: ResetCommand provides flexible trigger managementThe ResetCommand implementation correctly handles both full trigger resets and setting specific states. Error handling is properly implemented for cases like invalid trigger names or state indices.
93-106: RunCommand setup looks goodThe RunCommand class is well structured with appropriate arguments for function name and parameters.
180-182: Good success message upon function executionThe feedback to the user about successful function execution is clear and helpful.
| return; | ||
| } | ||
|
|
||
| List<FieldVibrateEntity> vibrateObjects = AccelerationStructure.QueryVibrateObjectsCenterList(position, 2 * new Vector3(rangeDistance, rangeDistance, rangeDistance)); |
There was a problem hiding this comment.
Does this take into consideration the shape of the skill?
Feat: Region Skill Vibrate Objects
Reworked trigger command to add the ability of manually running trigger functions
Summary by CodeRabbit
New Features
Refactor
FieldEntityIdto include an additional identifier for improved entity management.