Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

 

Overview: This guide addresses a critical issue where the game server crashes when a Game Master (GM) uses the "IP" command while having a summoned pet. By implementing a simple code modification, you can eliminate this crash and improve server stability.

Step-by-Step Instructions

Step 1: Open the Source File

Begin by accessing the cmd_gm.cpp file within your game’s source code. This file contains the command definitions that the game recognizes.

Step 2: Search for the Command

Locate the following function within the file:

 
This is the hidden content, please

Step 3: Implement the Conditional Check

Below the do_item_purge command implementation, add the following code snippet:

 
This is the hidden content, please

Code Explanation

  1. Summoned Pet Check: The new conditional statement checks if there is an active pet. If so, it prevents the command from executing further.

  2. User Notification: If a player attempts to purge their inventory while a pet is summoned, a message is sent to inform them that the action cannot be completed at this time.

  3. Return Statement: The return; statement ensures that no further processing occurs once this condition is met, thus avoiding a server crash.

 

After implementing these changes, be sure to compile the code to apply the fix. This small adjustment will prevent the server from crashing during specific actions involving pets, ultimately enhancing the gaming experience for all players.

 

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...