Skip to content

Commit

Permalink
Correção do Path de contas
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-tardivo-dart committed Jun 25, 2020
1 parent e3b2f8a commit d10b676
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Source/Client/Source/Forms/Editors/FrmEditor_VisualWarp.vb
Expand Up @@ -32,10 +32,10 @@ Friend Class frmEditor_VisualWarp

If lstMaps.SelectedIndex < 0 Then Exit Sub

If File.Exists(Application.StartupPath & "\Database\Cache\Map" & lstMaps.SelectedIndex + 1 & ".png") Then
If File.Exists(Application.StartupPath & "\Dados\Cache\Map" & lstMaps.SelectedIndex + 1 & ".png") Then
g = picPreview.CreateGraphics

Dim mapsprite As Bitmap = New Bitmap(Application.StartupPath & "\Database\Cache\Map" & lstMaps.SelectedIndex + 1 & ".png")
Dim mapsprite As Bitmap = New Bitmap(Application.StartupPath & "\Dados\Cache\Map" & lstMaps.SelectedIndex + 1 & ".png")

picPreview.Width = mapsprite.Width
picPreview.Height = mapsprite.Height
Expand Down
2 changes: 1 addition & 1 deletion Source/Server/Source/Modules/Network/S_NetworkReceive.vb
Expand Up @@ -1290,7 +1290,7 @@ Module S_NetworkReceive
' Prevenir hacking
If GetPlayerAccess(index) < AdminType.Creator Then Exit Sub

filename = Application.StartupPath & "\database\banlist.txt"
filename = Application.StartupPath & "\Dados\banlist.txt"

If File.Exists(filename) Then Kill(filename)

Expand Down
26 changes: 13 additions & 13 deletions Source/Server/Source/Modules/S_Database.vb
Expand Up @@ -791,13 +791,13 @@ Module modDatabase
#Region "Accounts"

Function AccountExist(Name As String) As Boolean
Return File.Exists(Application.StartupPath & "\Database\Contas\" & Trim$(Name) & "\Data.bin")
Return File.Exists(Application.StartupPath & "\Dados\Contas\" & Trim$(Name) & "\Data.bin")
End Function

Function PasswordOK(Name As String, Password As String) As Boolean
If Not AccountExist(Name) Then Return False
Dim reader As New ByteStream()
BinaryFile.Load(Application.StartupPath & "\Database\Contas\" & Trim$(Name) & "\Data.bin", reader)
BinaryFile.Load(Application.StartupPath & "\Dados\Contas\" & Trim$(Name) & "\Data.bin", reader)
If reader.ReadString().Trim <> Name.Trim Then Return False
Return reader.ReadString().Trim.ToUpper = Password.Trim.ToUpper
End Function
Expand All @@ -812,7 +812,7 @@ Module modDatabase
End Sub

Sub DeleteName(Name As String)
TextFile.RemoveString(Application.StartupPath & "\Database\Contas\charlist.txt", Name.Trim.ToLower)
TextFile.RemoveString(Application.StartupPath & "\Dados\Contas\charlist.txt", Name.Trim.ToLower)
End Sub

#End Region
Expand All @@ -829,7 +829,7 @@ Module modDatabase

Sub SavePlayer(index As Integer)
Dim playername As String = Trim$(Player(index).Login)
Dim filename As String = Application.StartupPath & "\Database\Contas\" & playername
Dim filename As String = Application.StartupPath & "\Dados\Contas\" & playername
CheckDir(filename) : filename += "\Data.bin"

Dim writer As New ByteStream(9 + Player(index).Login.Length + Player(index).Password.Length)
Expand All @@ -847,7 +847,7 @@ Module modDatabase
End Sub

Sub LoadPlayer(index As Integer, Name As String)
Dim filename As String = Application.StartupPath & "\Database\Contas\" & Name.Trim() & "\Data.bin"
Dim filename As String = Application.StartupPath & "\Dados\Contas\" & Name.Trim() & "\Data.bin"
ClearPlayer(index)

Dim reader As New ByteStream()
Expand Down Expand Up @@ -883,7 +883,7 @@ Module modDatabase
#Region "Bank"

Friend Sub LoadBank(index As Integer, Name As String)
Dim filename As String = Application.StartupPath & "\Database\Contas\" & Name.Trim() & "\Bank.bin"
Dim filename As String = Application.StartupPath & "\Dados\Contas\" & Name.Trim() & "\Bank.bin"

ClearBank(index)

Expand All @@ -896,7 +896,7 @@ Module modDatabase
End Sub

Sub SaveBank(index As Integer)
Dim filename = Application.StartupPath & "\Database\Contas\" & Player(index).Login.Trim() & "\Bank.bin"
Dim filename = Application.StartupPath & "\Dados\Contas\" & Player(index).Login.Trim() & "\Bank.bin"

SaveObject(Bank(index), filename)
End Sub
Expand Down Expand Up @@ -1071,7 +1071,7 @@ Module modDatabase
End Sub

Sub LoadCharacter(index As Integer, CharNum As Integer)
Dim filename As String = Application.StartupPath & "\Database\Contas\" & Player(index).Login.Trim & "\" & CharNum & ".bin"
Dim filename As String = Application.StartupPath & "\Dados\Contas\" & Player(index).Login.Trim & "\" & CharNum & ".bin"

ClearCharacter(index, CharNum)

Expand All @@ -1080,7 +1080,7 @@ Module modDatabase
End Sub

Sub SaveCharacter(index As Integer, CharNum As Integer)
Dim filename As String = Application.StartupPath & "\Database\Contas\" & Player(index).Login.Trim & "\" & CharNum & ".bin"
Dim filename As String = Application.StartupPath & "\Dados\Contas\" & Player(index).Login.Trim & "\" & CharNum & ".bin"
SaveObject(Player(index).Character(CharNum), filename)
End Sub

Expand Down Expand Up @@ -1235,7 +1235,7 @@ Module modDatabase
Dim IP As String
Dim F As Integer
Dim i As Integer
filename = Application.StartupPath & "\database\banlist.txt"
filename = Application.StartupPath & "\dados\banlist.txt"

' Ter certeza que o arquivo existe
If Not File.Exists("data\banlist.txt") Then
Expand Down Expand Up @@ -1263,10 +1263,10 @@ Module modDatabase
Function IsBanned(IP As String) As Boolean
Dim filename As String, line As String

filename = Application.StartupPath & "\database\banlist.txt"
filename = Application.StartupPath & "\dados\banlist.txt"

' Ver se o arquivo existe
If Not File.Exists("database\banlist.txt") Then
If Not File.Exists(filename) Then
Return False
End If

Expand All @@ -1285,7 +1285,7 @@ Module modDatabase
End Function

Sub BanIndex(BanPlayerindex As Integer, BannedByindex As Integer)
Dim filename As String = Application.StartupPath & "\Database\banlist.txt"
Dim filename As String = Application.StartupPath & "\dados\banlist.txt"
Dim IP As String, i As Integer

' Ter certeza que o arquivo existe
Expand Down
2 changes: 1 addition & 1 deletion Source/Server/Source/Modules/S_General.vb
Expand Up @@ -195,7 +195,7 @@ Module S_General
SpawnAllMapNpcs()

' Verificar se a lista com nomes de personagens existe para evitar duplicatas; caso contrário, fazer.
If Not File.Exists("Database\Contas\charlist.txt") Then
If Not File.Exists("Dados\Contas\charlist.txt") Then
F = FreeFile()
End If

Expand Down

0 comments on commit d10b676

Please sign in to comment.