Jump to content

MiniFix - Reset Skill Group - Client Bug


ondry

Recommended Posts

  • Bronze

When you reset your skill group more then once in a row, you will get this weird bug when you cant see the real skill level + cant use the skills until you relog. With this fix you dont need to relog anymore.

Video explaining the bug: https://www.youtube.com/watch?v=P3_MpfmH9dk

To fix that, we need to change just 1 line - in file ClientSRC/UserInterface/PythonNetworkStreamPhaseGame.cpp in the function bool CPythonNetworkStream::RecvChangeSkillGroupPacket()

change the line

CPythonPlayer::Instance().NEW_ClearSkillData();

to

CPythonPlayer::Instance().NEW_ClearSkillData(true);

 

This bug happened because old skill data were not removed from m_skillSlotDict. With passing parameter "true" to function NEW_ClearSkillData, everything (including old bugged skill data) will be removed from m_skillSlotDict. Then function RefreshCharacter from uiCharacter.py will automatically insert correct data to the m_skillSlotDict.

  • Metin2 Dev 8
  • Lmao 2
  • Good 3
  • Love 15
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 years later...

While apparently this resolve the issue you've showed in the video, it's not the real fix as it will erase every skill slot you have including support, horse and guild witch Refresh Character won't handle.

 

The real problem relays in this block of code from CPythonPlayer::NEW_ClearSkillData:

	for (it = m_skillSlotDict.begin(); it != m_skillSlotDict.end();)
	{
		if (bAll || __GetSkillType(it->first) == CPythonSkill::SKILL_TYPE_ACTIVE)
			it = m_skillSlotDict.erase(it);
		else
			++it;
	}

Long story short, somewhere in the code you have a map in witch you insert the skill index first and the associated slot second. Fucking ymir is sending the skill index to CPythonPlayer::__GetSkillType(DWORD dwSkillSlotIndex) witch expects the skill slot to find the skill index to retrive skill data! Funny, no?

 

The fix:

Replace 

if (bAll || __GetSkillType(it->first) == CPythonSkill::SKILL_TYPE_ACTIVE)

With

if (bAll || __GetSkillType(it->second) == CPythonSkill::SKILL_TYPE_ACTIVE)

 

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.