Zepheus.Zone.Game.ZoneCharacter.WriteDetailedInfo C# (CSharp) Method

WriteDetailedInfo() public method

public WriteDetailedInfo ( Packet pPacket ) : void
pPacket Packet
return void
        public void WriteDetailedInfo(Packet pPacket)
        {
            pPacket.WriteInt(ID);
            pPacket.WriteString(this.Name, 16);
            pPacket.WriteByte(this.Slot);
            pPacket.WriteByte(this.Level);
            pPacket.WriteLong(this.Exp);
            pPacket.WriteInt(12345678);                // UNK
            pPacket.WriteShort(this.StonesHP);
            pPacket.WriteShort(this.StonesSP);
            pPacket.WriteUInt(this.HP);
            pPacket.WriteUInt(this.SP);
            pPacket.WriteInt(this.Fame);                // Fame
            pPacket.WriteLong(this.Money); //TODO: inventory class
            pPacket.WriteString(this.Map.MapInfo.ShortName, 12);
            pPacket.WriteInt(this.Position.X);
            pPacket.WriteInt(this.Position.Y);
            pPacket.WriteByte(this.Rotation);
            pPacket.WriteByte(this.Str);   // Str bonus
            pPacket.WriteByte(this.End);   // End bonus
            pPacket.WriteByte(this.Dex);   // Dex bonus
            pPacket.WriteByte(this.Int);   // Int bonus
            pPacket.WriteByte(this.Spr);   // Spr bonus
            pPacket.WriteShort(0);               // UNK
            pPacket.WriteUInt(0);               // Killpoints
            pPacket.Fill(7, 0);                 // UNK
        }

Usage Example

Example #1
0
 public static void SendCharacterInfo(ZoneCharacter character)
 {
     using (var packet = new Packet(SH4Type.CharacterInfo))
     {
         character.WriteDetailedInfo(packet);
         character.Client.SendPacket(packet);
     }
 }