1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| Procedure Send_CMD_AUTH_LOGON_CHALLENGE;
Var
CMD_AUTH_LOGON_CHALLENGE : T_CMD_AUTH_LOGON_CHALLENGE;
PacketSize : word;
i : word;
lst : TStringList;
Begin
CMD_AUTH_LOGON_CHALLENGE.Opcode := 0;
CMD_AUTH_LOGON_CHALLENGE.Error := 3;
PacketSize := (SizeOf(CMD_AUTH_LOGON_CHALLENGE)-SizeOf(CMD_AUTH_LOGON_CHALLENGE.AccountName))+length(AccountName);
CMD_AUTH_LOGON_CHALLENGE.Size := PacketSize-(4);
Fill_array(CMD_AUTH_LOGON_CHALLENGE.GameName, 'WoW', true);
lst := TStringList.Create;
lst.Text:= Game_Version;
lst.text := StringReplace(lst.text,'.',#13#10,[rfReplaceAll]);
for i:=0 to lst.count-1 do begin
CMD_AUTH_LOGON_CHALLENGE.Gameversion[i]:=StrToInt(lst.Strings[i]);
end;
CMD_AUTH_LOGON_CHALLENGE.GameBuild := Game_Build;
Fill_array(CMD_AUTH_LOGON_CHALLENGE.Platform, 'x86', true);
Fill_array(CMD_AUTH_LOGON_CHALLENGE.OperatingSystem, 'Win', true);
Fill_array(CMD_AUTH_LOGON_CHALLENGE.Area, 'frFR', true);
CMD_AUTH_LOGON_CHALLENGE.TimeZone := 60;
Local_IP := GStack.LocalAddress;
lst.Text:= Local_IP;
lst.Text := StringReplace(lst.text,'.',#13#10,[rfReplaceAll]);
for i:=0 to lst.count-1 do begin
CMD_AUTH_LOGON_CHALLENGE.ClientIP[i] := StrToInt(lst.Strings[i])
end;
SetLength(CMD_AUTH_LOGON_CHALLENGE.AccountName, length(AccountName));
CMD_AUTH_LOGON_CHALLENGE.AccoutNameLen := length(AccountName);
for i:=Low(CMD_AUTH_LOGON_CHALLENGE.AccountName) to High(CMD_AUTH_LOGON_CHALLENGE.AccountName) do begin
CMD_AUTH_LOGON_CHALLENGE.AccountName[i] := byte(Upcase(AccountName[i+1]));
end;
Form1.IdTCPClient1.WriteBuffer(CMD_AUTH_LOGON_CHALLENGE, PacketSize, true);
lst.Free;
End; |
Partager