* Replaced the term "Player" with "Trainer" in variable names, dialog control names, and comments.
* Renamed the last dialog selected Pokémon from sLastSelected to sLastPokemon, and the last selected trainer level from sLastLevel to sLastTrainerLevel, for a consistent naming scheme. * Advanced to version 0.8.4.
This commit is contained in:
parent
de7dbdd676
commit
0ccb03c7e7
@ -47,7 +47,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
Option Explicit
|
Option Explicit
|
||||||
|
|
||||||
' Remembers the selected Pokémon for the next run.
|
' Remembers the selected Pokémon for the next run.
|
||||||
Global sLastSelected As String
|
Global sLastPokemon As String
|
||||||
' Remembers the selected player level for the next run.
|
' Remembers the selected trainer level for the next run.
|
||||||
Global sLastLevel As Integer
|
Global sLastTrainerLevel As Integer
|
||||||
|
|
||||||
' The parameters to find the individual values.
|
' The parameters to find the individual values.
|
||||||
Type aFindIVParam
|
Type aFindIVParam
|
||||||
@ -29,7 +29,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
@ -74,18 +74,18 @@ Function fnAskParam As aFindIVParam
|
|||||||
"ImageURL", fnGetImageUrl ("Unknown"))
|
"ImageURL", fnGetImageUrl ("Unknown"))
|
||||||
|
|
||||||
' Remembers the previously-selected Pokémon.
|
' Remembers the previously-selected Pokémon.
|
||||||
oDialog.getControl ("lstPokemon").selectItem (sLastSelected, True)
|
oDialog.getControl ("lstPokemon").selectItem (sLastPokemon, True)
|
||||||
oDialog.getControl ("lstPlayerLevel").selectItem (sLastLevel, True)
|
oDialog.getControl ("lstTrainerLevel").selectItem (sLastTrainerLevel, True)
|
||||||
|
|
||||||
If oDialog.execute = 0 Then
|
If oDialog.execute = 0 Then
|
||||||
aQuery.bIsCancelled = True
|
aQuery.bIsCancelled = True
|
||||||
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
|
sLastTrainerLevel = oDialog.getControl ("lstTrainerLevel").getSelectedItem
|
||||||
fnAskParam = aQuery
|
fnAskParam = aQuery
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
subReadBaseStats
|
subReadBaseStats
|
||||||
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
|
sLastTrainerLevel = oDialog.getControl ("lstTrainerLevel").getSelectedItem
|
||||||
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
||||||
With aQuery
|
With aQuery
|
||||||
.sPokemonId = maBaseStats (nSelected).sPokemonId
|
.sPokemonId = maBaseStats (nSelected).sPokemonId
|
||||||
@ -93,7 +93,7 @@ Function fnAskParam As aFindIVParam
|
|||||||
.nCP = oDialog.getControl ("numCP").getValue
|
.nCP = oDialog.getControl ("numCP").getValue
|
||||||
.nHP = oDialog.getControl ("numHP").getValue
|
.nHP = oDialog.getControl ("numHP").getValue
|
||||||
.nStardust = CInt (oDialog.getControl ("lstStardust").getSelectedItem)
|
.nStardust = CInt (oDialog.getControl ("lstStardust").getSelectedItem)
|
||||||
.nPlayerLevel = CInt (oDialog.getControl ("lstPlayerLevel").getSelectedItem)
|
.nTrainerLevel = CInt (oDialog.getControl ("lstTrainerLevel").getSelectedItem)
|
||||||
.nTotal = oDialog.getControl ("lstTotal").getSelectedItemPos + 1
|
.nTotal = oDialog.getControl ("lstTotal").getSelectedItemPos + 1
|
||||||
.nMax = oDialog.getControl ("lstMax").getSelectedItemPos + 1
|
.nMax = oDialog.getControl ("lstMax").getSelectedItemPos + 1
|
||||||
.bIsCancelled = False
|
.bIsCancelled = False
|
||||||
@ -180,9 +180,9 @@ Sub subLstPokemonSelected (oEvent As object)
|
|||||||
oDialog = oEvent.Source.getContext
|
oDialog = oEvent.Source.getContext
|
||||||
|
|
||||||
' Checks which Pokémon was selected.
|
' Checks which Pokémon was selected.
|
||||||
sLastSelected = oDialog.getControl ("lstPokemon").getSelectedItem
|
sLastPokemon = oDialog.getControl ("lstPokemon").getSelectedItem
|
||||||
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
||||||
' This happens at the beginning where sLastSelected is "".
|
' This happens at the beginning where sLastPokemon is "".
|
||||||
If nSelected = -1 Then
|
If nSelected = -1 Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
@ -46,7 +46,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
@ -99,8 +99,8 @@ Sub subCreateReport ( _
|
|||||||
Next nJ
|
Next nJ
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
If aQuery.nTrainerLevel <> 0 Then
|
||||||
fMaxLevel = aQuery.nPlayerLevel + 2
|
fMaxLevel = aQuery.nTrainerLevel + 2
|
||||||
If fMaxLevel > 40 Then
|
If fMaxLevel > 40 Then
|
||||||
fMaxLevel = 40
|
fMaxLevel = 40
|
||||||
End If
|
End If
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<description xmlns="http://openoffice.org/extensions/update/2006"
|
<description xmlns="http://openoffice.org/extensions/update/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="tw.idv.imacat.office.pokemongoiv" />
|
<identifier value="tw.idv.imacat.office.pokemongoiv" />
|
||||||
<version value="0.8.3" />
|
<version value="0.8.4" />
|
||||||
<update-download>
|
<update-download>
|
||||||
<src xlink:href="https://sourceforge.net/projects/aoo-extensions/files/18585/31/pokemongoiv.oxt" />
|
<src xlink:href="https://sourceforge.net/projects/aoo-extensions/files/18585/32/pokemongoiv.oxt" />
|
||||||
</update-download>
|
</update-download>
|
||||||
</description>
|
</description>
|
||||||
|
@ -49,7 +49,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
@ -310,4 +310,4 @@ Sub subReadStardust
|
|||||||
mStardust = fnGetStardustData
|
mStardust = fnGetStardustData
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
</script:module>
|
</script:module>
|
||||||
|
@ -21,7 +21,7 @@ Option Explicit
|
|||||||
|
|
||||||
' Remembers the selected Pokémon for the next run.
|
' Remembers the selected Pokémon for the next run.
|
||||||
Global sLastSelected As String
|
Global sLastSelected As String
|
||||||
' Remembers the selected player level for the next run.
|
' Remembers the selected trainer level for the next run.
|
||||||
Global sLastLevel As Integer
|
Global sLastLevel As Integer
|
||||||
|
|
||||||
' The parameters to find the individual values.
|
' The parameters to find the individual values.
|
||||||
@ -31,7 +31,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
@ -77,17 +77,17 @@ Function fnAskParam As aFindIVParam
|
|||||||
|
|
||||||
' Remembers the previously-selected Pokémon.
|
' Remembers the previously-selected Pokémon.
|
||||||
oDialog.getControl ("lstPokemon").selectItem (sLastSelected, True)
|
oDialog.getControl ("lstPokemon").selectItem (sLastSelected, True)
|
||||||
oDialog.getControl ("lstPlayerLevel").selectItem (sLastLevel, True)
|
oDialog.getControl ("lstTrainerLevel").selectItem (sLastLevel, True)
|
||||||
|
|
||||||
If oDialog.execute = 0 Then
|
If oDialog.execute = 0 Then
|
||||||
aQuery.bIsCancelled = True
|
aQuery.bIsCancelled = True
|
||||||
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
|
sLastLevel = oDialog.getControl ("lstTrainerLevel").getSelectedItem
|
||||||
fnAskParam = aQuery
|
fnAskParam = aQuery
|
||||||
Exit Function
|
Exit Function
|
||||||
End If
|
End If
|
||||||
|
|
||||||
subReadBaseStats
|
subReadBaseStats
|
||||||
sLastLevel = oDialog.getControl ("lstPlayerLevel").getSelectedItem
|
sLastLevel = oDialog.getControl ("lstTrainerLevel").getSelectedItem
|
||||||
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
nSelected = oDialog.getControl ("lstPokemon").getSelectedItemPos
|
||||||
With aQuery
|
With aQuery
|
||||||
.sPokemonId = maBaseStats (nSelected).sPokemonId
|
.sPokemonId = maBaseStats (nSelected).sPokemonId
|
||||||
@ -95,7 +95,7 @@ Function fnAskParam As aFindIVParam
|
|||||||
.nCP = oDialog.getControl ("numCP").getValue
|
.nCP = oDialog.getControl ("numCP").getValue
|
||||||
.nHP = oDialog.getControl ("numHP").getValue
|
.nHP = oDialog.getControl ("numHP").getValue
|
||||||
.nStardust = CInt (oDialog.getControl ("lstStardust").getSelectedItem)
|
.nStardust = CInt (oDialog.getControl ("lstStardust").getSelectedItem)
|
||||||
.nPlayerLevel = CInt (oDialog.getControl ("lstPlayerLevel").getSelectedItem)
|
.nTrainerLevel = CInt (oDialog.getControl ("lstTrainerLevel").getSelectedItem)
|
||||||
.nTotal = oDialog.getControl ("lstTotal").getSelectedItemPos + 1
|
.nTotal = oDialog.getControl ("lstTotal").getSelectedItemPos + 1
|
||||||
.nMax = oDialog.getControl ("lstMax").getSelectedItemPos + 1
|
.nMax = oDialog.getControl ("lstMax").getSelectedItemPos + 1
|
||||||
.bIsCancelled = False
|
.bIsCancelled = False
|
||||||
@ -538,4 +538,4 @@ Sub subUpdateTotalAppraisal ( _
|
|||||||
End If
|
End If
|
||||||
oList.setVisible (True)
|
oList.setVisible (True)
|
||||||
End Sub
|
End Sub
|
||||||
</script:module>
|
</script:module>
|
||||||
|
@ -48,7 +48,7 @@ Type aFindIVParam
|
|||||||
nCP As Integer
|
nCP As Integer
|
||||||
nHP As Integer
|
nHP As Integer
|
||||||
nStardust As Integer
|
nStardust As Integer
|
||||||
nPlayerLevel As Integer
|
nTrainerLevel As Integer
|
||||||
bIsNew As Boolean
|
bIsNew As Boolean
|
||||||
nTotal As Integer
|
nTotal As Integer
|
||||||
sBest As String
|
sBest As String
|
||||||
@ -101,8 +101,8 @@ Sub subCreateReport ( _
|
|||||||
Next nJ
|
Next nJ
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If aQuery.nPlayerLevel <> 0 Then
|
If aQuery.nTrainerLevel <> 0 Then
|
||||||
fMaxLevel = aQuery.nPlayerLevel + 2
|
fMaxLevel = aQuery.nTrainerLevel + 2
|
||||||
If fMaxLevel > 40 Then
|
If fMaxLevel > 40 Then
|
||||||
fMaxLevel = 40
|
fMaxLevel = 40
|
||||||
End If
|
End If
|
||||||
@ -517,4 +517,4 @@ Function fnFindSheetByName (oDoc As Object, sName As String) As Object
|
|||||||
End If
|
End If
|
||||||
Next nI
|
Next nI
|
||||||
End Function
|
End Function
|
||||||
</script:module>
|
</script:module>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
3.DlgMain.txtCP.Label=~WP:
|
3.DlgMain.txtCP.Label=~WP:
|
||||||
4.DlgMain.txtHP.Label=~KP:
|
4.DlgMain.txtHP.Label=~KP:
|
||||||
5.DlgMain.txtStardust.Label=~Sternenstaub:
|
5.DlgMain.txtStardust.Label=~Sternenstaub:
|
||||||
6.DlgMain.txtPlayerLevel.Label=Spieler ~Level:
|
6.DlgMain.txtTrainerLevel.Label=Spieler ~Level:
|
||||||
7.DlgMain.cbxIsNew.Label=Dieses Pok\u00e9mon hat noch ~kein Power-Up bekommen.
|
7.DlgMain.cbxIsNew.Label=Dieses Pok\u00e9mon hat noch ~kein Power-Up bekommen.
|
||||||
8.DlgMain.grpAppraisals.Label=Bewertung des Teamleiters
|
8.DlgMain.grpAppraisals.Label=Bewertung des Teamleiters
|
||||||
9.DlgMain.rdoTeamValor.Label=Team W~agemut
|
9.DlgMain.rdoTeamValor.Label=Team W~agemut
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
3.DlgMain.txtCP.Label=~CP:
|
3.DlgMain.txtCP.Label=~CP:
|
||||||
4.DlgMain.txtHP.Label=~HP:
|
4.DlgMain.txtHP.Label=~HP:
|
||||||
5.DlgMain.txtStardust.Label=S~tardust:
|
5.DlgMain.txtStardust.Label=S~tardust:
|
||||||
6.DlgMain.txtPlayerLevel.Label=Player ~level:
|
6.DlgMain.txtTrainerLevel.Label=Player ~level:
|
||||||
7.DlgMain.cbxIsNew.Label=This Pok\u00e9mon has ~not been powered-up yet.
|
7.DlgMain.cbxIsNew.Label=This Pok\u00e9mon has ~not been powered-up yet.
|
||||||
8.DlgMain.grpAppraisals.Label=Team Leader Appraisal
|
8.DlgMain.grpAppraisals.Label=Team Leader Appraisal
|
||||||
9.DlgMain.rdoTeamValor.Label=Team ~Valor
|
9.DlgMain.rdoTeamValor.Label=Team ~Valor
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
3.DlgMain.txtCP.Label=~CP:
|
3.DlgMain.txtCP.Label=~CP:
|
||||||
4.DlgMain.txtHP.Label=~HP:
|
4.DlgMain.txtHP.Label=~HP:
|
||||||
5.DlgMain.txtStardust.Label=\u661f\u661f\u6c99\u5b50(~t):
|
5.DlgMain.txtStardust.Label=\u661f\u661f\u6c99\u5b50(~t):
|
||||||
6.DlgMain.txtPlayerLevel.Label=\u73a9\u5bb6\u7b49\u7d1a(~L)\uff1a
|
6.DlgMain.txtTrainerLevel.Label=\u73a9\u5bb6\u7b49\u7d1a(~L)\uff1a
|
||||||
7.DlgMain.cbxIsNew.Label=\u9019\u96bb\u5bf6\u53ef\u5922\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
|
7.DlgMain.cbxIsNew.Label=\u9019\u96bb\u5bf6\u53ef\u5922\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
|
||||||
8.DlgMain.grpAppraisals.Label=\u968a\u9577\u8a55\u50f9
|
8.DlgMain.grpAppraisals.Label=\u968a\u9577\u8a55\u50f9
|
||||||
9.DlgMain.rdoTeamValor.Label=\u6b66\u52c7\u968a(~V)
|
9.DlgMain.rdoTeamValor.Label=\u6b66\u52c7\u968a(~V)
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
</dlg:menupopup>
|
</dlg:menupopup>
|
||||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.1Dialog.subBtnOKCheck?language=Basic&location=application" script:language="Script"/>
|
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.1Dialog.subBtnOKCheck?language=Basic&location=application" script:language="Script"/>
|
||||||
</dlg:menulist>
|
</dlg:menulist>
|
||||||
<dlg:text dlg:id="txtPlayerLevel" dlg:tab-index="20" dlg:left="185" dlg:top="41" dlg:width="45" dlg:height="8" dlg:value="&6.DlgMain.txtPlayerLevel.Label"/>
|
<dlg:text dlg:id="txtTrainerLevel" dlg:tab-index="20" dlg:left="185" dlg:top="41" dlg:width="45" dlg:height="8" dlg:value="&6.DlgMain.txtTrainerLevel.Label"/>
|
||||||
<dlg:menulist dlg:id="lstPlayerLevel" dlg:tab-index="4" dlg:left="230" dlg:top="39" dlg:width="30" dlg:height="12" dlg:spin="true" dlg:linecount="20">
|
<dlg:menulist dlg:id="lstTrainerLevel" dlg:tab-index="4" dlg:left="230" dlg:top="39" dlg:width="30" dlg:height="12" dlg:spin="true" dlg:linecount="20">
|
||||||
<dlg:menupopup>
|
<dlg:menupopup>
|
||||||
<dlg:menuitem dlg:value="1"/>
|
<dlg:menuitem dlg:value="1"/>
|
||||||
<dlg:menuitem dlg:value="2"/>
|
<dlg:menuitem dlg:value="2"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user