コード例 #1
0
        private static unsafe Identity GetModelIdentity()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(Identity.None);
            }

            return(*N3Playfield_t.GetModelID(pPlayfield));
        }
コード例 #2
0
        private static string GetName()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(String.Empty);
            }

            return(Marshal.PtrToStringAnsi(N3Playfield_t.GetName(pPlayfield)));
        }
コード例 #3
0
        internal static IntPtr GetSurface()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(IntPtr.Zero);
            }

            return(N3Playfield_t.GetSurface(pPlayfield));
        }
コード例 #4
0
        private static bool IsBattleStationPF()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(false);
            }

            return(N3Playfield_t.IsBattleStation(pPlayfield));
        }
コード例 #5
0
        public static bool LineOfSight(Vector3 pos1, Vector3 pos2, int zoneCell = 1, bool unknown = false)
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(false);
            }

            return(N3Playfield_t.LineOfSight(pPlayfield, &pos1, &pos2, zoneCell, false));
        }
コード例 #6
0
        private static unsafe List <Room> GetRooms()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero || !IsDungeon)
            {
                return(new List <Room>());
            }

            return((*N3Playfield_t.GetZones(pPlayfield)).ToList().Select(x => new Room(x)).ToList());
        }
コード例 #7
0
        private static unsafe List <Zone> GetZones()
        {
            IntPtr pPlayfield = N3EngineClient_t.GetPlayfield();

            if (pPlayfield == IntPtr.Zero)
            {
                return(new List <Zone>());
            }

            return((*N3Playfield_t.GetZones(pPlayfield)).ToList().Select(x => new Zone(x)).ToList());
        }
コード例 #8
0
ファイル: Main.cs プロジェクト: baburukiri/AOSharp
        public void N3Playfield_t__AddChildDynel_Hook(IntPtr pThis, IntPtr pDynel, IntPtr pos, IntPtr rot)
        {
            //Let the client load the dynel before we notify the GameController of it's spawn.
            N3Playfield_t.AddChildDynel(pThis, pDynel, pos, rot);

            try
            {
                if (_pluginProxy != null)
                {
                    _pluginProxy.DynelSpawned(pDynel);
                }
            }
            catch (Exception) { }
        }