Jump to content

Recommended Posts

  • 3 weeks later...
  • 1 year later...

For no damage skill, some may have this problem

int CHARACTER::GetArrowAndBow(LPITEM * ppkBow, LPITEM * ppkArrow, int iArrowCount)
{
	LPITEM pkBow;
	if (!(pkBow = GetWear(WEAR_WEAPON)) || pkBow->GetSubType() != WEAPON_BOW)
		return 0;

	LPITEM pkArrow;
#ifdef ENABLE_QUIVER_SYSTEM
	if (!(pkArrow = GetWear(WEAR_ARROW)) || pkArrow->GetType() != ITEM_WEAPON || (pkArrow->GetSubType() != WEAPON_ARROW && pkArrow->GetSubType() != WEAPON_QUIVER))
#else
	if (!(pkArrow = GetWear(WEAR_ARROW)) || pkArrow->GetType() != ITEM_WEAPON || pkArrow->GetSubType() != WEAPON_ARROW)
#endif
		return 0;

#ifdef ENABLE_QUIVER_SYSTEM
	if (pkArrow->GetSubType() == WEAPON_QUIVER)
		// iArrowCount = MIN(iArrowCount, pkArrow->GetSocket(0) > 0 ? pkArrow->GetSocket(0) - time(0) : 1);
		// iArrowCount = MIN(iArrowCount, pkArrow->GetSocket(0) - time(0));
		iArrowCount = MIN(iArrowCount, 1);
	else
		iArrowCount = MIN(iArrowCount, pkArrow->GetCount());
#else
	iArrowCount = MIN(iArrowCount, pkArrow->GetCount());
#endif

	*ppkBow = pkBow;
	*ppkArrow = pkArrow;

	return iArrowCount;
}

 

  • Good 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Honorable Member
On 1/29/2020 at 6:10 PM, Karbust said:

@xP3NG3Rx

I have a couple of bugs:

  • Normal arrows don't have any effect
  • Skills don't have any effect (only the skill "warmup" before shooting) while shooting, neither normal arrows nor the quiver

On Debug Target, the fly effects are not registered.

You also need to check whether the GetCaseCRC32(filename) is getting mismatches due to UpPeRcAse!=lowercase and backslashes \\\ vs slashes /// or not. (most of the new boss effects are not displayed because of this)

geeyoIs.png

like this: (GameLib\RaceMotionDataEvent.h)

			StringPath(strFlyFileName); //@fixme030
			dwFlyIndex = GetCaseCRC32(strFlyFileName.c_str(), strFlyFileName.length());

			// Register Fly
			CFlyingManager::Instance().RegisterFlyingData(strFlyFileName.c_str());

and also this one: (GameLib\FlyingInstance.cpp)

mFm0kKH.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Good 2
  • Love 4
Link to comment
Share on other sites

  • Honorable Member
12 minutes ago, ReFresh said:

it's a global fix for all default sources?

Yes, every source is affected. For the other registered effects (not fly), you should search for each GetCaseCRC32 call (a dozen) and fix the input with StringPath.

 

12 minutes ago, ReFresh said:

Did I do it right?

Yes

Edited by martysama0134
  • Metin2 Dev 1
  • Eyes 1
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.