Untitled

 avatar
unknown
plain_text
2 years ago
2.9 kB
5
Indexable
										UInt32 Target = _pck.ReadUInt32(); // Unique ID from player
                                        byte unk = _pck.ReadUInt8();
                                        if (unk == 0) // SKY CLICK
                                        {
                                                byte unk2 = _pck.ReadUInt8();
                                                short unk3 = _pck.ReadInt16();//no idea
                                                byte unk4 = _pck.ReadUInt8();

                                        }
                                        short Region = _pck.ReadInt16();
                                        int RegionL = Region.ToString().Length;

                                        // Make sure region is 5 numbers.
                                        if (RegionL == 5 && pck.GetBytes().Length >= 10 && pck.GetBytes().Length <= 34 || RegionL == 6 && pck.GetBytes().Length >= 19 && pck.GetBytes().Length <= 34)
                                        {
										
                                          this.selfWalkLatestRegion = Region;
                                                if (unk != 0)
                                                {
                                                    PosInfo posInfo = new PosInfo();
                                                    posInfo.regionId = Region;
                                                    if (Region < 0)
                                                    {
                                                        posInfo.cordX = (short)_pck.ReadInt32();
                                                        posInfo.cordY = (short)_pck.ReadInt32();
                                                        posInfo.cordZ = (short)_pck.ReadInt32();
                                                        this.CharData.PosInfo = posInfo;
                                                    }
                                                    else
                                                    {
                                                        posInfo.cordX = _pck.ReadInt16();
                                                        posInfo.cordY = _pck.ReadInt16();
                                                        posInfo.cordZ = _pck.ReadInt16();
                                                        this.CharData.PosInfo = posInfo;
                                                    }
                                                }

                                            }
                                            else
                                            {
                                                // Register false.
                                                this.selfWalkLatestRegion = -1;
                                            }