コード例 #1
0
ファイル: AIInterface.cs プロジェクト: wardev1/WarEmu-1
        public override bool Load()
        {
            Evt = _Owner.EvtInterface;
            if (_Owner.IsUnit())
            {
                Cbt = _Owner.GetUnit().CbtInterface;
                Mvt = _Owner.GetUnit().MvtInterface;
            }

            Evt.AddEvent(UpdateThink, BrainThinkTime + RandomMgr.Next(0, 2000), 0);
            Evt.AddEventNotify(EventName.ON_TARGET_DIE, OnTargetDie);

            return(base.Load());
        }
コード例 #2
0
ファイル: AIInterface.cs プロジェクト: dzikun/WarEmu
        public override bool Load()
        {
            Evt = _Owner.EvtInterface;
            if (_Owner.IsUnit())
            {
                Cbt = _Owner.GetUnit().CbtInterface;
                Mvt = _Owner.GetUnit().MvtInterface;
            }

            Evt.AddEvent(UpdateThink, BrainThinkTime + RandomMgr.Next(0, 2000), 0);
            Evt.AddEventNotify(EventName.ON_TARGET_DIE, OnTargetDie);

            return base.Load();
        }
コード例 #3
0
        public override bool Load()
        {
            Evt = Obj.EvtInterface;
            if (Obj.IsUnit())
            {
                Cbt = Obj.GetUnit().CbtInterface;
                Mvt = Obj.GetUnit().MvtInterface;
            }

            if (Evt != null)
            {
                Evt.AddEvent(UpdateThink, BrainThinkTime, 0);
            }

            return(base.Load());
        }
コード例 #4
0
        public Instance(ushort zoneid, ushort id, byte realm, Instance_Lockouts lockouts)
        {
            Lockout = lockouts;
            ID      = id;
            ZoneID  = zoneid;
            Realm   = realm;
            Region  = new RegionMgr(zoneid, ZoneService.GetZoneRegion(zoneid));
            InstanceService._InstanceInfo.TryGetValue(zoneid, out Info);
            LoadBossSpawns();
            LoadSpawns(); // todo get the saved progress from group
            _running      = true;
            _evtInterface = new EventInterface();
            closetime     = (TCPManager.GetTimeStamp() + 7200);
            new Thread(Update).Start();



            Log.Success("Opening Instance", "Instance ID " + ID + "  Map: " + Info.Name);
            if (zoneid == 179)
            {
                foreach (var p in GameObjectService.GameObjectSpawns.Where(e => e.Value.ZoneId == 179))
                {
                    if (p.Value.Entry == 98908)
                    {
                        GameObject go = new GameObject(p.Value);

                        _Objects.Add(go);
                        Region.AddObject(go, zoneid, true);
                    }
                }

                if (_Objects.Count > 0)
                {
                    LoadObjects();
                }
                _evtInterface.AddEvent(UpdatePendulums, 7000, 0);
            }
        }
コード例 #5
0
ファイル: AIInterface.cs プロジェクト: Necrosummon/WarEmu
        public override bool Load()
        {
            Evt = Obj.EvtInterface;
            if (Obj.IsUnit())
            {
                Cbt = Obj.GetUnit().CbtInterface;
                Mvt = Obj.GetUnit().MvtInterface;
            }

            if(Evt != null)
                Evt.AddEvent(UpdateThink, BrainThinkTime, 0);

            return base.Load();
        }