Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

spacer.png

 

To optimize gameplay experience in dungeons and other specified areas, it's crucial to refine the mechanics of mount usage. This guide provides detailed steps for implementing restrictions on mounting rides within certain maps, ensuring fair play and enhancing overall immersion for users.

Complete Code Implementation Steps

The modifications will span several files, focusing on enabling conditions under which players can mount their rides in different areas of the game.


Step 1: Update the Character File char.cpp

Open the char.cpp file and find the existing definition for summonable zones. Add the following function to define mountable zones:

 
This is the hidden content, please

This function checks if a player is attempting to ride in restricted zones, preventing them from doing so.


Step 2: Modify the Map Type Definitions in common/length.h

Add the following map types enumeration to ensure clarity on which locations control mount usage:

 
This is the hidden content, please

These constants will aid in quickly identifying map types when implementing mount restrictions.


Step 3: Adjust Logic in char_item.cpp

Find and update the item-related logic to ensure the checking of mountable zones is applied. Include the following condition:

  1. Before checking if the item is a ride item, add the mount zone check:
 
This is the hidden content, please
  1. Next, ensure this check is added in the section dealing with riding items:
 
This is the hidden content, please
  1. Finally, for costume mounts:
 
This is the hidden content, please

Step 4: Update Command Logic in cmd_general.cpp

In the command handling functions, implement necessary checks like so:

 
This is the hidden content, please

Step 5: Make Login Input Changes in input_login.cpp

Include the mount zone check when players enter the game:

 
This is the hidden content, please

Step 6: Implement Unmount Functionality

In the char.cpp file, ensure that the unmount function operates correctly. Insert the following code:

 
This is the hidden content, please

This function handles unmounting and related effects cleanly.


Step 7: Update Character Header in char.h

Ensure the public API reflects the unmount capability:

 
This is the hidden content, please

Final Step: Add Configuration Flags in commonDefines.h

Add the necessary flags to enable the features we’ve implemented:

 
This is the hidden content, please

 

By systematically implementing these changes, players will experience regulated mount usage in specific dungeon scenarios and other special areas. This not only enhances gameplay but also ensures fairer conditions.

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...