Client~Side
modGameEditors
Mude toda a ShopEditorInit para:
- Código:
Public Sub ShopEditorInit()
Dim i As Long
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
If frmEditor_Shop.Visible = False Then Exit Sub
EditorIndex = frmEditor_Shop.lstIndex.ListIndex + 1
With frmEditor_Shop
.txtName.text = Trim$(Shop(EditorIndex).Name)
If Shop(EditorIndex).BuyRate > 0 Then
.scrlBuy.Value = Shop(EditorIndex).BuyRate
Else
.scrlBuy.Value = 100
End If
.cmbItem.Clear
.cmbItem.AddItem "Nenhum"
.cmbCostItem.Clear
.cmbCostItem.AddItem "Nenhum"
For i = 1 To MAX_ITEMS
.cmbItem.AddItem i & ": " & Trim$(Item(i).Name)
.cmbCostItem.AddItem i & ": " & Trim$(Item(i).Name)
Next
.cmbItem.ListIndex = 0
.cmbCostItem.ListIndex = 0
.cmbCostItem.ListIndex = Shop(EditorIndex).TradeItem(EditorIndex).CostItem
.txtCostValue.text = Shop(EditorIndex).TradeItem(EditorIndex).CostValue
.cmbItem.ListIndex = Shop(EditorIndex).TradeItem(EditorIndex).Item
.txtItemValue.text = Shop(EditorIndex).TradeItem(EditorIndex).ItemValue
End With
UpdateShopTrade
Shop_Changed(EditorIndex) = True
' Error handler
Exit Sub
errorhandler:
HandleError "ShopEditorInit", "modGameEditors", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
Créditos
Ricardo
Ricardo
Última edição por Ricardo em Seg Abr 16, 2012 9:00 am, editado 1 vez(es)