Jump to content

HELP! Client crash when I try to attack without arrows


Recommended Posts

Hi,

I have a problem with my client, it crash when I click the left button to try to attack without enough arrows (it doesn't happen if I attack with the space bar)

I checked the syserr of client and game, but nothing.

I compiled my binary in debug mode to see what is wrong, but nothing again.

Any idea?

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hace 13 horas, _Sielu dijo:

crash is in bool CPythonPlayer::__HasEnoughArrow()

just use pItemData in case if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))

 

Thanks, 

This part of my function was good, but I found the problem in: if (CItemData::WEAPON_ARROW == pItemData->GetSubType()). 

Solved. 

### If someone has the same problem (and has NEW_ARROW_SYSTEM enabled), this is my fixed __HasEnoughArrow() function (in PythonPlayerSkill.cpp?

bool CPythonPlayer::__HasEnoughArrow()
{
	CItemData * pItemData;
	if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))
	if (CItemData::ITEM_TYPE_WEAPON == pItemData->GetType())
#ifdef ENABLE_NEW_ARROW_SYSTEM
	if (CItemData::WEAPON_ARROW == pItemData->GetSubType() || CItemData::WEAPON_UNLIMITED_ARROW == pItemData->GetSubType())
#else
	if (CItemData::WEAPON_ARROW == pItemData->GetSubType())
#endif
	{
		return true;
	}

	PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotShotError", Py_BuildValue("(is)", GetMainCharacterIndex(), "EMPTY_ARROW"));
	return false;
}

 

Link to comment
Share on other sites

Dnia 12.11.2018 o 17:20, xUniverse napisał:

Thanks, 

This part of my function was good, but I found the problem in: if (CItemData::WEAPON_ARROW == pItemData->GetSubType()). 

Solved. 

### If someone has the same problem (and has NEW_ARROW_SYSTEM enabled), this is my fixed __HasEnoughArrow() function (in PythonPlayerSkill.cpp?


bool CPythonPlayer::__HasEnoughArrow()
{
	CItemData * pItemData;
	if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))
	if (CItemData::ITEM_TYPE_WEAPON == pItemData->GetType())
#ifdef ENABLE_NEW_ARROW_SYSTEM
	if (CItemData::WEAPON_ARROW == pItemData->GetSubType() || CItemData::WEAPON_UNLIMITED_ARROW == pItemData->GetSubType())
#else
	if (CItemData::WEAPON_ARROW == pItemData->GetSubType())
#endif
	{
		return true;
	}

	PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotShotError", Py_BuildValue("(is)", GetMainCharacterIndex(), "EMPTY_ARROW"));
	return false;
}

 

Thank you bro.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.