WinForms->Core logic absorbing (CommonEdits)
loading ShowdownSet now applies properties to PKM instead of PKMEditor
Contest/IVs for Static/Trades are no longer set by default (less object
allocations), and are now checked by the encounter generator
extract common nature amp logic
generic ienumerable copyto which now returns count of elements copied
(maybe useful later). prior usages never tried to copy an enumerable
larger than the dest array (now length checked).
If the Hidden Power set doesn't match what is required (missing Hyper
Trained IVs), will need to adjust IVs.
Compute the first matching hidden power IV set by permuting flawless IVs
to flawed.
Closes#1821
reflection (now only used for backwards conversion) will use destination
order instead of source order so that the destination can order itself
for quirks
redo method call (probably breaks someone if they update, maybe pk2pk)
standard generation 3 pkm content & interactions
generic inter-converter (more efficient than reflection)
update conversion methods; specific format conversion is now in the
object's src file now.
may be worth doing for gen4 pk4<->bk4
StringLength is the raw buffer size, needs to be offset by 1 as the
string length enforced does not consider the terminator
12char OT name in sav7 loaded to tabs -> load gen1/2 save = exception
(now fixed)
condense repeated logic, reduce overall operations
removes 1 array alloc for pkm encryption (shuffle clones the array, so
don't clone->clone)
removes 1 array alloc for pkm decryption (mutate encrypted array), be
aware that no current use cases input an encrypted region and expect the
reference to stay encrypted (always was a temp array).
remove duplicate bounds checks (early return & for loop)
GetBytes returns an array that is immediately discarded (GC pressure)
reduces overhead when loading large pkm collections from save files
(shaved off a couple seconds from my loading from 200+ bak saves)
could probably go faster with unsafe code to r/w ushort directly
then again im profiling under debug but i'd assume the improvements made
actually do improve speed for release builds
Species and Nicknamed params were never used; foreign always resulted in
true for cases when it actually mattered.
Filter to the non-fullwidth characters, check the char type (latin base
vs jp/zh/ko) in order to determine if the full/half symbols should be
squished
could be faster replacing char instead of string, so change those
add two test cases for half width & full width string
sanitization/unsanitization
fix bk4 ribbon checks (lacked interface inheritance)
change MN -> UM for get blank save (unused in PKHeX solution)
prevent inheriting from derived pkm classes
get language list now doesn't return new objects (or re-enumerate)
update rand usage to be inclusive for top bound, extend shuffle to
collections
remove unnecessary location overrides (already overriden in legal fetch)
Some species have the same unicode name in CHS and in CHT, so it will lose language info after converting from a in-game string to textbox (The game will use different fonts to distinguish them, bad GF)
This change will give CHT encoding a higher priorty if the pkm is in CHT, although it's possible to get CHS encoding default species name with CHT language ID.
Also fixed previous editing error