예제 #1
0
        public FFXIVMemory(EnmityOverlay overlay, Process process)
        {
            _overlay = overlay;
            _process = process;
            if (process.ProcessName == "ffxiv")
            {
                _mode = FFXIVClientMode.FFXIV_32;
                throw new MemoryScanException(String.Format("DX9 is not supported."));
            }
            else if (process.ProcessName == "ffxiv_dx11")
            {
                _mode = FFXIVClientMode.FFXIV_64;
            }
            else
            {
                _mode = FFXIVClientMode.Unknown;
            }
            overlay.LogDebug("Attatching process: {0} ({1})",
                             process.Id, (_mode == FFXIVClientMode.FFXIV_64 ? "dx11" : "other"));

            this.getPointerAddress();

            Combatants = new List <Combatant>();

            _thread = new Thread(new ThreadStart(doScanCombatants));
            _thread.IsBackground = true;
            _thread.Start();

            overlay.LogInfo("Attatched process successfully, pid: {0} ({1})",
                            process.Id, (_mode == FFXIVClientMode.FFXIV_64 ? "dx11" : "other"));
        }
예제 #2
0
        //internal byte GetZoneInstance()
        //{
        //    if (_mode == FFXIVClientMode.FFXIV_32)
        //        return GetByteArray(IntPtr.Add(_process.MainModule.BaseAddress, zoneInstanceAddress32.ToInt32()), 1)[0];
        //    else
        //        return GetByteArray(IntPtr.Add(_process.MainModule.BaseAddress, zoneInstanceAddress64.ToInt32()), 1)[0];
        //}

        public FFXIVMemory(Process process)
        {
            Process = process;
            if (process.ProcessName == "ffxiv")
            {
                _mode = FFXIVClientMode.FFXIV_32;
            }
            else if (process.ProcessName == "ffxiv_dx11")
            {
                _mode = FFXIVClientMode.FFXIV_64;
            }
            else
            {
                _mode = FFXIVClientMode.Unknown;
            }

            GetPointerAddress();

            Combatants = new List <Combatant>();
            cts        = new CancellationTokenSource();
            _thread    = new Thread(new ThreadStart(ScanMemoryLoop))
            {
                IsBackground = true
            };
            _thread.Start();
        }
예제 #3
0
        public FFXIVMemory(EnmityOverlay overlay, Process process)
        {
            _overlay = overlay;
            _process = process;
            if (process.ProcessName == "ffxiv")
            {
                _mode = FFXIVClientMode.FFXIV_32;
            }
            else if (process.ProcessName == "ffxiv_dx11")
            {
                _mode = FFXIVClientMode.FFXIV_64;
            }
            else
            {
                _mode = FFXIVClientMode.Unknown;
            }
            overlay.LogInfo("Attached process: {0} ({1})",
                process.Id, (_mode == FFXIVClientMode.FFXIV_32 ? "dx9" : "dx11"));

            this.getPointerAddress();

            _thread = new Thread(new ThreadStart(doScanCombatants));
            _thread.IsBackground = true;
            _thread.Start();
        }