Open
Conversation
Refactor rune handling and add support for a FastTravel rune plus per-item cooldowns. - Codigo/Acciones.bas: Reworked CompletarAccionFin to use a With UserList(UserIndex) block, consolidated action cleanup, and added handling for MesonSafePassage and new FastTravel rune types. Replaced hardcoded message IDs with named constants and simplified inventory/particle logic. - Codigo/Declares.bas: Updated e_RuneType ordering/values and added FastTravel enum value. - Codigo/FileIO.bas: Fixed INI key names for recall stones (Runetype, HastaMap/HastaX/HastaY) and added reading of a Cooldown field. - Codigo/InvUsuario.bas: Use the object's Cooldown to set the action timer (capped at 32766) instead of previously hardcoded timers per rune type. - Codigo/modMessageIDs.bas: Added message ID constants for successful teleport and invalid fast-travel origin. These changes enable configurable rune cooldowns, a new fast-travel rune behavior, and cleaner rune/action code paths. Ensure INI/object data uses the new key names and includes Cooldown values.
Replaced hardcoded numeric locale message IDs in Acciones.bas with descriptive constants for rune-related feedback (return home, teleport success, invalid rune, unusable in meson). Also removed an earlier .flags.Muerto conditional around determining the home city so the return-home path always computes and warps to the destination. Added three new constants in modMessageIDs.bas: MSG_SUCCESFULLY_RETURN_TO_HOME_CITY (1065), MSG_INVALID_RUNE (2080) and MSG_NOT_USABLE_INSIDE_MESON (2081). Minor cleanup of commented message lines.
Replace the inlined ReturnHome handling in CompletarAccionFin with a single HomeArrival(UserIndex) call to centralize home-teleport logic and reduce duplicated code. Also remove unused e_AccionBarra members (Resucitar, Intermundia, GoToPareja) from Declares.bas to clean up the enum. This simplifies maintenance; callers relying on the removed enum members should be updated accordingly.
Rename the action-completion routine from CompletarAccionFin to EndProgrammedAction and update all references. Updated trace/error labels accordingly in Codigo/Acciones.bas and Codigo/Protocol.bas. Refactored General.PasarSegundo to call EndProgrammedAction(i) instead of duplicating action-clear logic, and fixed several control-flow/indentation issues (missing End If/End With/Next placements) to ensure counters, portal and invasion timers are processed correctly. This centralizes the action-finalization behavior and resolves potential logic bugs in the per-second processing loop.
Replace temporary Map/x/y locals with direct obj.HastaMap/obj.HastaX/obj.HastaY arguments when calling WarpUserChar in Codigo/Acciones.bas, and remove the HechizoPortal subroutine plus its e_TipoHechizo.uPortal case in Codigo/modHechizos.bas. These changes clean up duplicated local variables and delete the portal spell handler from the spell dispatcher.
Add IsValidMapIndex and IsValidMapPosition to Codigo/ModMap.bas and remove duplicate map-validation code from Codigo/modFishing.bas. Also tidy modFishing: normalize formatting/spacing, align declarations, rename parameter to ObjectIndex in IsValidObjectIndex, clamp PoderCania before use, and make the random fish selection bounds handling more robust. Primarily refactor/cleanup and deduplicate logic; no major functional changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-Deleted old iao code
-Created a new type of consumable rune to fast travel between cities
-refactor and tidy up a lot of code