} // @ public bool Synthing() /// <summary> /// Gets the PLAYERINFO struct from FFACE /// </summary> private PLAYERINFO GetPlayerInformation() { PLAYERINFO playerInfo = new PLAYERINFO(); GetPlayerInfo(_InstanceID, ref playerInfo); return(playerInfo); } // @ private PLAYERINFO GetPlayerInfo()
/* * At 0x1 the character name is available, but C# throws a Run time error because it's not aligned on proper boundaries, * therefore I'm not making it available for now as that'd require me to unalign everything else. * Refer to ENTITYINFO(0) for name. */ #region Constructor public Player(PLAYERINFO structure, IntPtr address) : base(structure, address) { Initialize(); string temp = Encoding.Default.GetString(new ArraySegment <byte> (structure.MarkName, 1, 32).ToArray()); for (int i = 0; i < 32; ++i) { if (temp [i] == 0) { Name = temp.Substring(0, i); break; } } }
private static extern void GetPlayerInfo(int instanceID, ref PLAYERINFO playerInfo);
/// <summary> /// Gets the PLAYERINFO struct from FFACE /// </summary> private PLAYERINFO GetPlayerInformation() { PLAYERINFO playerInfo = new PLAYERINFO(); GetPlayerInfo(_InstanceID, ref playerInfo); return playerInfo; }
/* * At 0x1 the character name is available, but C# throws a Run time error because it's not aligned on proper boundaries, * therefore I'm not making it available for now as that'd require me to unalign everything else. * Refer to ENTITYINFO(0) for name. */ #region Constructor public Player(PLAYERINFO structure, IntPtr address) : base(structure, address) { Initialize(); }