mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-31 01:35:20 +02:00
more for the optional param
This commit is contained in:
parent
9ac68d809f
commit
78f9e9e4c7
@ -341,7 +341,7 @@
|
|||||||
Return Nothing
|
Return Nothing
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CanBreed(ByVal Pokemon As List(Of Pokemon)) As Integer
|
Public Shared Function CanBreed(ByVal Pokemon As List(Of Pokemon), Optional ByVal multiplier As Boolean = True) As Integer
|
||||||
Dim chance As Integer = 0
|
Dim chance As Integer = 0
|
||||||
|
|
||||||
If Pokemon.Count = 2 Then
|
If Pokemon.Count = 2 Then
|
||||||
@ -415,7 +415,7 @@
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If chance > 0 Then
|
If chance > 0 And multiplier = True Then
|
||||||
If Core.Player.Inventory.GetItemAmount(241) > 0 Then
|
If Core.Player.Inventory.GetItemAmount(241) > 0 Then
|
||||||
chance = CInt(chance * 1.3F)
|
chance = CInt(chance * 1.3F)
|
||||||
End If
|
End If
|
||||||
@ -424,7 +424,7 @@
|
|||||||
Return chance
|
Return chance
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CanBreed(ByVal daycareID As Integer) As Integer
|
Public Shared Function CanBreed(ByVal daycareID As Integer, Optional ByVal multiplier As Boolean = True) As Integer
|
||||||
Dim l As New List(Of Pokemon)
|
Dim l As New List(Of Pokemon)
|
||||||
|
|
||||||
For Each line As String In Core.Player.DaycareData.SplitAtNewline()
|
For Each line As String In Core.Player.DaycareData.SplitAtNewline()
|
||||||
@ -435,15 +435,15 @@
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return CanBreed(l)
|
Return CanBreed(l, multiplier)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function CanBreed(ByVal Pokemon As Dictionary(Of Integer, Pokemon)) As Integer
|
Public Shared Function CanBreed(ByVal Pokemon As Dictionary(Of Integer, Pokemon), Optional ByVal multiplier As Boolean = True) As Integer
|
||||||
Dim l As New List(Of Pokemon)
|
Dim l As New List(Of Pokemon)
|
||||||
For i = 0 To Pokemon.Count - 1
|
For i = 0 To Pokemon.Count - 1
|
||||||
l.Add(Pokemon.Values(i))
|
l.Add(Pokemon.Values(i))
|
||||||
Next
|
Next
|
||||||
Return CanBreed(l)
|
Return CanBreed(l, multiplier)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Shared Function GetEggPokemonID(ByVal Pokemon As Dictionary(Of Integer, Pokemon)) As Integer
|
Private Shared Function GetEggPokemonID(ByVal Pokemon As Dictionary(Of Integer, Pokemon)) As Integer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user