Jump to content
  • 1

HELP! Client crash when I try to attack without arrows


xUniverse

Question

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

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0
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

  • 0
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 11

      When Uninstalling Gaya System

    2. 11

      When Uninstalling Gaya System

    3. 11

      When Uninstalling Gaya System

    4. 11

      When Uninstalling Gaya System

    5. 11

      When Uninstalling Gaya System

    6. 11

      When Uninstalling Gaya System

    7. 11

      When Uninstalling Gaya System

    8. 11

      When Uninstalling Gaya System

    9. 8

      Use Items with the Effect of Use

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.