Namespace Types.Game.Look
Public Class EntityLook
Public bonesId As UInteger = 0
Public skins As New List(Of UInteger)
Public indexedColors As New List(Of Integer)
Public scales As New List(Of Integer)
Public subentities As New List(Of SubEntity)
Public Const protocolId As UInteger = 55
Public Function EntityLook()
Me.skins = New List(Of UInteger)
Me.indexedColors = New List(Of Integer)
Me.scales = New List(Of Integer)
Me.subentities = New List(Of SubEntity)
Return Me
End Function
Public Function getTypeId() As UInteger
Return 55
End Function
Public Function initEntityLook(param1 As UInteger, param2 As List(Of UInteger), param3 As List(Of Integer), param4 As List(Of Integer), param5 As List(Of SubEntity)) As EntityLook
Me.bonesId = param1
Me.skins = param2
Me.indexedColors = param3
Me.scales = param4
Me.subentities = param5
Return Me
End Function
Public Function reset()
Me.bonesId = 0
Me.skins = New List(Of UInteger)
Me.indexedColors = New List(Of Integer)
Me.scales = New List(Of Integer)
Me.subentities = New List(Of SubEntity)
Return Me
End Function
Public Function deserialize(param1 As Dofus.DofusReader)
Me.deserializeAs_EntityLook(param1)
Return Me
End Function
Public Function deserializeAs_EntityLook(param1 As Dofus.DofusReader)
Dim loc_10 As UInteger
Dim loc_11 As Integer
Dim loc_12 As Integer
Dim loc_13 As SubEntity
Me.bonesId = param1.ReadInt16
If (Me.bonesId < 0) Then
Console.WriteLine("Forbidden value (" + Me.bonesId.ToString + ") on element of EntityLook.bonesId.")
End If
Dim loc_2 = param1.ReadInt16
Dim loc_3 As UInteger
While (loc_3 < loc_2)
loc_10 = param1.ReadInt32
If (loc_10 < 0) Then
Console.WriteLine("Forbidden value (" + loc_10.ToString + ") on elements of skins.")
End If
Me.skins.Add(loc_10)
loc_3 += 1
End While
Dim loc_4 = param1.ReadUnSignedshort <- le bug vient d'ici, valeur = 1500{UShort}, le reader indique que le flux est terminé ce qui est logique vu la taille de loc_4
Dim loc_5 As UInteger
While (loc_5 < loc_4)
loc_11 = param1.ReadInt32
Me.indexedColors.Add(loc_11)
loc_5 += 1
End While
Dim loc_6 = param1.ReadUInt16
Dim loc_7 As UInteger
While (loc_7 < loc_6)
loc_12 = param1.ReadShort()
Me.scales.Add(loc_12)
loc_7 += 1
End While
Dim loc_8 = param1.ReadUInt16
Dim loc_9 As UInteger
While (loc_9 < loc_8)
loc_13 = New SubEntity()
loc_13.deserialize(param1)
Me.subentities.Add(loc_13)
loc_9 += 1
End While
Return Me
End Function
End Class
End Namespace