Skip to content

Commit

Permalink
Merge pull request #96 from ao-org/feature/clean-unused-system
Browse files Browse the repository at this point in the history
Elimine los sistemas de Correo, Logros, Ranking (In-Game) y Donador
  • Loading branch information
MartinTrionfetti authored Jul 26, 2021
2 parents 740b9af + 30004ca commit 7e210ed
Show file tree
Hide file tree
Showing 35 changed files with 123 additions and 5,148 deletions.
40 changes: 1 addition & 39 deletions Codigo/Acciones.bas
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ Sub Accion(ByVal UserIndex As Integer, ByVal Map As Integer, ByVal X As Integer,

346 Case eOBJType.OtCorreo 'Es un cartel
'Call AccionParaCorreo(Map, x, Y, UserIndex)
Call WriteConsoleMsg(UserIndex, "El correo está temporalmente deshabilitado.", FontTypeNames.FONTTYPE_EJECUCION)

348 Case eOBJType.otForos 'Foro
'Call AccionParaForo(Map, X, Y, UserIndex)
Expand Down Expand Up @@ -864,45 +865,6 @@ Handler:
106 Call TraceError(Err.Number, Err.Description, "Acciones.AccionParaCartel", Erl)


End Sub

Sub AccionParaCorreo(ByVal Map As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal UserIndex As Integer)

On Error GoTo AccionParaCorreo_Err


Dim Pos As WorldPos

100 Pos.Map = Map
102 Pos.X = X
104 Pos.Y = Y

106 If UserList(UserIndex).flags.Muerto = 1 Then
'Call WriteConsoleMsg(UserIndex, "Estas muerto.", FontTypeNames.FONTTYPE_INFO)
108 Call WriteLocaleMsg(UserIndex, "77", FontTypeNames.FONTTYPE_INFO)
Exit Sub

End If

110 If Distancia(Pos, UserList(UserIndex).Pos) > 4 Then
112 Call WriteLocaleMsg(UserIndex, "8", FontTypeNames.FONTTYPE_INFO)
' Call WriteConsoleMsg(UserIndex, "Estas demasiado lejos.", FontTypeNames.FONTTYPE_INFO)
Exit Sub

End If

114 If ObjData(MapData(Map, X, Y).ObjInfo.ObjIndex).OBJType = 47 Then
116 Call WriteListaCorreo(UserIndex, False)

End If


Exit Sub

AccionParaCorreo_Err:
118 Call TraceError(Err.Number, Err.Description, "Argentum20Server.Acciones.AccionParaCorreo", Erl)


End Sub

Sub AccionParaRamita(ByVal Map As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal UserIndex As Integer)
Expand Down
272 changes: 0 additions & 272 deletions Codigo/Admin.bas
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ Public ReiniciarServer As Long

Public tInicioServer As Long

Public EstadisticasWeb As New clsEstadisticasIPC

'INTERVALOS
Public SanaIntervaloSinDescansar As Integer
Public StaminaIntervaloSinDescansar As Integer
Expand Down Expand Up @@ -166,21 +164,6 @@ Public Nieblando As Boolean

Public IpList As New Collection

Public Type TCPESStats

BytesEnviados As Double
BytesRecibidos As Double
BytesEnviadosXSEG As Long
BytesRecibidosXSEG As Long
BytesEnviadosXSEGMax As Long
BytesRecibidosXSEGMax As Long
BytesEnviadosXSEGCuando As Date
BytesRecibidosXSEGCuando As Date

End Type

Public TCPESStats As TCPESStats

Public Baneos As New Collection

'Public ResetThread As New clsThreading
Expand Down Expand Up @@ -240,8 +223,6 @@ Sub WorldSave()

On Error GoTo Handler

'Call LogTarea("Sub WorldSave")

Dim LoopX As Integer

Dim Porc As Long
Expand Down Expand Up @@ -326,57 +307,6 @@ PurgarPenas_Err:
118 Call TraceError(Err.Number, Err.Description, "Admin.PurgarPenas", Erl)


End Sub

Public Sub PurgarScroll()

On Error GoTo PurgarScroll_Err


Dim i As Long

100 For i = 1 To LastUser

102 If UserList(i).flags.UserLogged Then
104 If UserList(i).Counters.ScrollExperiencia > 0 Then
106 UserList(i).Counters.ScrollExperiencia = UserList(i).Counters.ScrollExperiencia - 1

108 If UserList(i).Counters.ScrollExperiencia < 1 Then
110 UserList(i).Counters.ScrollExperiencia = 0
112 UserList(i).flags.ScrollExp = 1
114 Call WriteConsoleMsg(i, "Tu scroll de experiencia a finalizado.", FontTypeNames.FONTTYPE_New_DONADOR)
116 Call WriteContadores(i)


End If

End If

118 If UserList(i).Counters.ScrollOro > 0 Then
120 UserList(i).Counters.ScrollOro = UserList(i).Counters.ScrollOro - 1

122 If UserList(i).Counters.ScrollOro < 1 Then
124 UserList(i).Counters.ScrollOro = 0
126 UserList(i).flags.ScrollOro = 1
128 Call WriteConsoleMsg(i, "Tu scroll de oro a finalizado.", FontTypeNames.FONTTYPE_New_DONADOR)
130 Call WriteContadores(i)


End If

End If

End If

132 Next i


Exit Sub

PurgarScroll_Err:
134 Call TraceError(Err.Number, Err.Description, "Admin.PurgarScroll", Erl)


End Sub

Public Sub EfectoOxigeno(ByVal UserIndex As Integer)
Expand Down Expand Up @@ -487,122 +417,6 @@ BANCheck_Err:
106 Call TraceError(Err.Number, Err.Description, "Admin.BANCheck", Erl)


End Function

Public Function DonadorCheck(ByVal Name As String) As Boolean

On Error GoTo DonadorCheck_Err


100 If Database_Enabled Then
102 DonadorCheck = CheckUserDonatorDatabase(Name)
Else
104 DonadorCheck = val(GetVar(CuentasPath & Name & ".act", "DONADOR", "DONADOR"))

End If


Exit Function

DonadorCheck_Err:
106 Call TraceError(Err.Number, Err.Description, "Admin.DonadorCheck", Erl)


End Function

Public Function CreditosDonadorCheck(ByVal Name As String) As Long

On Error GoTo CreditosDonadorCheck_Err


100 If Database_Enabled Then
102 CreditosDonadorCheck = GetUserCreditosDatabase(Name)
Else
104 CreditosDonadorCheck = val(GetVar(CuentasPath & Name & ".act", "DONADOR", "CREDITOS"))

End If


Exit Function

CreditosDonadorCheck_Err:
106 Call TraceError(Err.Number, Err.Description, "Admin.CreditosDonadorCheck", Erl)


End Function

Public Function CreditosCanjeadosCheck(ByVal Name As String) As Long

On Error GoTo CreditosCanjeadosCheck_Err


100 If Database_Enabled Then
102 CreditosCanjeadosCheck = GetUserCreditosCanjeadosDatabase(Name)
Else
104 CreditosCanjeadosCheck = val(GetVar(CuentasPath & Name & ".act", "DONADOR", "CREDITOSCANJEADOS"))

End If


Exit Function

CreditosCanjeadosCheck_Err:
106 Call TraceError(Err.Number, Err.Description, "Admin.CreditosCanjeadosCheck", Erl)


End Function

Public Function DiasDonadorCheck(ByVal Name As String) As Integer

On Error GoTo DiasDonadorCheck_Err


100 If Database_Enabled Then
' Uso una funcion que hace ambas queries a la vez para optimizar
102 DiasDonadorCheck = GetUserDiasDonadorDatabase(Name)
Else

104 If DonadorCheck(Name) Then

Dim Diasrestantes As Integer

Dim fechadonador As Date

106 fechadonador = GetVar(CuentasPath & Name & ".act", "DONADOR", "FECHAEXPIRACION")
108 DiasDonadorCheck = DateDiff("d", Date, fechadonador)

End If

End If


Exit Function

DiasDonadorCheck_Err:
110 Call TraceError(Err.Number, Err.Description, "Admin.DiasDonadorCheck", Erl)


End Function

Public Function ComprasDonadorCheck(ByVal Name As String) As Long

On Error GoTo ComprasDonadorCheck_Err


100 If Database_Enabled Then
102 ComprasDonadorCheck = GetUserComprasDonadorDatabase(Name)
Else
104 ComprasDonadorCheck = val(GetVar(CuentasPath & Name & ".act", "COMPRAS", "CANTIDAD"))

End If


Exit Function

ComprasDonadorCheck_Err:
106 Call TraceError(Err.Number, Err.Description, "Admin.ComprasDonadorCheck", Erl)


End Function

Public Function PersonajeExiste(ByVal Name As String) As Boolean
Expand Down Expand Up @@ -653,92 +467,6 @@ UnBan_Err:

End Function


Public Sub ActualizaEstadisticasWeb()

On Error GoTo ActualizaEstadisticasWeb_Err


Static Andando As Boolean

Static Contador As Long

Dim Tmp As Boolean

100 Contador = Contador + 1

102 If Contador >= 10 Then
104 Contador = 0
106 Tmp = EstadisticasWeb.EstadisticasAndando()

108 If Andando = False And Tmp = True Then
110 Call InicializaEstadisticas

End If

112 Andando = Tmp

End If


Exit Sub

ActualizaEstadisticasWeb_Err:
114 Call TraceError(Err.Number, Err.Description, "Admin.ActualizaEstadisticasWeb", Erl)


End Sub

Public Sub ActualizaStatsES()

On Error GoTo ActualizaStatsES_Err


Static TUlt As Single

Dim Transcurrido As Single

100 Transcurrido = Timer - TUlt

102 If Transcurrido >= 5 Then
104 TUlt = Timer

106 With TCPESStats
108 .BytesEnviadosXSEG = CLng(.BytesEnviados / Transcurrido)
110 .BytesRecibidosXSEG = CLng(.BytesRecibidos / Transcurrido)
112 .BytesEnviados = 0
114 .BytesRecibidos = 0

116 If .BytesEnviadosXSEG > .BytesEnviadosXSEGMax Then
118 .BytesEnviadosXSEGMax = .BytesEnviadosXSEG
120 .BytesEnviadosXSEGCuando = CDate(Now)

End If

122 If .BytesRecibidosXSEG > .BytesRecibidosXSEGMax Then
124 .BytesRecibidosXSEGMax = .BytesRecibidosXSEG
126 .BytesRecibidosXSEGCuando = CDate(Now)

End If

128 If frmEstadisticas.Visible Then
130 Call frmEstadisticas.ActualizaStats

End If

End With

End If


Exit Sub

ActualizaStatsES_Err:
132 Call TraceError(Err.Number, Err.Description, "Admin.ActualizaStatsES", Erl)


End Sub

Public Function UserDarPrivilegioLevel(ByVal Name As String) As PlayerType

On Error GoTo UserDarPrivilegioLevel_Err
Expand Down
Loading

0 comments on commit 7e210ed

Please sign in to comment.