Fix registered trainers still do in sight check
This commit is contained in:
parent
edf225189d
commit
b7a045e37c
|
@ -352,7 +352,7 @@
|
||||||
|
|
||||||
If distance <= Me.TrainerSight Then
|
If distance <= Me.TrainerSight Then
|
||||||
Dim InSightMusic As String = "nomusic"
|
Dim InSightMusic As String = "nomusic"
|
||||||
|
Dim t As Trainer = Nothing
|
||||||
If Me.IsTrainer = True Then
|
If Me.IsTrainer = True Then
|
||||||
Dim trainerFilePath As String = GameModeManager.GetScriptPath(Me.AdditionalValue & ".dat")
|
Dim trainerFilePath As String = GameModeManager.GetScriptPath(Me.AdditionalValue & ".dat")
|
||||||
Security.FileValidation.CheckFileValid(trainerFilePath, False, "NPC.vb")
|
Security.FileValidation.CheckFileValid(trainerFilePath, False, "NPC.vb")
|
||||||
|
@ -365,7 +365,7 @@
|
||||||
If Trainer.IsBeaten(trainerID) = True Then
|
If Trainer.IsBeaten(trainerID) = True Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
Else
|
Else
|
||||||
Dim t As New Trainer(trainerID)
|
t = New Trainer(trainerID)
|
||||||
InSightMusic = t.GetInSightMusic()
|
InSightMusic = t.GetInSightMusic()
|
||||||
End If
|
End If
|
||||||
ElseIf l.StartsWith("@battle.starttrainer(") = True Then
|
ElseIf l.StartsWith("@battle.starttrainer(") = True Then
|
||||||
|
@ -373,13 +373,13 @@
|
||||||
If Trainer.IsBeaten(trainerID) = True Then
|
If Trainer.IsBeaten(trainerID) = True Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
Else
|
Else
|
||||||
Dim t As New Trainer(trainerID)
|
t = New Trainer(trainerID)
|
||||||
InSightMusic = t.GetInSightMusic()
|
InSightMusic = t.GetInSightMusic()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
If t IsNot Nothing Then
|
||||||
Dim needFacing As Integer = 0
|
Dim needFacing As Integer = 0
|
||||||
Select Case Me.faceRotation
|
Select Case Me.faceRotation
|
||||||
Case 0
|
Case 0
|
||||||
|
@ -446,6 +446,7 @@
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub ClickFunction()
|
Public Overrides Sub ClickFunction()
|
||||||
|
|
Loading…
Reference in New Issue