mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Add RTC ResetKey calc
This commit is contained in:
parent
cc70939dc2
commit
caf25efb46
|
|
@ -529,6 +529,16 @@ public override bool GetCaught(int species)
|
|||
return (Data[Offsets.PokedexCaught + ofs] & bitval) != 0;
|
||||
}
|
||||
|
||||
// Misc
|
||||
public ushort ResetKey => GetResetKey();
|
||||
private ushort GetResetKey()
|
||||
{
|
||||
var val = (TID >> 8) + (TID & 0xFF) + (Money >> 8) + (Money & 0xFF);
|
||||
var ot = Data.Skip(Offsets.Trainer1 + 2).TakeWhile((z, i) => i < 5 && z != 0x50);
|
||||
var tr = ot.Sum(z => z);
|
||||
return (ushort)(val + tr);
|
||||
}
|
||||
|
||||
public override string GetString(int Offset, int Count)
|
||||
{
|
||||
if (Korean)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user