mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-05-20 17:58:09 -05:00
Added GtsRecordBase.Pokemon property.
This commit is contained in:
parent
7ab18824f6
commit
1900c5fa45
|
|
@ -71,13 +71,35 @@ namespace PkmnFoundations.Structures
|
|||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
m_data = null;
|
||||
m_data_readonly = null;
|
||||
m_pokemon = null;
|
||||
return;
|
||||
}
|
||||
if (value.Length != 0xEC) throw new ArgumentException("PKM length is incorrect");
|
||||
m_data = value;
|
||||
m_data_readonly = new ReadOnlyCollection<byte>(m_data);
|
||||
m_pokemon = null;
|
||||
}
|
||||
}
|
||||
private byte[] m_data;
|
||||
private ReadOnlyCollection<byte> m_data_readonly;
|
||||
private PokemonParty4 m_pokemon;
|
||||
|
||||
public override PokemonPartyBase Pokemon
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DataActual == null || m_pokedex == null)
|
||||
return null;
|
||||
if (m_pokemon == null)
|
||||
m_pokemon = new PokemonParty4(m_pokedex, DataActual);
|
||||
|
||||
return m_pokemon;
|
||||
}
|
||||
}
|
||||
|
||||
public byte Unknown1;
|
||||
public byte Unknown2;
|
||||
|
|
|
|||
|
|
@ -71,13 +71,36 @@ namespace PkmnFoundations.Structures
|
|||
}
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
m_data = null;
|
||||
m_data_readonly = null;
|
||||
//m_pokemon = null;
|
||||
return;
|
||||
}
|
||||
if (value.Length != 0xEC) throw new ArgumentException("PKM length is incorrect");
|
||||
m_data = value;
|
||||
m_data_readonly = new ReadOnlyCollection<byte>(m_data);
|
||||
//m_pokemon = null;
|
||||
}
|
||||
}
|
||||
private byte[] m_data;
|
||||
private ReadOnlyCollection<byte> m_data_readonly;
|
||||
//private PokemonParty5 m_pokemon;
|
||||
|
||||
public override PokemonPartyBase Pokemon
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DataActual == null || m_pokedex == null)
|
||||
return null;
|
||||
throw new NotImplementedException();
|
||||
//if (m_pokemon == null)
|
||||
// m_pokemon = new PokemonParty4(m_pokedex, DataActual);
|
||||
|
||||
//return m_pokemon;
|
||||
}
|
||||
}
|
||||
|
||||
public byte Unknown1;
|
||||
public byte Unknown2;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ namespace PkmnFoundations.Structures
|
|||
}
|
||||
}
|
||||
|
||||
public abstract PokemonPartyBase Pokemon
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// National Dex species number
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user