Jump to content

Fix Quest Core Downer


cBaraN

Recommended Posts

I and the other servers' author are having a strange problem which crashes the game file. I solved the problem in a few days. I won't tell you how to do it because most people will try to do it.

 

The problem is starting with accessing invalid address in the memory. It might cause lag or something else. The game file can't access m_stCurQuest (because it's invalid). The problem only happens when the quest contains select at least I have that problem. I just added a string variable in QuestState called quest_name. If quest_name is not empty, the game file will use quest_name of QuestState instead of GetCurrentQuestName().

Open "quest.h" file, search "int        st;" and under;
 

std::string quest_name;

Open "questlua.cpp" file, search "qs.suspend_state = SUSPEND_STATE_SELECT; and under;
 

qs.quest_name = GetCurrentPC() ? GetCurrentPC()->GetCurrentQuestName() : "no_quest";

Open "questlua_quest.cpp" file, search "QuestState* pQS = pPC->GetRunningQuestState();" and under;
 

std::string stQuestName = pPC->GetCurrentQuestName();
	if (pQS->quest_name.length() != 0)
		stQuestName = pQS->quest_name;

 

  • Confused 2
  • Love 5
Link to comment
Share on other sites

30 minutes ago, Cyber36 said:

Without knowing how you caused the core downer / bug, we can't really test it and we don't know if we need it.

But thank you either.

Yeah, but it will not make a problem, bcs otherwise it is necessary in the code, if we would like to work like a programmer and if we want a looks good code. This modification is correct.

  • Love 1
Link to comment
Share on other sites

3 hours ago, Cyber36 said:

Without knowing how you caused the core downer / bug, we can't really test it and we don't know if we need it.

But thank you either.

You have a point about that. However, this core-down is not always happening. You have to try hard to crash the game file if you have time. The problem is only starting when the quest contains a select command at least I have that problem. This problem does exist in the default source codes too. By the way, thank you for your comment.

Link to comment
Share on other sites

On 10/15/2018 at 3:43 PM, PeaceMaker said:

I just wonder why would a quest not have a name at any point? :o

 

Maybe with a little python script, you could send quest packets to the server, without "name".... i guess.

System Administrator @ Hungarian Government
System Administrator @ Vibestro
Freelancer Developer @ Various projects

Link to comment
Share on other sites

  • 2 weeks later...
Dnia 14.10.2018 o 23:02, cBaraN napisał:

I and the other servers' author are having a strange problem which crashes the game file. I solved the problem in a few days. I won't tell you how to do it because most people will try to do it.

 

The problem is starting with accessing invalid address in the memory. It might cause lag or something else. The game file can't access m_stCurQuest (because it's invalid). The problem only happens when the quest contains select at least I have that problem. I just added a string variable in QuestState called quest_name. If quest_name is not empty, the game file will use quest_name of QuestState instead of GetCurrentQuestName().

Open "quest.h" file, search "int        st;" and under;
 


std::string quest_name;

Open "questlua.cpp" file, search "qs.suspend_state = SUSPEND_STATE_SELECT; and under;
 


qs.quest_name = GetCurrentPC() ? GetCurrentPC()->GetCurrentQuestName() : "no_quest";

Open "questlua_quest.cpp" file, search "QuestState* pQS = pPC->GetRunningQuestState();" and under;
 


std::string stQuestName = pPC->GetCurrentQuestName();
	if (pQS->quest_name.length() != 0)
		stQuestName = pQS->quest_name;

 

Ok thats nice! 

 

But we need this if we dont know how to check it? 

 

Tell us how to use this. 

Link to comment
Share on other sites

  • 2 weeks later...
  • 9 months later...
  • Honorable Member

Completely bullshit. You are declaring stQuestName:

	std::string stQuestName = pPC->GetCurrentQuestName();
	if (pQS->quest_name.length() != 0)
		stQuestName = pQS->quest_name;

But where is the control or check? You don't use it... why???

  • Love 2

 

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.