Пример #1
0
        public static Int32 ViewDraw_DrawChildren(String message)
        {
            try
            {
                Process process = Process.ThisProcess();

                return(0);


                GUC.WorldObjects.Character.Player pl = GUC.WorldObjects.Character.Player.Hero;
                if (pl == null)
                {
                    return(0);
                }

                if (pl.ItemList.Count == 0)
                {
                    return(0);
                }

                if (pl.ItemList[0].Address == 0)
                {
                    return(0);
                }
                if (oCGame.Game(process).World.Address == 0)
                {
                    return(0);
                }

                if (rndrWorld == null)
                {
                    rndrWorld = zCWorld.Create(process);
                    rndrWorld.IsInventoryWorld = true;
                }
                oCItem item = new oCItem(process, pl.ItemList[0].Address);

                zCView zV = zCView.Create(Process.ThisProcess(), 0, 0, 0x2000, 0x2000);
                zV.FillZ = true;
                zV.Blit();

                zCView.GetScreen(Process.ThisProcess()).InsertItem(zV, 0);
                item.RenderItem(rndrWorld, zV, 0.0f);
                zCView.GetScreen(Process.ThisProcess()).RemoveItem(zV);
                zV.Dispose();
            }
            catch (Exception ex)
            {
                zERROR.GetZErr(Process.ThisProcess()).Report(4, 'G', ex.ToString(), 0, "ViewDraw_DrawChildren", 0);
            }
            return(0);
        }
Пример #2
0
        public void RemoveAllObjects()
        {
            Process process = Process.ThisProcess();


            zCWorld zWorld = oCGame.Game(process).World;


            Dictionary <zCVob.VobTypes, List <zCVob> > vobDict = zWorld.getVobLists(zCVob.VobTypes.Item, zCVob.VobTypes.MobInter, zCVob.VobTypes.MobBed, zCVob.VobTypes.MobDoor, zCVob.VobTypes.MobContainer, zCVob.VobTypes.MobSwitch);

            foreach (KeyValuePair <zCVob.VobTypes, List <zCVob> > vobTypePair in vobDict)
            {
                foreach (zCVob vob in vobTypePair.Value)
                {
                    zWorld.RemoveVob(vob);
                }
            }

            List <zCVob> vobList = zWorld.getVobList(zCVob.VobTypes.Npc);

            foreach (zCVob vob in vobList)
            {
                if (vob.Address == oCNpc.Player(process).Address)
                {
                    continue;
                }

                if (sWorld.SpawnedVobDict.ContainsKey(vob.Address))
                {
                    sWorld.SpawnedVobDict[vob.Address].Address = 0;
                    sWorld.SpawnedVobDict.Remove(vob.Address);
                }

                oCGame.Game(process).GetSpawnManager().DeleteNPC(new oCNpc(process, vob.Address));
            }
        }