Skip to content

Commit

Permalink
Merge pull request #593 from valencata/master
Browse files Browse the repository at this point in the history
Remuevo ocultar al atacar melee
  • Loading branch information
RecoX authored May 29, 2024
2 parents b8db373 + ebb320c commit 838f9ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
25 changes: 18 additions & 7 deletions Codigo/Modulo_UsUaRiOs.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3611,29 +3611,40 @@ End Function
Public Sub RemoveUserInvisibility(ByVal UserIndex As Integer)
With UserList(UserIndex)
Dim RemoveHiddenState As Boolean

' Volver visible
190 If .flags.Oculto = 1 And .flags.AdminInvisible = 0 And .flags.invisible = 0 Then
192 .flags.Oculto = 0
194 .Counters.TiempoOculto = 0

'Call WriteConsoleMsg(UserIndex, "Has vuelto a ser visible.", e_FontTypeNames.FONTTYPE_INFO)
196 Call WriteLocaleMsg(UserIndex, "307", e_FontTypeNames.FONTTYPE_INFO)
198 Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessageSetInvisible(.Char.charindex, False, UserList(UserIndex).pos.x, UserList(UserIndex).pos.y))
End If

If IsFeatureEnabled("remove-inv-on-attack") And Not MapInfo(.pos.Map).KeepInviOnAttack Then
RemoveHiddenState = .flags.Oculto > 0 Or .flags.invisible > 0
End If
'I see you...
If RemoveHiddenState And .flags.AdminInvisible = 0 Then
If RemoveHiddenState And .flags.AdminInvisible = 0 Then
.flags.Oculto = 0
.flags.invisible = 0
.Counters.Invisibilidad = 0
.Counters.TiempoOculto = 0
.Counters.LastAttackTime = GlobalFrameTime
If .flags.Navegando = 1 Then
If .clase = e_Class.Pirat Then
If .flags.Navegando = 1 Then
If .clase = e_Class.Pirat Then
' Pierde la apariencia de fragata fantasmal
Call EquiparBarco(UserIndex)
Call WriteConsoleMsg(UserIndex, "¡Has recuperado tu apariencia normal!", e_FontTypeNames.FONTTYPE_INFO)
Call ChangeUserChar(UserIndex, .Char.body, .Char.head, .Char.Heading, NingunArma, NingunEscudo, NingunCasco, NoCart)
Call RefreshCharStatus(UserIndex)
End If
Else
If .flags.invisible = 0 Then
End If
Else
If .flags.invisible = 0 Then
Call WriteLocaleMsg(UserIndex, "307", e_FontTypeNames.FONTTYPE_INFO)
Call SendData(SendTarget.ToPCAliveArea, UserIndex, PrepareMessageSetInvisible(.Char.charindex, False, UserList(UserIndex).pos.x, UserList(UserIndex).pos.y))
End If
End If
End If
End If
End With
Expand Down
2 changes: 2 additions & 0 deletions Codigo/SistemaCombate.bas
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,8 @@ Public Sub UserAttackPosition(ByVal UserIndex As Integer, ByRef TargetPos As t_W
132 Index = MapData(TargetPos.map, TargetPos.X, TargetPos.Y).UserIndex
'Look for user
134 If Index > 0 Then
'El RemoveUserInvisibility saca el ocultar al pegar hit melee
'Para el resto de ataques, se requiere feature toggle
Call RemoveUserInvisibility(UserIndex)
136 Call UsuarioAtacaUsuario(UserIndex, Index, Melee)
'Look for NPC
Expand Down

0 comments on commit 838f9ed

Please sign in to comment.