Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

spacer.png

 

This feature ensures that when you are engaged in fishing, you cannot be attacked by other players, enhancing the security of your gameplay experience.

Modifications in InstanceBase.h

To begin, we need to declare a new function within the header file:

 
This is the hidden content, please

This function will help determine if a player is in a valid water area while fishing.

Updates in InstanceBase.cpp

Next, we will implement the function below the existing code that checks if the instance is a game master:

 
This is the hidden content, please

This code iterates through the surrounding area of the player to verify if they are positioned in a water zone.

Changes in Attack Logic

Now, we need to modify the logic that determines whether a target can be attacked. Locate the following snippet:

 
This is the hidden content, please

In the section where the condition checks for player characters (PC), you should find:

 
This is the hidden content, please

Here, you should add the following checks to prevent attacks on players who are fishing:

 
This is the hidden content, please

This modification ensures that if the victim is in fishing mode and in water, they become invulnerable to attacks.


Conclusion

Implementing these changes will add a protective mechanism to your game, allowing players to fish without the worry of being attacked. Enjoy a safe and immersive fishing experience!

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