VB/VB.Net Mes questions

A

Anonymous

Invité
#41
Je me disais aussi qu'il n'y en avait pas.
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#42
J'ai un ProtocolTypeManager ^^, le voici ( à la demande de lolodu92 ) ci dessus :

Imports client.Types.Game.Look
Imports client.Types.Game.Character
Imports client.Types.Game.Character.Choice
Imports client.Types.Game.Context
Imports client.Types.Game.Character.Restriction
Imports client.Types.Game.Context.Roleplay
Imports client.Types.Game.Character.Alignment
Imports client.Types.Game.Character.Characteristic
Imports client.Types.Game.House
Imports client.Types.Game.Interactive
Imports client.Types.Game.Context.Fight


Public Class ProtocolTypeManager
Public Shared Function GetInstance(ByVal Id As UInteger)
Dim objectValue As Object = Nothing
Select Case Id


'Case 25
' objectValue = New GameServerInformations
'Case 193
' objectValue = New CharacterMinimalPlusLookAndGradeInformations
Case 11
objectValue = New Version
Case 55
objectValue = New EntityLook
Case 54
objectValue = New SubEntity
Case 110
objectValue = New CharacterMinimalInformations
Case 163
objectValue = New CharacterMinimalPlusLookInformations
Case 45
objectValue = New CharacterBaseInformations
Case 60
objectValue = New EntityDispositionInformations
Case 204
objectValue = New ActorRestrictionsInformations
Case 201
objectValue = New ActorAlignmentInformations
Case 202
objectValue = New ActorExtendedAlignmentInformations
Case 4
objectValue = New CharacterBaseCharacteristic
Case 215
objectValue = New CharacterSpellModification
Case 8
objectValue = New CharacterCharacteristicsInformations
Case 150
objectValue = New GameContextActorInformations
Case 141
objectValue = New GameRolePlayActorInformations
Case 369
objectValue = New Shortcut
Case 111
objectValue = New HouseInformations
Case 219
objectValue = New InteractiveElementSkill
Case 80
objectValue = New InteractiveElement
Case 108
objectValue = New StatedElement
Case 200
objectValue = New MapObstacle
Case 43
objectValue = New FightCommonInformations
Case 154
objectValue = New GameRolePlayNamedActorInformations
Case 33
objectValue = New FightTeamInformations
Case 20
objectValue = New FightOptionsInformations
Case 44
objectValue = New FightTeamMemberInformations
Case 116
objectValue = New AbstractFightTeamInformations
' Case 7
' objectValue = New Item
' Case 49
' objectValue = New SpellItem
' Case 6
' objectValue = New FightTeamMemberMonsterInformations
' Case 157
' objectValue = New HumanInformations
' Case 153
' objectValue = New HumanWithGuildInformations
'Case 159
' objectValue = New GameRolePlayHumanoidInformations
' Case 36
' objectValue = New GameRolePlayCharacterInformations
' Case 70
' objectValue = New ObjectEffectInteger
'Case 212
' objectValue = New CharacterToRecolorInformation
'Case 86
' objectValue = New CharacterHardcoreInformations
'Case 63
' objectValue = New EntityMovementInformations
'Case 107
' objectValue = New IdentifiedEntityDispositionInformations
'Case 217
' objectValue = New FightEntityDispositionInformations
'Case 365
' objectValue = New BasicGuildInformations
'Case 127
' objectValue = New GuildInformations
'Case 183
' objectValue = New PaddockContentInformations
'Case 184
' objectValue = New MountInformationsForPaddock
'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 117
' objectValue = New FightExternalInformations
'Case 13
' objectValue = New FightTeamMemberCharacterInformations
'Case 177
' objectValue = New FightTeamMemberTaxCollectorInformations
'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 76
' objectValue = New ObjectEffect
'Case 74
' objectValue = New ObjectEffectString
'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 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 220
' objectValue = New InteractiveElementNamedSkill
'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 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 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 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 Else
'MsgBox("MsgId: " & Id)
Exit Select

End Select

Return objectValue

End Function
End Class
 
A

Anonymous

Invité
#43
Enlève l'apostrophe dans : 'MsgBox("MsgId: " & Id)

Ensuite sa va t'afficher un id, l'id correspond a une class de ton ProtocolTypeManager qu'il va falloir traduire.

C'est bizard tu as exactement le même protocolTypeManager que moi, celui que j'ai filé à un ancien membre de cadernis qui ma ignorer sur skype m'ayant raconté pas mal de belles histoires. Même nom de variable. Etrange
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#44
Je ne peux pas lancer le bot vu que j'ai une erreur sur l'entitydispositionInformations dans le GameContextActorInformations.
 
A

Anonymous

