Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

  • Administrator

Original Code: In the original code, it checks whether an active quest is running for the player before performing an operation on the safebox. If the quest is active, the operation is interrupted, preventing the player from performing the operation on the safebox.

Modified Code: In the modified code, the same condition check is performed but with a more readable approach. The player object (pc) is obtained using quest::CQuestManager::Instance().GetPCForce(ch->GetPlayerID()). It then checks if this object exists (pc != nullptr) and if the player has an active quest (pc->IsRunning()). If so, the operation on the safebox is aborted.

This change makes the code more readable and enhances its clarity, making it easier for other developers to understand how the code works. It also allows for a more flexible modification of the code in the future, in case additional changes to the logic of this part of the game are needed.

 

game -> input_main.cpp

Find:

This is the hidden content, please

Change to:

This is the hidden content, please

 

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