IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB.NET Discussion :

Une erreur embêtante, Impossible d'éffectuer un cast


Sujet :

VB.NET

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Invité
    Invité(e)
    Par défaut Une erreur embêtante, Impossible d'éffectuer un cast
    Bonjour,

    Ca fait plusieurs jours que je n'arrive pas à régler une erreur, la voici:
    Impossible d'effectuer un cast d'un objet de type 'WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay.quest.GameRolePlayNpcQuestFlag' en type 'WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay.GameRolePlayActorInformations'.
    Voici sur quel ligne elle se produit:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    _loc_17 = ProtocolTypeManager.GetInstance(_loc_16)
    Voilà ma class:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.house
    Imports WindowsApplication1.Dofus
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.fight
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.integereractive
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay.quest
     
    Namespace com.ankamagames.dofus.network.messages.game.context.roleplay
        Public Class MapComplementaryInformationsDataMessage
     
            Private _isInitialized As Boolean = False
            Public subAreaId As UInteger = 0
            Public mapId As UInteger = 0
            Public subareaAlignmentSide As Integer = 0
            Public houses As New List(Of HouseInformations)
            Public actors As New List(Of GameRolePlayActorInformations)
            Public integereractiveElements As New List(Of InteractiveElement)
            Public statedElements As New List(Of StatedElement)
            Public obstacles As New List(Of MapObstacle)
            Public fights As New List(Of FightCommonInformations)
            Public protocolId As UInteger = 226
            Public var As New List(Of GameRolePlayNpcQuestFlag)
     
            Public Function MapComplementaryInformationsDataMessage()
     
                Me.houses = New List(Of HouseInformations)
                Me.actors = New List(Of GameRolePlayActorInformations)
                Me.integereractiveElements = New List(Of InteractiveElement)
                Me.statedElements = New List(Of StatedElement)
                Me.obstacles = New List(Of MapObstacle)
                Me.fights = New List(Of FightCommonInformations)
                Return Me
            End Function
     
            Public Overridable Function get_isInitialized() As Boolean
     
                Return Me._isInitialized
            End Function
     
            Public Overridable Function getMessageId() As UInteger
     
                Return 226
            End Function
     
            Public Function initMapComplementaryInformationsDataMessage(ByVal param1 As UInteger, ByVal param2 As UInteger, ByVal param3 As Integer, ByVal param4 As List(Of HouseInformations), ByVal param5 As List(Of GameRolePlayActorInformations), ByVal param6 As List(Of InteractiveElement), ByVal param7 As List(Of StatedElement), ByVal param8 As List(Of MapObstacle), ByVal param9 As List(Of FightCommonInformations)) As MapComplementaryInformationsDataMessage
     
                Me.subAreaId = param1
                Me.mapId = param2
                Me.subareaAlignmentSide = param3
                Me.houses = param4
                Me.actors = param5
                Me.integereractiveElements = param6
                Me.statedElements = param7
                Me.obstacles = param8
                Me.fights = param9
                Me._isInitialized = True
                Return Me
            End Function
     
            Public Overridable Function reset()
     
                Me.subAreaId = 0
                Me.mapId = 0
                Me.subareaAlignmentSide = 0
                Me.houses = New List(Of HouseInformations)
                Me.actors = New List(Of GameRolePlayActorInformations)
                Me.integereractiveElements = New List(Of InteractiveElement)
                Me.statedElements = New List(Of StatedElement)
                Me.obstacles = New List(Of MapObstacle)
                Me.fights = New List(Of FightCommonInformations)
                Me._isInitialized = False
                Return Me
            End Function
     
            Public Function pack(ByVal Sock As System.Net.Sockets.Socket)
                Dim writer As New DofusWriter()
                Me.serialize(writer)
                DofusWriter.Send(protocolId, Sock)
                Return Me
            End Function
     
            Public Overridable Function unpack(ByVal param1 As DofusReader, ByVal param2 As UInteger)
     
                Me.deserialize(param1)
                Return Me
            End Function
     
            Public Function serialize(ByVal param1 As DofusWriter)
     
                Me.serializeAs_MapComplementaryInformationsDataMessage(param1)
                Return Me
            End Function
     
            Public Function serializeAs_MapComplementaryInformationsDataMessage(ByVal param1 As DofusWriter)
                param1.WriteShort(Me.subAreaId)
                param1.WriteInt32(Me.mapId)
                param1.WriteByte(Me.subareaAlignmentSide)
                param1.WriteShort(Me.houses.Count)
                Dim _loc_2 As UInteger = 0
                While (_loc_2 < Me.houses.Count)
     
     
                    param1.WriteShort(Me.houses(_loc_2).getTypeId())
                    Me.houses(_loc_2).serialize(param1)
                    _loc_2 = _loc_2 + 1
                End While
     
                param1.WriteShort(Me.actors.Count)
                Dim _loc_3 As UInteger = 0
                While (_loc_3 < Me.actors.Count)
     
     
                    param1.WriteShort(Me.actors(_loc_3).getTypeId())
                    Me.actors(_loc_3).serialize(param1)
                    _loc_3 = _loc_3 + 1
                End While
                param1.WriteShort(Me.integereractiveElements.Count)
                Dim _loc_4 As UInteger = 0
                While (_loc_4 < Me.integereractiveElements.Count)
     
     
                    Me.integereractiveElements(_loc_4).serializeAs_InteractiveElement(param1)
                    _loc_4 = _loc_4 + 1
                End While
                param1.WriteShort(Me.statedElements.Count)
                Dim _loc_5 As UInteger = 0
                While (_loc_5 < Me.statedElements.Count)
     
     
                    Me.statedElements(_loc_5).serializeAs_StatedElement(param1)
                    _loc_5 = _loc_5 + 1
                End While
                param1.WriteShort(Me.obstacles.Count)
                Dim _loc_6 As UInteger = 0
                While (_loc_6 < Me.obstacles.Count)
     
     
                    Me.obstacles(_loc_6).serializeAs_MapObstacle(param1)
                    _loc_6 = _loc_6 + 1
                End While
                param1.WriteShort(Me.fights.Count)
                Dim _loc_7 As UInteger = 0
                While (_loc_7 < Me.fights.Count)
     
     
                    Me.fights(_loc_7).serializeAs_FightCommonInformations(param1)
                    _loc_7 = _loc_7 + 1
                End While
                Return Me
            End Function
     
            Public Function deserialize(ByVal param1 As DofusReader)
     
                Me.deserializeAs_MapComplementaryInformationsDataMessage(param1)
                Return Me
            End Function
     
            Public Function deserializeAs_MapComplementaryInformationsDataMessage(ByVal param1 As DofusReader)
     
                Dim _loc_14 As UInteger = 0
                Dim _loc_15 As HouseInformations = Nothing
                Dim _loc_16 As UInteger = 0
                Dim _loc_17 As GameRolePlayActorInformations = Nothing
                Dim _loc_18 As InteractiveElement = Nothing
                Dim _loc_19 As StatedElement = Nothing
                Dim _loc_20 As MapObstacle = Nothing
                Dim _loc_21 As FightCommonInformations = Nothing
                Dim var As GameRolePlayNpcQuestFlag = Nothing
     
                Me.subAreaId = param1.ReadShort()
                Me.mapId = param1.ReadInt()
                Me.subareaAlignmentSide = param1.ReadByte()
                Dim _loc_2 As UShort = param1.ReadUnSignedshort()
                Dim _loc_3 As UInteger = 0
                While (_loc_3 < _loc_2)
     
     
                    _loc_14 = param1.ReadUnSignedshort()
                    _loc_15 = ProtocolTypeManager.GetInstance(_loc_14)
                    _loc_15.deserialize(param1)
                    Me.houses.Add(_loc_15)
                    _loc_3 = _loc_3 + 1
                End While
                Dim _loc_4 As UShort = param1.ReadUnSignedshort()
                Dim _loc_5 As UInteger = 0
                While (_loc_5 < _loc_4)
     
     
                    _loc_16 = param1.ReadUnSignedshort()
                    _loc_17 = ProtocolTypeManager.GetInstance(_loc_16)
                    _loc_17.deserialize(param1)
                    Me.actors.Add(_loc_17)
                    _loc_5 = _loc_5 + 1
                End While
                Dim _loc_6 As UShort = param1.ReadUnSignedshort()
                Dim _loc_7 As UInteger = 0
                While (_loc_7 < _loc_6)
     
     
                    _loc_18 = New InteractiveElement()
                    _loc_18.deserialize(param1)
                    Me.integereractiveElements.Add(_loc_18)
                    _loc_7 = _loc_7 + 1
                End While
                Dim _loc_8 As UShort = param1.ReadUnSignedshort()
                Dim _loc_9 As UInteger = 0
                While (_loc_9 < _loc_8)
     
     
                    _loc_19 = New StatedElement()
                    _loc_19.deserialize(param1)
                    Me.statedElements.Add(_loc_19)
                    _loc_9 = _loc_9 + 1
                End While
                Dim _loc_10 As UShort = param1.ReadUnSignedshort()
                Dim _loc_11 As UInteger = 0
                While (_loc_11 < _loc_10)
     
     
                    _loc_20 = New MapObstacle()
                    _loc_20.deserialize(param1)
                    Me.obstacles.Add(_loc_20)
                    _loc_11 = _loc_11 + 1
                End While
                Dim _loc_12 As UShort = param1.ReadUnSignedshort()
                Dim _loc_13 As UInteger = 0
                While (_loc_13 < _loc_12)
     
     
                    _loc_21 = New FightCommonInformations()
                    _loc_21.deserialize(param1)
                    Me.fights.Add(_loc_21)
                    _loc_13 = _loc_13 + 1
                End While
                Return Me
            End Function
     
        End Class
    End Namespace
    Merci à vous
    Dernière modification par Deepin ; 26/12/2011 à 11h06. Motif: Balises [CODE]...[/CODE] au lieu de [QUOTE]...[/QUOTE]

  2. #2
    Membre Expert
    Avatar de GuruuMeditation
    Homme Profil pro
    .Net Architect
    Inscrit en
    Octobre 2010
    Messages
    1 705
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : .Net Architect
    Secteur : Conseil

    Informations forums :
    Inscription : Octobre 2010
    Messages : 1 705
    Par défaut
    La méthode ProtocolManagerType.GetInstance fait quoi?

  3. #3
    Invité
    Invité(e)
    Par défaut
    Elle relie a d'autre class:

    On voit:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    case 383
    objectvalue = GameRolePlayNpcQuestFlag
    donc _loc_16 = GameRolePlayNpcQuestFlag

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.character
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.look
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.character.choice
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.character.alignment
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.fight
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.character.restriction
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.guild
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.house
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.integereractive
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay.quest
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.data.items.effects
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.data.items
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.character.characteristic
    Imports WindowsApplication1.com.ankamagames.dofus.network.types.game.context.roleplay.party
    Imports WindowsApplication1.com.ankamagames.dofus.network.messages.handshake
     
    Public Class ProtocolTypeManager
        Public Shared Function GetInstance(ByVal Id As UInteger)
            Dim objectValue As Object = Nothing
            Select Case Id
     
                Case 11
                    objectValue = New Version
                    'Case 377
                    'objectValue = New TrustCertificate
                    'Case 25
                    '    objectValue = New GameServerInformations
                Case 55
                    objectValue = New EntityLook
                Case 54
                    objectValue = New SubEntity
                Case 110
                    objectValue = New CharacterMinimalInformations
                Case 163
                    objectValue = New CharacterMinimalPlusLookInformations
                    'Case 193
                    '  objectValue = New CharacterMinimalPlusLookAndGradeInformations
                Case 45
                    objectValue = New CharacterBaseInformations
                    'Case 212
                    '    objectValue = New CharacterToRecolorInformation
                    'Case 86
                    '    objectValue = New CharacterHardcoreInformations
                    'Case 63
                    '    objectValue = New EntityMovementInformations
                Case 60
                    objectValue = New EntityDispositionInformations
                    'Case 107
                    '    objectValue = New IdentifiedEntityDispositionInformations
                    'Case 217
                    '    objectValue = New FightEntityDispositionInformations
                Case 365
                    objectValue = New BasicGuildInformations
                Case 127
                    objectValue = New GuildInformations
                Case 204
                    objectValue = New ActorRestrictionsInformations
                Case 201
                    objectValue = New ActorAlignmentInformations
                    'Case 183
                    '    objectValue = New PaddockContentInformations
                    'Case 184
                    '    objectValue = New MountInformationsForPaddock
                Case 202
                    ' objectValue = New ActorExtendedAlignmentInformations
                    'Case 135
                    '    objectValue = New AlignmentBonusInformations
                    'Case 142
                    '    objectValue = New PrismSubAreaInformation
                    'Case 152
                    '    objectValue = New PrismConquestInformation
                    'Case 187
                    '    objectValue = New TaxCollectorName
                    'Case 96
                    '    objectValue = New TaxCollectorBasicInformations
                Case 4
                    objectValue = New CharacterBaseCharacteristic
                Case 215
                    ' objectValue = New CharacterSpellModification
                Case 8
                    'objectValue = New CharacterCharacteristicsInformations
                    'Case 117
                    '    objectValue = New FightExternalInformations
                Case 43
                    objectValue = New FightCommonInformations
                Case 44
                    objectValue = New FightTeamMemberInformations
                Case 13
                    objectValue = New FightTeamMemberCharacterInformations
                Case 6
                    objectValue = New FightTeamMemberMonsterInformations
                    'Case 177
                    '    objectValue = New FightTeamMemberTaxCollectorInformations
                Case 20
                    objectValue = New FightOptionsInformations
                Case 116
                    objectValue = New AbstractFightTeamInformations
                Case 33
                    objectValue = New FightTeamInformations
                    'Case 115
                    '    objectValue = New FightTeamLightInformations
                    'Case 31
                    '    objectValue = New GameFightMinimalStats
                    'Case 360
                    '    objectValue = New GameFightMinimalStatsPreparation
                Case 41
                    objectValue = New FightLoot
                Case 16
                    objectValue = New FightResultListEntry
                Case 189
                    objectValue = New FightResultFighterListEntry
                Case 191
                    objectValue = New FightResultAdditionalData
                Case 192
                    objectValue = New FightResultExperienceData
                    'Case 190
                    '    objectValue = New FightResultPvpData
                Case 24
                    objectValue = New FightResultPlayerListEntry
                    'Case 216
                    '    objectValue = New FightResultMutantListEntry
                    'Case 84
                    '    objectValue = New FightResultTaxCollectorListEntry
                    'Case 206
                    '    objectValue = New AbstractFightDispellableEffect
                    'Case 208
                    '    objectValue = New FightDispellableEffectExtendedInformations
                    'Case 209
                    '    objectValue = New FightTemporaryBoostEffect
                    'Case 366
                    '    objectValue = New FightTemporarySpellImmunityEffect
                    'Case 210
                    '    objectValue = New FightTriggeredEffect
                    'Case 207
                    '    objectValue = New FightTemporarySpellBoostEffect
                    'Case 211
                    '    objectValue = New FightTemporaryBoostWeaponDamagesEffect
                    'Case 214
                    '    objectValue = New FightTemporaryBoostStateEffect
                    'Case 353
                    '    objectValue = New ActorOrientation
                    'Case 205
                    '    objectValue = New GameFightSpellCooldown
                    'Case 364
                    '    objectValue = New GameFightResumeSlaveInfo
                Case 7
                    objectValue = New Item
                Case 49
                    objectValue = New SpellItem
                Case 76
                    objectValue = New ObjectEffect
                    'Case 74
                    '    objectValue = New ObjectEffectString
                Case 70
                    objectValue = New ObjectEffectInteger
                    'Case 82
                    '    objectValue = New ObjectEffectMinMax
                    'Case 73
                    '    objectValue = New ObjectEffectDice
                    'Case 72
                    '    objectValue = New ObjectEffectDate
                    'Case 75
                    '    objectValue = New ObjectEffectDuration
                    'Case 71
                    '    objectValue = New ObjectEffectCreature
                    'Case 81
                    '    objectValue = New ObjectEffectLadder
                    'Case 179
                    '    objectValue = New ObjectEffectMount
                    'Case 178
                    '    objectValue = New MountClientData
                    'Case 356
                    '    objectValue = New UpdateMountBoost
                    'Case 357
                    '    objectValue = New UpdateMountIntBoost
                    'Case 168
                    '    objectValue = New ItemDurability
                    'Case 85
                    '    objectValue = New GameActionMarkedCell
                    'Case 351
                    '    objectValue = New GameActionMark
                    'Case 123
                    '    objectValue = New GoldItem
                    'Case 358
                    '    objectValue = New ObjectEffects
                    'Case 124
                    '    objectValue = New ObjectItemMinimalInformation
                    'Case 352
                    '    objectValue = New ObjectItemToSellInNpcShop
                    'Case 119
                    '    '    objectValue = New ObjectItemQuantity
                    'Case 134
                    '    objectValue = New ObjectItemNotInContainer
                    'Case 37
                    '    objectValue = New ObjectItem
                    'Case 120
                    '    objectValue = New ObjectItemToSell
                    'Case 359
                    '    objectValue = New ObjectItemToSellInHumanVendorShop
                    'Case 164
                    '    objectValue = New ObjectItemToSellInBid
                    'Case 198
                    '    objectValue = New ObjectItemInRolePlay
                    'Case 197
                    '    objectValue = New ObjectItemWithLookInRolePlay
                    'Case 199
                    '    objectValue = New OrientedObjectItemWithLookInRolePlay
                    'Case 185
                    '    objectValue = New PaddockItem
                Case 369
                    objectValue = New Shortcut
                    'Case 367
                    '    objectValue = New ShortcutObject
                    'Case 371
                    '    objectValue = New ShortcutObjectItem
                    'Case 370
                    '    objectValue = New ShortcutObjectPreset
                    'Case 368
                    '    objectValue = New ShortcutSpell
                    'Case 121
                    '    objectValue = New SellerBuyerDescriptor
                    'Case 122
                    '    objectValue = New BidExchangerObjectInfo
                    'Case 52
                    '    objectValue = New StartupActionAddObject
                    'Case 363
                    '    objectValue = New Achievement
                    'Case 362
                    '    objectValue = New AchievementStartedPercent
                    'Case 361
                    '    objectValue = New AchievementStartedValue
                    'Case 106
                    '    objectValue = New IgnoredInformations
                    'Case 105
                    '    objectValue = New IgnoredOnlineInformations
                    'Case 78
                    '    objectValue = New FriendInformations
                    'Case 92
                    '    objectValue = New FriendOnlineInformations
                    'Case 77
                    '    objectValue = New FriendSpouseInformations
                    'Case 93
                    '    objectValue = New FriendSpouseOnlineInformations
                    'Case 88
                    '    objectValue = New GuildMember
                Case 87
                    objectValue = New GuildEmblem
                Case 219
                    objectValue = New InteractiveElementSkill
                    'Case 220
                    '    objectValue = New InteractiveElementNamedSkill
                Case 80
                    objectValue = New InteractiveElement
                Case 108
                    objectValue = New StatedElement
                Case 200
                    objectValue = New MapObstacle
                    'Case 213
                    '    objectValue = New PartyUpdateCommonsInformations
                Case 90
                    objectValue = New PartyMemberInformations
                    'Case 374
                    '    objectValue = New PartyGuestInformations
                    'Case 376
                    '    objectValue = New PartyInvitationMemberInformations
                    'Case 378
                    '    objectValue = New PartyMemberGeoPosition
                    'Case 373
                    '    objectValue = New DungeonPartyFinderPlayer
                    'Case 97
                    '    objectValue = New JobCrafterDirectorySettings
                    'Case 194
                    '    objectValue = New JobCrafterDirectoryEntryPlayerInfo
                    'Case 195
                    '    objectValue = New JobCrafterDirectoryEntryJobInfo
                    'Case 196
                    '    objectValue = New JobCrafterDirectoryListEntry
                    'Case 101
                    '    objectValue = New JobDescription
                    'Case 102
                    '    objectValue = New SkillActionDescription
                    'Case 103
                    '    objectValue = New SkillActionDescriptionTimed
                    'Case 99
                    '    objectValue = New SkillActionDescriptionCollect
                    'Case 100
                    '    objectValue = New SkillActionDescriptionCraft
                    'Case 104
                    '    objectValue = New SkillActionDescriptionCraftExtended
                    'Case 98
                    '    objectValue = New JobExperience
                Case 111
                    objectValue = New HouseInformations
                Case 112
                    'objectValue = New HouseInformationsExtended
                    'Case 218
                    '    objectValue = New HouseInformationsInside
                    'Case 170
                    '    objectValue = New HouseInformationsForGuild
                    'Case 221
                    '    objectValue = New HouseInformationsForSell
                    'Case 132
                    '    objectValue = New PaddockInformations
                    'Case 130
                    '    objectValue = New PaddockBuyableInformations
                    'Case 133
                    '    objectValue = New PaddockAbandonnedInformations
                    'Case 131
                    '    objectValue = New PaddockPrivateInformations
                    'Case 222
                    '    objectValue = New PaddockInformationsForSell
                Case 150
                    objectValue = New GameContextActorInformations
                Case 141
                    objectValue = New GameRolePlayActorInformations
                Case 157
                    objectValue = New HumanInformations
                Case 153
                    objectValue = New HumanWithGuildInformations
                Case 154
                    objectValue = New GameRolePlayNamedActorInformations
                Case 159
                    objectValue = New GameRolePlayHumanoidInformations
                Case 36
                    objectValue = New GameRolePlayCharacterInformations
                    'Case 3
                    '    objectValue = New GameRolePlayMutantInformations
                    'Case 129
                    '    objectValue = New GameRolePlayMerchantInformations
                    'Case 146
                    '    objectValue = New GameRolePlayMerchantWithGuildInformations
                    'Case 180
                    '    objectValue = New GameRolePlayMountInformations
                    'Case 147
                    '    objectValue = New TaxCollectorStaticInformations
                    'Case 148
                    '    objectValue = New GameRolePlayTaxCollectorInformations
                    'Case 167
                    '    objectValue = New TaxCollectorInformations
                    'Case 372
                    '    objectValue = New TaxCollectorLootInformations
                    'Case 166
                    '    objectValue = New TaxCollectorInformationsInWaitForHelpState
                    'Case 186
                    '    objectValue = New ProtectedEntityWaitingForHelpInfo
                    'Case 169
                    '    objectValue = New TaxCollectorFightersInformation
                    'Case 165
                    '    objectValue = New AdditionalTaxCollectorInformations
                    'Case 144
                    '    objectValue = New MonsterInGroupInformations
                Case 1
                    objectValue = New ProtocolRequired
                Case 140
                    objectValue = New GroupMonsterStaticInformations
                Case 160
                    objectValue = New GameRolePlayGroupMonsterInformations
                    'Case 155
                    '    objectValue = New NpcStaticInformations
                    'Case 156
                    '    objectValue = New GameRolePlayNpcInformations
                    'Case 161
                    '    objectValue = New GameRolePlayPrismInformations
                    'Case 143
                    '    objectValue = New GameFightFighterInformations
                    'Case 158
                    '    objectValue = New GameFightFighterNamedInformations
                    'Case 46
                    '    objectValue = New GameFightCharacterInformations
                    'Case 50
                    '    objectValue = New GameFightMutantInformations
                Case 151
                    '   objectValue = New GameFightAIInformations
                    'Case 29
                    '    objectValue = New GameFightMonsterInformations
                    'Case 203
                    '    objectValue = New GameFightMonsterWithAlignmentInformations
                    'Case 48
                    '    objectValue = New GameFightTaxCollectorInformations
                    'Case 174
                    'objectValue = New MapCoordinates
                    'Case 176
                    '    objectValue = New MapCoordinatesExtended
                    'Case 175
                    '    objectValue = New AtlasPointsInformations
                    'Case 354
                    '    objectValue = New PresetItem
                    'Case 355
                    '    objectValue = New Preset
                    'Case 350
                    '    objectValue = New ContentPart
                    'Case 36
                    '   objectValue = New 
                Case 383
                    objectValue = New GameRolePlayNpcQuestFlag
                Case Else
                    'MsgBox("MsgId: " & Id) ' si sa sa peut t'aider
                    Exit Select
     
            End Select
     
            Return objectValue
     
        End Function
    End Class
    Dernière modification par Deepin ; 26/12/2011 à 11h09. Motif: Balises [CODE]...[/CODE] au lieu de [QUOTE]...[/QUOTE]

  4. #4
    Membre Expert
    Avatar de GuruuMeditation
    Homme Profil pro
    .Net Architect
    Inscrit en
    Octobre 2010
    Messages
    1 705
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Belgique

    Informations professionnelles :
    Activité : .Net Architect
    Secteur : Conseil

    Informations forums :
    Inscription : Octobre 2010
    Messages : 1 705
    Par défaut
    Ca me parait normal, vu que _loc_17 est déclaré comme GameRolePlayActorInformations (dans ton 1er message, code ligne 163) et que tu essaye après d'assigner une autre classe (qui n'est visiblementpas une classe dérivée).

Discussions similaires

  1. mises-à-jour impossibles: dpkg indique une erreur
    Par Celano dans le forum Administration système
    Réponses: 5
    Dernier message: 02/03/2012, 18h30
  2. erreur impossible d'effectuer un cast?
    Par gilles_906 dans le forum VB.NET
    Réponses: 6
    Dernier message: 04/04/2011, 22h51
  3. Réponses: 0
    Dernier message: 16/08/2010, 12h24
  4. Réponses: 1
    Dernier message: 04/05/2010, 21h29
  5. Impossible d'attraper une erreur
    Par jagboys dans le forum C++Builder
    Réponses: 2
    Dernier message: 16/06/2005, 00h15

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo