Exemple #1
0
        public static void AddStatPoints(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events)
        {
            var strength      = packet.ReadInt();
            var dexterity     = packet.ReadInt();
            var intellingence = packet.ReadInt();
            var strtoadd      = packet.ReadInt();
            var dextoadd      = packet.ReadInt();
            var inttoadd      = packet.ReadInt();

            builder.New(0x0A58);
            {
                builder += 0; //add or remove?
                builder += strength + strtoadd;
                builder += dexterity + dextoadd;
                builder += intellingence + inttoadd;
            }

            Character character = client.Metadata["fullchar"] as Character;
            var       id        = character.id;
            var       server    = (int)client.Metadata["server"];
            var       sync      = client.Metadata["syncServer"] as SyncReceiver;
            int       pnt       = -(strtoadd + dextoadd + inttoadd);

            CharacterManagement.UpdateStatPoints(sync, server, id, strength + strtoadd, intellingence + inttoadd, dexterity + dextoadd, pnt);

            client.Send(builder, "AddStatPoints");
        }