diff --git a/src/Globals.pm b/src/Globals.pm index 70e70b5b2b..7216474c6d 100644 --- a/src/Globals.pm +++ b/src/Globals.pm @@ -27,7 +27,7 @@ use Modules 'register'; our %EXPORT_TAGS = ( - config => [qw(%arrowcraft_items %avoid @chatResponses %cities_lut %config %consoleColors %directions_lut %equipTypes_lut %equipSlot_rlut %equipSlot_lut %haircolors @headgears_lut @msgTable %items_control %items_lut %itemSlotCount_lut %itemsDesc_lut %itemTypes_lut %itemOptionHandle %itemOption_lut %jobs_lut %maps_lut %masterServers %monsters_lut %npcs_lut %packetDescriptions %portals_lut @portals_lut_missed %responses %sex_lut %shop %banking %buyer_shop %skillsDesc_lut %lookHandle %skillsArea %skillsEncore %spells_lut %emotions_lut %timeout $char %mon_control %priority %routeWeights %pickupitems %rpackets %itemSlots_lut %statusHandle %statusName %effectName %hatEffectHandle %hatEffectName %portals_los %stateHandle %ailmentHandle %mapTypeHandle %mapPropertyTypeHandle %mapPropertyInfoHandle %elements_lut %mapAlias_lut %quests_lut $Blacksmith_Blessing %itemStackLimit %title_lut %attendance_rewards)], + config => [qw(%arrowcraft_items %avoid @chatResponses %cities_lut %config %consoleColors %directions_lut %equipTypes_lut %equipSlot_rlut %equipSlot_lut %haircolors @headgears_lut @msgTable %items_control %items_lut %itemSlotCount_lut %itemsDesc_lut %itemTypes_lut %itemOptionHandle %itemOption_lut %jobs_lut %maps_lut %masterServers %monsters_lut %npcs_lut %packetDescriptions %pets_lut %portals_lut @portals_lut_missed %responses %sex_lut %shop %banking %buyer_shop %skillsDesc_lut %lookHandle %skillsArea %skillsEncore %spells_lut %emotions_lut %timeout $char %mon_control %priority %routeWeights %pickupitems %rpackets %itemSlots_lut %statusHandle %statusName %effectName %hatEffectHandle %hatEffectName %portals_los %stateHandle %ailmentHandle %mapTypeHandle %mapPropertyTypeHandle %mapPropertyInfoHandle %elements_lut %mapAlias_lut %quests_lut $Blacksmith_Blessing %itemStackLimit %title_lut %attendance_rewards)], ai => [qw(@ai_seq @ai_seq_args %ai_v %targetTimeout)], state => [qw($accountID $cardMergeIndex @cardMergeItemsID $charID @chars @chars_old @friendsID %friends %incomingFriend $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 $storageTitle @arrowCraftID %guild %incomingGuild @spellsID %spells @unknownPlayers @unknownNPCs $useArrowCraft %currentDeal %incomingDeal %outgoingDeal @identifyID @partyUsersID %incomingParty @petsID %pets $venderItemList $venderID $venderCID @venderListsID @buyerItemList @selfBuyerItemList $buyerID $buyingStoreID @buyerListsID @articles $articles %venderLists %buyerLists %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 %elementals $elementalsList @elementalsID @playerNameCacheIDs %playerNameCache %pet $pvp $cashList $slavesList @slavesID %slaves %cashShop $skillExchangeItem $refineUI %clan %universalCatalog $mergeItemList)], network => [qw($remote_socket $net $messageSender $charServer $conState $conState_tries $encryptVal $ipc $bus $masterServer $lastSwitch $packetParser $clientPacketHandler $bytesSent $incomingMessages $outgoingClientMessages $enc_val1 $enc_val2 $captcha_state)], @@ -112,6 +112,7 @@ our %mon_control; our %monsters_lut; our %npcs_lut; our %packetDescriptions; +our %pets_lut; our %portals_los; our %portals_lut; our @portals_lut_missed; diff --git a/src/Misc.pm b/src/Misc.pm index 4118081518..6bfcdce4a6 100644 --- a/src/Misc.pm +++ b/src/Misc.pm @@ -2325,7 +2325,7 @@ sub monsterName { my $ID = shift; return 'Unknown' unless defined($ID); return 'None' unless $ID; - return $monsters_lut{$ID} || "Unknown #$ID"; + return $monsters_lut{$ID} || $pets_lut{$ID} || "Unknown #$ID"; } # Resolve the name of a simple item diff --git a/src/functions.pl b/src/functions.pl index 98ebc3a391..241e16d891 100644 --- a/src/functions.pl +++ b/src/functions.pl @@ -242,6 +242,8 @@ sub loadDataFiles { loader => [\&parseROLUT, \%maps_lut]); Settings::addTableFile('monsters.txt', loader => [\&parseDataFile2, \%monsters_lut], createIfMissing => 1); + Settings::addTableFile('pets.txt', + loader => [\&parseDataFile2, \%pets_lut], mustExist => 0); Settings::addTableFile('npcs.txt', loader => [\&parseNPCs, \%npcs_lut], createIfMissing => 1); Settings::addTableFile('packetdescriptions.txt', diff --git a/tables/pets.txt b/tables/pets.txt new file mode 100644 index 0000000000..7a634635a8 --- /dev/null +++ b/tables/pets.txt @@ -0,0 +1,95 @@ +1002 poring +1011 chonchon +1014 spore +1019 pecopeco +1023 ork_warrior +1026 munak +1029 isis +1031 poporing +1035 hunter_fly +1040 GOLEM +1042 steel_chonchon +1049 picky +1052 rocker +1056 smokie +1057 yoyo +1063 lunatic +1077 poison_spore +1090 mastering +1096 angeling +1101 baphomet_j +1107 desert_wolf_babe +1109 deviruchi +1110 dokebi +1113 drops +1122 goblin_1 +1123 goblin_2 +1125 goblin_4 +1143 MARIONETTE +1148 MEDUSA +1155 petit +1166 savage +1167 savage_babe +1170 sohee +1179 WHISPER +1180 nine_tail +1188 bon_gun +1200 zherlthsh +1208 wander_man +1213 high_orc +1214 choco +1242 MARIN +1245 gobline_xmas +1275 alice +1299 GOBLIN_LEADER +1301 am_mut +1307 cat_o_nine_tail +1369 grand_peco +1370 SUCCUBUS +1374 INCUBUS +1379 NIGHTMARE_TERROR +1382 diabolic +1385 deleter_ +1401 SHINOBI +1404 MIYABI_NINGYO +1416 WICKED_NYMPH +1495 STONE_SHOOTER +1504 DULLAHAN +1505 LOLI_RURI +1512 hyegun +1513 CIVIL_SERVANT +1519 CHUNG_E +1586 LEAF_CAT +1622 teddy_bear +1630 BACSOJIN_ +1631 CHUNG_E +1632 gremlin +1815 event_ricecake +1837 IMP +1879 ECLIPSE_P +1963 P_CHUNG_E +2200 J_TAINI +2210 JT_XMAS_LUNATIC +2313 TIKBALANG +2336 DOMOVOI +2398 LITTLE_PORING +3261 BLUE_UNICORN +3306 PAD_TAMADORA +3317 PAD_RUBYLIT +3318 PAD_SAPPHILIT +3319 PAD_EMELIT +3320 PAD_TOPALIT +3321 PAD_AMELIT +3349 PAD_MYTHLIT +3350 PAD_TYRRA +3351 PAD_TYRANNOS +3352 PAD_PLESSIE +3353 PAD_PLESIOS +3354 PAD_BRACHY +3355 PAD_BRACHYS +3495 dr_eggring +3496 dr_lunatic +3636 LITTLE_ISIS +3669 diabolic2 +3670 deleter_2 +3731 scatleton