Skip to content

Commit

Permalink
Merge pull request #84 from Dyshay/hotfix
Browse files Browse the repository at this point in the history
#Release 1.1.3
  • Loading branch information
Dyshay authored Feb 26, 2020
2 parents 1373137 + a0916ab commit 58a3c7b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
29 changes: 24 additions & 5 deletions Comun/Frames/Autentificacion/AccountLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void GetWelcomeKeyAsync(TcpClient prmClient, string prmPacket)

account.AccountState = AccountStates.CONNECTED;
account.welcomeKey = prmPacket.Substring(2);
prmClient.SendPacket("1.30.14");
prmClient.SendPacket("1.31.2");
prmClient.SendPacket(prmClient.account.accountConfig.accountUsername + "\n" + Hash.Crypt_Password(prmClient.account.accountConfig.accountPassword, prmClient.account.welcomeKey));
prmClient.SendPacket("Af");
}
Expand All @@ -44,7 +44,7 @@ public void GetServerState(TcpClient prmClient, string prmPacket)
GameServer server = account.game.server;
bool firstTime = true;

foreach(string sv in serverList)
foreach (string sv in serverList)
{
string[] separator = sv.Split(';');

Expand All @@ -64,7 +64,7 @@ public void GetServerState(TcpClient prmClient, string prmPacket)
}
}

if(!firstTime && server.serverState == ServerStates.ONLINE)
if (!firstTime && server.serverState == ServerStates.ONLINE)
prmClient.SendPacket("Ax");
}

Expand All @@ -90,7 +90,7 @@ public void GetServerList(TcpClient prmClient, string prmPacket)

if (serverId == account.game.server.serverId)
{
if(account.game.server.serverState == ServerStates.ONLINE)
if (account.game.server.serverState == ServerStates.ONLINE)
{
picked = true;
account.game.character.evento_Servidor_Seleccionado();
Expand All @@ -101,7 +101,7 @@ public void GetServerList(TcpClient prmClient, string prmPacket)
counter++;
}

if(picked)
if (picked)
prmClient.SendPacket($"AX{account.game.server.serverId}", true);
}

Expand All @@ -111,5 +111,24 @@ public void GetServerSelection(TcpClient prmClient, string prmPacket)
prmClient.account.gameTicket = prmPacket.Substring(14);
prmClient.account.SwitchToGameServer(Hash.Decrypt_IP(prmPacket.Substring(3, 8)), Hash.Decrypt_Port(prmPacket.Substring(11, 3).ToCharArray()));
}

[PaqueteAtributo("AYK")]
public void GetServerSelectionRemastered(TcpClient prmClient, string prmPacket)
{
string[] DataPackage = prmPacket.Substring(3).Split(';');

if (DataPackage.Length != 0)
{
prmClient.account.gameTicket = DataPackage[1];
prmClient.account.SwitchToGameServer(DataPackage[0], 443);
prmClient.account.Logger.LogInfo("[BOT]", "Connexion au world server");
}
else
{
prmClient.account.Logger.LogError("[BOT]", "Redirection world impossible");
prmClient.account.Disconnect();
prmClient.account.Logger.LogError("[BOT]", "Déconnexion effectuée");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private async Task cleanInventory(Account account,int idcapture = 0, int idCAC =

foreach (InventoryObject objeto in inventario.objetos)
{
if (!objeto.objeto_esta_equipado() && (idcapture !=0 && objeto.id_modelo != idcapture) && (objeto.id_modelo != idCAC && idCAC != 0 ))
if (!objeto.objeto_esta_equipado() && idcapture != objeto.id_modelo && idCAC != objeto.id_modelo)
{
account.connexion.SendPacket($"EMO+{objeto.id_inventario}|{objeto.cantidad}");
inventario.eliminar_Objeto(objeto, 0, false);
Expand Down

0 comments on commit 58a3c7b

Please sign in to comment.