mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-27 13:13:10 -04:00
Fixed issue occurring when a city region location could not decipher into a fictional name.
This commit is contained in:
Regular → Executable
+6
-2
@@ -648,8 +648,11 @@ public class locations extends script.base_script
|
||||
{
|
||||
return null;
|
||||
}
|
||||
location locGoodLocation = new location();
|
||||
string_id strFictionalName = utils.unpackString(rgnCity.getName());
|
||||
if(strFictionalName == null){
|
||||
LOG("mission_spam", "Can't unpack city name (" + rgnCity.getName() + ") to get fictional name.");
|
||||
return null;
|
||||
}
|
||||
String strAsciiId = strFictionalName.getAsciiId();
|
||||
LOG("mission_spam", "strAsciiId is " + strAsciiId);
|
||||
int regionType = regions.getDeliverMissionRegionType(strAsciiId);
|
||||
@@ -658,10 +661,11 @@ public class locations extends script.base_script
|
||||
LOG("mission_spam", "strPlanet is " + strPlanet);
|
||||
if (rgnGoodLocations == null)
|
||||
{
|
||||
LOG("mission_spam", "No regions were foind of type " + regionType);
|
||||
LOG("mission_spam", "No regions were found of type " + regionType);
|
||||
return null;
|
||||
}
|
||||
region rgnSpawnRegion = rgnGoodLocations[rand(0, rgnGoodLocations.length - 1)];
|
||||
location locGoodLocation = new location();
|
||||
locGoodLocation = getRegionCenter(rgnSpawnRegion);
|
||||
return locGoodLocation;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user