Imports Lux_Bot.Dofus
Imports Lux_Bot.com.ankamagames.dofus.network.types.game.house
Imports Lux_Bot.com.ankamagames.dofus.network.types.game.context.roleplay
Imports Lux_Bot.com.ankamagames.dofus.network.types.game.context.fight
Imports Lux_Bot.com.ankamagames.dofus.network.types.game.interactive
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 InteractiveElements 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 Function MapComplementaryInformationsDataMessage()
Me.houses = New List(Of HouseInformations)
Me.actors = New List(Of GameRolePlayActorInformations)
Me.InteractiveElements = 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.InteractiveElements = 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.InteractiveElements = 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.InteractiveElements.Count)
Dim _loc_4 As UInteger = 0
While (_loc_4 < Me.InteractiveElements.Count)
Me.InteractiveElements(_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
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.InteractiveElements.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