public static void updateStatsAttributes(Character chr, short[] attributes = null, short sp = -1) { if(attributes != null) { chr.setStr(attributes[0]); chr.setDex(attributes[1]); chr.setVit(attributes[2]); chr.setInt(attributes[3]); chr.setAgi(attributes[4]); } if(sp != -1) { chr.setStatPoints(sp); } CharacterFunctions.calculateCharacterStatistics(chr); OutPacket p = new OutPacket(32); p.WriteInt(32); p.WriteShort(0x04); p.WriteShort(0x1d); p.WriteInt(0x01); p.WriteInt(chr.getuID()); p.WriteShort(0x01); p.WriteShort(chr.getStr()); // Strength p.WriteShort(chr.getDex()); // Dextery p.WriteShort(chr.getVit()); // Vitality p.WriteShort(chr.getInt()); // Intelligence p.WriteShort(chr.getAgi()); // Agility p.WriteShort(chr.getStatPoints()); // statusPoints p.WriteByte(0x40); p.WriteByte(0x2a); chr.getAccount().mClient.WriteRawPacket(p.ToArray()); }