Code: Select all
Index: Field.pm
===================================================================
--- Field.pm (revision 6828)
+++ Field.pm (working copy)
@@ -44,7 +44,7 @@
use Compress::Zlib;
use File::Spec;
-use Globals qw($masterServer %field);
+use Globals qw($masterServer %field %resnametable_lut);
use Modules 'register';
use Settings;
use FastUtils;
@@ -356,19 +356,13 @@
# Some fields have multiple names, but have the same field data nevertheless.
# For example, the newbie grounds (new_1-1, new_2-1, etc.) all look the same,
# even though they're different fields and may have different monsters.
- # Take care of that.
- if ($name =~ /^new_\d-(\d)$/) {
- $name = "new_zone0$1";
- } elsif ($name =~ /^force_\d-(\d)$/) {
- $name = "force_map$1";
- } elsif ($name =~ /^pvp_n_\d-2$/) {
- $name = "job_hunter";
- } elsif ($name =~ /^pvp_n_\d-3$/) {
- $name = "job_wizard";
- } elsif ($name =~ /^pvp_n_\d-5$/) {
- $name = "job_knight";
+ # Take care of that.
+ if($resnametable_lut{"$name.gat"}){
+ $baseName = $resnametable_lut{"$name.gat"};
+ $baseName =~ s/\.gat$/.fld/i;
+ } else {
+ $baseName = "$name.fld";
}
- $baseName = "$name.fld";
}
return $baseName;
Index: FileParsers.pm
===================================================================
--- FileParsers.pm (revision 6828)
+++ FileParsers.pm (working copy)
@@ -654,7 +654,7 @@
}
sub parseROLUT {
- my ($file, $r_hash) = @_;
+ my ($file, $r_hash, $flag) = @_;
my %ret = (
file => $file,
@@ -672,7 +672,7 @@
my ($id, $name) = split /#/, $line, 3;
if ($id ne "" && $name ne "") {
- $name =~ s/_/ /g;
+ $name =~ s/_/ /g if (!$flag);
$r_hash->{$id} = $name;
}
}
Index: functions.pl
===================================================================
--- functions.pl (revision 6828)
+++ functions.pl (working copy)
@@ -178,6 +178,7 @@
Settings::addTableFile('packetdescriptions.txt', loader => [\&parseSectionedFile, \%packetDescriptions]);
Settings::addTableFile('portals.txt', loader => [\&parsePortals, \%portals_lut]);
Settings::addTableFile('portalsLOS.txt', loader => [\&parsePortalsLOS, \%portals_los]);
+ Settings::addTableFile('resnametable.txt', loader => [\&parseROLUT, \%resnametable_lut, 1]);
Settings::addTableFile('servers.txt', loader => [\&parseSectionedFile, \%masterServers]);
Settings::addTableFile('sex.txt', loader => [\&parseDataFile2, \%sex_lut]);
Settings::addTableFile('skills.txt', loader => \&Skill::StaticInfo::parseSkillsDatabase);
Index: Globals.pm
===================================================================
--- Globals.pm (revision 6828)
+++ Globals.pm (working copy)
@@ -26,7 +26,7 @@
# Do not use any other Kore modules here. It will create circular dependancies.
our %EXPORT_TAGS = (
- config => [qw(%arrowcraft_items %avoid @chatResponses %cities_lut %config %consoleColors %directions_lut %equipTypes_lut %equipSlot_rlut %equipSlot_lut %haircolors @headgears_lut %items_control %items_lut %itemSlotCount_lut %itemsDesc_lut %itemTypes_lut %jobs_lut %maps_lut %masterServers %monsters_lut %npcs_lut %packetDescriptions %portals_lut %responses %sex_lut %shop %skillsDesc_lut %skillsLooks %skillsArea %skillsEncore %skillsSP_lut %spells_lut %emotions_lut %timeout $char %mon_control %priority %routeWeights %pickupitems %rpackets %itemSlots_lut %skillsStatus %portals_los %skillsState %skillsAilments %elements_lut)],
+ config => [qw(%arrowcraft_items %avoid @chatResponses %cities_lut %config %consoleColors %directions_lut %equipTypes_lut %equipSlot_rlut %equipSlot_lut %haircolors @headgears_lut %items_control %items_lut %itemSlotCount_lut %itemsDesc_lut %itemTypes_lut %jobs_lut %maps_lut %masterServers %monsters_lut %npcs_lut %packetDescriptions %portals_lut %responses %sex_lut %shop %skillsDesc_lut %skillsLooks %skillsArea %skillsEncore %skillsSP_lut %spells_lut %emotions_lut %timeout $char %mon_control %priority %routeWeights %pickupitems %rpackets %itemSlots_lut %skillsStatus %portals_los %skillsState %skillsAilments %elements_lut %resnametable_lut)],
ai => [qw(@ai_seq @ai_seq_args %ai_v $AI $AI_forcedOff %targetTimeout)],
state => [qw($accountID $cardMergeIndex @cardMergeItemsID $charID @chars @chars_old %cart @friendsID %friends %incomingFriend %field $field %homunculus $itemsList @itemsID %items $monstersList @monstersID %monsters @npcsID %npcs $npcsList @playersID %players @portalsID @portalsID_old %portals %portals_old $portalsList @storeList $currentChatRoom @currentChatRoomUsers @chatRoomsID %createdChatRoom %chatRooms @skillsID %storage @storageID @arrowCraftID %guild %incomingGuild @spellsID %spells @unknownPlayers @unknownNPCs $statChanged $skillChanged $useArrowCraft %currentDeal %incomingDeal %outgoingDeal @identifyID @partyUsersID %incomingParty @petsID %pets @venderItemList $venderID @venderListsID @articles $articles %venderLists %monsters_old @monstersID_old %npcs_old %items_old %players_old @playersID_old @servers $sessionID $sessionID2 $accountSex $accountSex2 $map_ip $map_port $KoreStartTime $secureLoginKey $initSync $lastConfChangeTime $petsList $playersList $portalsList @playerNameCacheIDs %playerNameCache %pet $pvp @cashList %repairList $slavesList @slavesID %slaves)],
network => [qw($remote_socket $net $messageSender $charServer $conState $conState_tries $encryptVal $ipc $bus $lastPacketTime $masterServer $lastswitch $packetParser $bytesSent $bytesReceived $incomingMessages $outgoingClientMessages $enc_val1 $enc_val2)],
@@ -106,6 +106,7 @@
our %portals_los;
our %portals_lut;
our %priority;
+our %resnametable_lut;
our %responses;
our %routeWeights;
our %rpackets;