this code avoid this by checking if $char is defined. also it checks if char is "switch" and display relevant message
(imo no one switches acc like that so i think it will not be a problem)
the other change is relevant to poseidon. since we cannot be on char select screen anymore i switched to a smaller map
if there is any reason for the poseidon to be on new_1-1 just remove specific content
Code: Select all
Index: Misc.pm
===================================================================
--- Misc.pm (revision 7930)
+++ Misc.pm (working copy)
@@ -1175,7 +1175,13 @@
if (@chars) {
push @choices, T('Delete a character');
} else {
- message T("There are no characters on this account.\n"), "connection";
+ if ($config{char} ne "switch" && defined($char)) {
+ message("No characters found besides previous records.\nUse \"conf char switch\" if you switched account.\n");
+ relog(30);
+ return;
+ } else {
+ message T("There are no characters on this account.\n"), "connection";
+ }
}
my $choice = $interface->showMenu(
Index: Poseidon/RagnarokServer.pm
===================================================================
--- Poseidon/RagnarokServer.pm (revision 7930)
+++ Poseidon/RagnarokServer.pm (working copy)
@@ -151,7 +151,7 @@
## constants
my $accountID = pack("a4", "acct");
my $posX = 53;
-my $posY = 111;
+my $posY = 113;
## Globals
my $charID = pack("a4", "char");
@@ -321,7 +321,7 @@
$clientdata{$index}{mode} = unpack('C1', substr($msg, 2, 1));
# '0071' => ['received_character_ID_and_Map', 'a4 Z16 a4 v1', [qw(charID mapName mapIP mapPort)]],
- my $mapName = pack("a16", "new_1-1.gat");
+ my $mapName = pack("a16", "moc_prydb1.gat");
my $data = pack("C*", 0x71, 0x00) . $charID . $mapName .
pack("C*", $ipElements[0], $ipElements[1], $ipElements[2], $ipElements[3]) . $port;