⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainclient.vb.svn-base

📁 MirUnleashed vb.net Module modMainServer Public WithEvents Socket As New WinsockServer Pub
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
                Actor.MaxAC = Part(i)
                i += 1
                Actor.AMC = Part(i)
                i += 1
                Actor.MaxAMC = Part(i)
                i += 1
                Actor.DC = Part(i)
                i += 1
                Actor.MaxDC = Part(i)
                i += 1
                Actor.MC = Part(i)
                i += 1
                Actor.MaxMC = Part(i)
                i += 1
                Actor.SC = Part(i)
                i += 1
                Actor.MaxSC = Part(i)
                i += 1
                Actor.HP = Part(i)
                i += 1
                Actor.MaxHP = Part(i)
                i += 1
                Actor.MP = Part(i)
                i += 1
                Actor.MaxMP = Part(i)
                i += 1
                Actor.Experience = Part(i)
                i += 1
                Actor.MaxExperience = Part(i)
                i += 1
                Actor.Accuracy = Part(i)
                i += 1
                Actor.Agility = Part(i)
                i += 1
                Actor.AntiMagic = Part(i)
                i += 1
                Actor.AntiPoison = Part(i)
                i += 1
                Actor.HandWeight = Part(i)
                i += 1
                Actor.MaxHandWeight = Part(i)
                i += 1
                Actor.WearWeight = Part(i)
                i += 1
                Actor.MaxWearWeight = Part(i)
                i += 1
                Actor.Weight = Part(i)
                i += 1
                Actor.MaxWeight = Part(i)
                i += 1
                Actor.Speed = Part(i)
                i += 1
                Actor.Holy = Part(i)
                i += 1
                Actor.PoisonRecovery = Part(i)
                i += 1
                Actor.MPRecovery = Part(i)
                i += 1
                Actor.HPRecovery = Part(i)
                i += 1
                Actor.Level = Part(i)

            Case GameMsg.SM_CHAT
                Dim Body As String = DecodePacketBody(Packet)

                'Add Body to chat in colour Header.wParam
                AddChat(Body, Header.wParam, Header.nRecog)
                'ChatterId = Header.nRecog, if Header.nRecog < 0 then dont show message above head

            Case GameMsg.SM_GOGAME_OK
                Scene = SceneType.GAME
                Dim Body As String = DecodePacketBody(Packet)

                Actor.AllowGroup = Trim(Header.wParam)
                Actor.AllowGroupRecall = Trim(Header.wTag)
                Actor.AttackMode = Header.wSeries
                Actor.Direction = Body

            Case GameMsg.SM_APPEAR
                Dim Race As Races = Header.wParam
                Packet = DecodePacketBody(Packet)

                Select Case Race
                    Case Races.Player
                        Dim Part() As String = Split(Packet, "/")
                        Dim i As Integer = 0

                        Dim PlayerID As Long = Header.nRecog

                        Dim Name As String = Part(i)
                        i += 1
                        Dim NameColour As NameColours = Part(i)
                        i += 1
                        Dim Guild As String = Part(i)
                        i += 1
                        Dim PlayerX As Short = Part(i)
                        i += 1
                        Dim PlayerY As Short = Part(i)
                        i += 1
                        Dim Dir As Byte = Part(i)
                        i += 1
                        Dim MagicShield As Boolean = Trim(Part(i))
                        i += 1
                        Dim Hair As Byte = Part(i)
                        i += 1
                        Dim Weapon As Integer = Part(i)
                        i += 1
                        Dim Gender As Genders = Part(i)
                        i += 1
                        Dim Looks As Integer = Part(i)
                        i += 1
                        Dim HP As Integer = Part(i)
                        i += 1
                        Dim MP As Integer = Part(i)
                        i += 1
                        Dim MaxHP As Integer = Part(i)
                        i += 1
                        Dim MaxMP As Integer = Part(i)
                        i += 1
                        Dim Reved As Boolean = Trim(Part(i))
                        i += 1
                        Dim Light As Byte = Part(i)
                        i += 1
                        Dim IsDead As Boolean = Trim(Part(i))
                        i += 1
                        Dim Poison As Integer = Part(i)
                        i += 1
                        Dim GuildTitle As String = Part(i)
                        i += 1
                        Dim GuildRankNumber As Integer = Part(i)

                        AddPlayer(PlayerID, Name, NameColour, Guild, PlayerX, PlayerY, Dir, MagicShield, Hair, Gender, HP, MP, MaxHP, MaxMP, Reved, Light, IsDead, Poison, GuildTitle, GuildRankNumber)

                    Case Races.Monster
                        Dim Part() As String = Split(Packet, "/")
                        Dim i As Integer

                        Dim mId As Long = Part(i)
                        i += 1
                        Dim mName As String = Part(i)
                        i += 1
                        Dim mNameColour As Integer = Part(i)
                        i += 1
                        Dim mLight As Byte = Part(i)
                        i += 1
                        Dim mDir As Byte = Part(i)
                        i += 1
                        Dim mmX As Short = Part(i)
                        i += 1
                        Dim mmY As Short = Part(i)
                        i += 1
                        Dim mHP As Integer = Part(i)
                        i += 1
                        Dim mMaxHP As Integer = Part(i)
                        i += 1
                        Dim mMobImg As Integer = Part(i)
                        i += 1
                        Dim mPoison As Byte = Part(i)
                        i += 1
                        Dim mIsDead As Boolean = Trim(Part(i))
                        i += 1
                        Dim mIsPet As Boolean = Trim(Part(i))
                        i += 1
                        Dim mPetOwner As String = Part(i)
                        i += 1
                        Dim mReved As Boolean = Trim(Part(i))

                        AddMob(mId, mMobImg, mmX, mmY, mDir, mName, mNameColour, mPoison, mIsDead, mReved, mHP, mMaxHP, mIsPet, mPetOwner, mLight)

                    Case Races.Npc
                        Dim Part() As String = Split(Packet, "/")
                        Dim i As Integer = 0

                        Dim NpcId As Short = Part(i)
                        i += 1
                        Dim NpcName As String = Part(i)
                        i += 1
                        Dim NpcDir As Byte = Part(i)
                        i += 1
                        Dim NpcX As Short = Part(i)
                        i += 1
                        Dim NpcY As Short = Part(i)
                        i += 1
                        Dim NpcLook As Integer = Part(i)

                        AddNPC(NpcId, NpcLook, NpcX, NpcY, NpcDir, NpcName)
                End Select

            Case GameMsg.SM_DISAPPEAR
                Select Case Header.wParam 'Race
                    Case Races.Player
                        RemovePlayer(Header.nRecog)
                    Case Races.Monster
                        RemoveMob(Header.nRecog)
                    Case Races.Npc
                        RemoveNPC(Header.nRecog)
                End Select

            Case GameMsg.SM_PLAYER_LOOKS_CHANGED
                Packet = DecodePacketBody(Packet)
                Dim Part() As String = Split(Packet, "/")

                Dim PlayerID As Integer = Header.nRecog
                Dim ArmourLooks As Integer = Part(0)
                Dim WeaponLooks As Integer = Part(1)
                Dim Hair As Integer = Part(2)
                Dim Reved As Boolean = Trim(Part(3))

                If PlayerID = Actor.ServerID Then
                    Beep()
                End If

                Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Clothing).Shape = ArmourLooks
                If Not ArmourLooks = 0 Then Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Clothing).Exist = True Else Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Clothing).Exist = False
                Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Weapon).Shape = WeaponLooks
                If Not WeaponLooks = 0 Then Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Weapon).Exist = True Else Player(PlayerGameIndex(PlayerID)).EquipItem(EquipType.Weapon).Exist = False

                Player(PlayerGameIndex(PlayerID)).Hair = Hair
                Player(PlayerGameIndex(PlayerID)).HealthBarOpen = Reved

            Case GameMsg.SM_HIT
                Dim HitterId As Integer = Header.nRecog
                Dim HitterRace As Races = Header.wParam
                Dim HitterDir As Byte = Header.wTag
                Dim HitterX, HitterY As Short
                Select Case HitterRace
                    Case Races.Player
                        HitterX = Player(PlayerGameIndex(HitterId)).X
                        HitterY = Player(PlayerGameIndex(HitterId)).Y
                        ProcessPlayerAction(PlayerActionType.Attack, HitterId, HitterDir, 0, HitterX, HitterY)
                    Case Races.Monster
                        HitterX = Mob(MobGameIndex(HitterId)).X
                        HitterY = Mob(MobGameIndex(HitterId)).Y
                        ProcessMobAction(PlayerActionType.Attack, HitterId, HitterDir, HitterX, HitterY)
                End Select

            Case GameMsg.SM_STRUCK
                Packet = DecodePacketBody(Packet)

                Select Case Header.nRecog
                    Case Races.Player
                        Dim Part() As String = Split(Packet, "/")
                        Dim i As Integer

                        Dim PlayerID As Integer = Part(i)
                        i += 1
                        Dim pDir As Byte = Part(i)
                        i += 1
                        Dim pHP As Integer = Part(i)
                        i += 1
                        Dim pMP As Integer = Part(i)
                        i += 1
                        Dim pMaxHP As Integer = Part(i)
                        i += 1
                        Dim pMaxMP As Integer = Part(i)
                        i += 1
                        Dim pPoison As Poisons = Part(i)

                        If Not PlayerID = Actor.ServerID Then
                            ProcessPlayerAction(PlayerActionType.Stun, PlayerID, pDir, 0, Player(PlayerGameIndex(PlayerID)).X, Player(PlayerGameIndex(PlayerID)).Y)
                        Else
                            ProcessPlayerAction(PlayerActionType.Stun, PlayerID, pDir, 0, Actor.X, Actor.Y)
                        End If

                        ChangePlayerHPMP(PlayerID, 0, pHP)
                        ChangePlayerHPMP(PlayerID, 1, pMP)

                    Case Races.Monster
                        Dim Part() As String = Split(Packet, "/")
                        Dim i As Integer

                        Dim mId As Long = Part(i)
                        i += 1
                        Dim mDir As Byte = Part(i)
                        i += 1
                        Dim mHP As Integer = Part(i)
                        i += 1
                        Dim mMaxHP As Integer = Part(i)
                        i += 1
                        Dim mPoison As Poisons = Part(i)

                        ProcessMobAction(PlayerActionType.Stun, mId, mDir, Mob(MobGameIndex(mId)).X, Mob(MobGameIndex(mId)).Y)
                        ChangeMobHPMP(mId, 0, mHP)
                End Select

            Case GameMsg.SM_DIED
                Dim tId As Integer = Header.nRecog
                Dim tRace As Races = Header.wParam

                Select Case tRace
                    Case Races.Player
                        ProcessPlayerAction(PlayerActionType.Die, tId, Player(PlayerGameIndex(tId)).Dir, 0, Player(PlayerGameIndex(tId)).X, Player(PlayerGameIndex(tId)).Y)
                    Case Races.Monster
                        ProcessMobAction(PlayerActionType.Die, tId, Mob(MobGameIndex(tId)).Direction, Mob(MobGameIndex(tId)).X, Mob(MobGameIndex(tId)).Y)
                End Select

            Case GameMsg.SM_TURN_OK
                Dim Race As Races = Header.wParam

                Select Case Race
                    Case Races.Player
                        Dim Id As Integer = Header.nRecog
                        Dim Dir As Byte = Header.wTag

                        If Not Id = Actor.ServerID Then
                            ProcessPlayerChangeDirection(Id, Dir)
                        End If

                    Case Races.Monster
                        Dim Id As Long = Header.nRecog
                        Dim Dir As Byte = Header.wTag

                        ProcessMobChangeDirection(Id, Dir)
                End Select

            Case GameMsg.SM_TURN_FAIL
                Packet = DecodePacketBody(Packet)
                Dim CordX As Short = Header.nRecog
                Dim CordY As Short = Header.wParam
                Dim mDir As Byte = Header.wTag

                Actor.X = CordX
                Actor.Y = CordY

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -