File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed
packages/pokemon-files/src/pkm Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,11 @@ export default class PA8 {
103103 isNoble : boolean
104104 ribbons : string [ ]
105105 trainerGender : boolean
106+ originalBytes ?: ArrayBuffer
106107 constructor ( arg : ArrayBuffer | AllPKMFields , encrypted ?: boolean ) {
107108 if ( arg instanceof ArrayBuffer ) {
108109 let buffer = arg
110+ this . originalBytes = buffer
109111 if ( encrypted ) {
110112 const unencryptedBytes = encryption . decryptByteArrayGen8A ( buffer )
111113 const unshuffledBytes = encryption . unshuffleBlocksGen8A ( unencryptedBytes )
Original file line number Diff line number Diff line change @@ -93,9 +93,11 @@ export default class PA9 {
9393 tmFlagsLza : Uint8Array
9494 ribbons : string [ ]
9595 trainerGender : boolean
96+ originalBytes ?: ArrayBuffer
9697 constructor ( arg : ArrayBuffer | AllPKMFields , encrypted ?: boolean ) {
9798 if ( arg instanceof ArrayBuffer ) {
9899 let buffer = arg
100+ this . originalBytes = buffer
99101 if ( encrypted ) {
100102 const unencryptedBytes = encryption . decryptByteArrayGen89 ( buffer )
101103 const unshuffledBytes = encryption . unshuffleBlocksGen89 ( unencryptedBytes )
Original file line number Diff line number Diff line change @@ -121,10 +121,9 @@ export abstract class PK3CFRU implements PluginPKMInterface {
121121 constructor ( arg : ArrayBuffer | OHPKM ) {
122122 if ( arg instanceof ArrayBuffer ) {
123123 let buffer = arg
124+ this . originalBytes = buffer
124125 const dataView = new DataView ( buffer )
125126
126- this . originalBytes = arg
127-
128127 // https://github.com/Skeli789/Complete-Fire-Red-Upgrade/blob/master/include/new/pokemon_storage_system.h
129128 // https://github.com/Skeli789/Complete-Fire-Red-Upgrade/blob/master/include/pokemon.h
130129
You can’t perform that action at this time.
0 commit comments