Invité
#45
Ta fais un import de ton ProtocolTypeManager dans GameContextActorInformations ?
Ou as-tu eu ton protocolTypeManager ?
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#46
Je sais pas quoi faire pour que cette erreur disparaisse, voici ma class ( j'ai fais un import mais ça change rien, toujours le problème du "type utilisé en tant qu'expression" ) :

Imports client.Types.Game.Look
Imports client.ProtocolTypeManager
Namespace Types.Game.Context


Public Class GameContextActorInformations

Public contextualId As Integer = 0
Public look As EntityLook
Public disposition As EntityDispositionInformations
Public protocolId As UInteger = 150

Public Function GameContextActorInformations()

Me.look = New EntityLook()
Me.disposition = New EntityDispositionInformations()
Return Me
End Function

Public Function getTypeId() As UInteger

Return protocolId
End Function

Public Function initGameContextActorInformations(ByVal param1 As Integer, ByVal param2 As EntityLook, ByVal param3 As EntityDispositionInformations) As GameContextActorInformations

Me.contextualId = param1
Me.look = param2
Me.disposition = param3
Return Me
End Function

Public Function reset()

Me.contextualId = 0
Me.look = New EntityLook()
Return Me
End Function

' Public Function serialize(ByVal param1 As Dofus.DofusWriter)

' Me.serializeAs_GameContextActorInformations(param1)
' Return Me
' End Function

'Public Function serializeAs_GameContextActorInformations(ByVal param1 As Dofus.DofusWriter)

'param1.writeInt(Me.contextualId)
' Me.look.serializeAs_EntityLook(param1)
' param1.writeShort(Me.disposition.getTypeId())
' Me.disposition.serialize(param1)
' Return
' End Function

Public Function deserialize(ByVal param1 As Dofus.DofusReader)

Me.deserializeAs_GameContextActorInformations(param1)
Return Me
End Function

Public Function deserializeAs_GameContextActorInformations(ByVal param1 As Dofus.DofusReader)

Me.contextualId = param1.ReadInt()
Me.look = New EntityLook()
Me.look.deserialize(param1)
Dim _loc_2 As UShort = param1.ReadUnSignedshort()
Me.disposition = ProtocolTypeManager.GetInstance(EntityDispositionInformations, _loc_2)
Me.disposition.deserialize(param1)
Return Me
End Function

End Class
End Namespace

J'ai eu ce ProtocolTypeManager sur le forum je crois ( il y a un bout de temps ). En revanche ton nom n'était pas mentionné lolodu92
 
A

Anonymous

Invité
#47
Enlève , _loc_2

;)
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#48
Ca change rien ...
 
A

Anonymous

Invité
#49
Cela doit être un décalage causé par toute les lignes mise en commentaires.
 
A

Anonymous

Invité
#50
Pardon c'est l'inverse:
Me.disposition = ProtocolTypeManager.GetInstance( _loc_2)
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#51
Plus d'erreur, je test et je donne une réponse.

Edit :
Public Overrides Function ReadByte() As Byte
Return MyBase.ReadByte()
End Function

Toujours un problème de stream ...
L'erreur peut se produire où à votre avis, seulement dans les Types ou avant d'attaquer le protocoltypemanager ?
 
A

Anonymous

Invité
#52
A quel packet se produit l'erreur ? Met y un peu du tient. Dès que tu voit l'erreur tu postes tu cherche même pas à comprendre !
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#53
Ah ok en fait vous savez même pas de quoi je parle ^^. Alors je réexplique :

Je veux récupérer le nom du personnage qui entre sur la map ( packet 5632 ) via le packet GameRoleplayNamedActorInformations. Lorsque je test et que je reçois le packet 5632, on m'emmène vers l'erreur ci-dessus me disant que l'exception EndOfStreamException ...
Quand je fais en pas à pas, je reste bloqué dans une boucle dans EntityLook, celle ci :

Code:
While (_loc_5 < _loc_4)


                _loc_11 = param1.ReadInt32()
                Me.indexedColors.Add(_loc_11)
                _loc_5 = _loc_5 + 1
            End While
Elle me dirige vers mon dofusreader puis revient et ainsi de suite, sans aucun changement.
Voilà les informations que j'ai.
 
A

Anonymous

Invité
#54
Quand tu dis tu reste bloquer, sa veut dire que la boucle ne se finit pas ?

Peut être parce que tu es sur une map ou il y a beaucoup d'actor, car indexedcolor = couleur, il y en a 8 par personnage.
 

ToOnS

Membre Actif
Inscrit
8 Avril 2009
Messages
974
Reactions
0
#55
peu importe le nombre d'actors sur la map loc_4 = 8 de toute facon (donc si il fait pas 8 alors c'est que l'erreur est avant)
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#56
loc_4 = 21 chez moi o_O et loc_5 = 0
loc_5 correspond à quoi ?
loc_11 = 11141866
 

ToOnS

Membre Actif
Inscrit
8 Avril 2009
Messages
974
Reactions
0
#57
ca se trouve j'ai dit des conneries pour loc-4 , il y'a peu etre 21 couleurs par perso (ca faut voir avec quelqu'un qui a un truc en etat de fonctionner) , loc_5 c'est le compteur de la boucle (+1 a chaque boucle jusque 21) donc en fait tu es pas bloqué dans la boucle c'est juste que tu passes 21 fois dedant et loc11 c'est une des 21 couleurs
si il n'y a pas 21 couleurs (je suis pas en mesure de verifier j'ai pas VB en ce moment) alors le decalage est avant ca sinon il est apres
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#58
donc en fait je dois faire le tour 21 fois pour en sortir ? xD
 
A

Anonymous

Invité
#59
J'ai un créateur de personnage et je peux vous confirmer que pour les monstre ET les joueurs c'est 8 couleurs.

Non tu dois faire le tour 8 fois par actor.
 
Inscrit
16 Aout 2011
Messages
184
Reactions
0
#60
euh si on réfléchit bien j'ai donc un problème parce que 21 n'est pas un multiple de 8 ...
 
Haut Bas