Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

In this guide, we will discuss how to modify the game code so that pets remain summoned even after the character dies or is teleported. This adjustment can enhance gameplay by maintaining a continuous companion experience, regardless of the character's status.

Step-by-Step Modifications

1. Update Input Files

First, open the input_login.cpp file. You will need to make a few adjustments:

  • Include Additional Headers

Find this line:

 
This is the hidden content, please

Just below it, add the following lines to include pet-related functionalities:

 
This is the hidden content, please
  • Modify Game Phase Logic

Next, locate this section in your code:

 
This is the hidden content, please

Add the following lines right beneath that:

 
This is the hidden content, please

This code ensures that the pet will be summoned upon game start if it was active when the character was last logged.

2. Modify Pet System Logic

Next, open PetSystem.cpp to make some necessary removals.

  • Eliminate Death Checks

Search and remove the following line:

 
This is the hidden content, please

This change is crucial because it allows pets to stay active even when their owner has perished.

3. Update Quest Lua Functions

Lastly, make adjustments in the questlua_pet.cpp file.

  • Include Required Headers

Find this line:

 
This is the hidden content, please

Add the following header right below it:

 
This is the hidden content, please
  • Update Boolean Check for Pet Summoning

Locate the following snippet:

 
This is the hidden content, please

You’ll need to insert these lines right after it to set the last summoned pet correctly:

 
This is the hidden content, please
  • Modify Unsummon Logic

Towards the end of a related function, you will see:

 
This is the hidden content, please

Replace this line with:

 
This is the hidden content, please

This will clear the pet status, ensuring it doesn't disappear unexpectedly.

 

With these modifications, you can ensure that pets remain summoned, improving the player's interactive experience even upon character death or teleportation. This continuous companionship can lead to more engaging gameplay, making it a worthwhile enhancement for your game dynamics.

Link to comment
Share on other sites


  • 100% changed the title to Pet Mechanics After Character Teleportation and Death

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