From a5773a41a8dafe64c8a8fc019d7d709e2a4901ab Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 4 Aug 2022 19:38:54 -0400 Subject: [PATCH] fix function names to match pret --- src/dexnav.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dexnav.c b/src/dexnav.c index 1cfd2a9a5c..fa5db45ef7 100644 --- a/src/dexnav.c +++ b/src/dexnav.c @@ -664,7 +664,7 @@ static bool8 DexNavPickTile(u8 environment, u8 areaX, u8 areaY, bool8 smallScan) { if (currMapType == MAP_TYPE_UNDERGROUND) { // inside (cave) - if (IsZCoordMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) + if (IsElevationMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) break; //occurs at same z coord scale = 440 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2) - (2 * (topX + topY)); @@ -681,7 +681,7 @@ static bool8 DexNavPickTile(u8 environment, u8 areaX, u8 areaY, bool8 smallScan) if (MetatileBehavior_IsSurfableWaterOrUnderwater(tileBehaviour)) { u8 scale = 320 - (smallScan * 200) - (GetPlayerDistance(topX, topY) / 2); - if (IsZCoordMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) + if (IsElevationMismatchAt(gObjectEvents[gPlayerAvatar.spriteId].currentElevation, topX, topY)) break; weight = (Random() % scale <= 1) && !MapGridIsImpassableAt(topX, topY); @@ -1341,8 +1341,8 @@ static u16 DexNavGenerateHeldItem(u16 species, u8 searchLevel) { u16 randVal = Random() % 100; u8 searchLevelInfluence = searchLevel >> 1; - u16 item1 = gBaseStats[species].item1; - u16 item2 = gBaseStats[species].item2; + u16 item1 = gBaseStats[species].itemCommon; + u16 item2 = gBaseStats[species].itemRare; // if both are the same, 100% to hold if (item1 == item2)