コード例 #1
0
ファイル: EveEntity.cs プロジェクト: AlexYukikaze/EBot
 public EveEntity(EveObject ball, EveItem item, long id)
 {
     _item = item;
     _ball = ball;
     Id = id;
     this.PointerToObject = ball.PointerToObject;
 }
コード例 #2
0
ファイル: EveClient.cs プロジェクト: Pgde/EBot-master
        // sm.RemoteSvc('userSvc').ApplyPilotLicence(itemID, justQuery=False)
        public bool ApplyPilotLicence(EveItem lic)
        {
            //needs testing
            Frame.Client.GetService("userSvc").CallMethod("ApplyPilotLicence", new object[] { lic.ItemId, true }, true);

            return true;
        }
コード例 #3
0
ファイル: EveClient.cs プロジェクト: Pgde/EBot-master
        /// <summary>
        /// populates a dictionary with current entities
        /// </summary>
        void PopulateEntityDictionary()
        {
            var activeTargets = TargetManager["targetsByID"].GetDictionary<long>().Keys;
            var beingTargeted = TargetManager["targeting"].GetDictionary<long>(); // Dictionary is <long, datetime> where datetime states when targeting started
            var targetedBy = TargetManager["targetedBy"].GetList<long>();
            var jammers = Frame.Client.Tactical["jammers"].GetDictionary<long>();

            _entityDictionary = new Dictionary<long, EveEntity>();

            var ballpark = GetService("michelle").CallMethod("GetBallpark", new object[] { });
            var balls = ballpark["balls"];
            if (!balls.IsValid)
            {
                return;
            }
            var ballKeyList = balls.CallMethod("keys", new object[0]).GetList<long>();

            foreach (var num in ballKeyList)
            {
                if (num > 0L)
                {
                    EveObject parent = ballpark.CallMethod("GetInvItem", new object[] { num });
                    if (!parent.IsValid)
                        break;
                    EveItem item = new EveItem(parent);
                    EveObject ball = ballpark.CallMethod("GetBall", new object[] { num });
                    EveEntity ent = new EveEntity(ball, item, num);
                    _entityDictionary.Add(num, ent);

                    ent.IsTarget = activeTargets.Contains(num);
                    ent.IsBeingTargeted = beingTargeted.Keys.Contains<long>(num);
                    ent.IsTargetingMe = targetedBy.Contains(num);
                    ent.IsActiveTarget = num == GetActiveTargetId;
                    ent.IsAbandoned = ballpark.CallMethod("IsAbandoned", new object[] { num }).GetValueAs<bool>();
                    ent.HaveLootRights = ballpark.CallMethod("HaveLootRight", new object[] { num }).GetValueAs<bool>();
                    ent.IsWreckEmpty = StateService.CallMethod("CheckWreckEmpty", new object[] { item }).GetValueAs<bool>();
                    ent.IsWreckAlreadyViewed = StateService.CallMethod("CheckWreckViewed", new object[] { item }).GetValueAs<bool>();

                    if (jammers.ContainsKey(num))
                    {
                        foreach (var effect in jammers[num].GetDictionary<string>())
                        {
                            switch (effect.Key)
                            {
                                case "webify":
                                    ent.IsWebbingMe = true;
                                    break;
                                case "ewTargetPaint":
                                    ent.IsTargetPaintingMe = true;
                                    break;
                                case "warpScrambler":
                                    ent.IsWarpScramblingMe = true;
                                    break;
                                case "ewEnergyNeut":
                                    ent.IsEnergyNeutingMe = true;
                                    break;
                                case "ewEnergyVampire":
                                    ent.IsEnergyNOSingMe = true;
                                    break;
                                case "electronic":
                                    ent.IsJammingMe = true;
                                    break;
                                case "ewRemoteSensorDamp":
                                    ent.IsSensorDampeningMe = true;
                                    break;
                                case "ewTrackingDisrupt":
                                    ent.IsTrackingDisruptingMe = true;
                                    break;
                                default:
                                    break;
                            }
                        }
                    }
                }
            }
        }
コード例 #4
0
ファイル: EveClient.cs プロジェクト: Pgde/EBot-master
 public void refreshorders(EveItem item)
 {
     Frame.Client.GetService("marketQuote").CallMethod("RefreshOrderCache", new object[] { item.TypeId }, true);
     Frame.Client.GetService("marketQuote").CallMethod("RefreshJumps", new object[] { item.TypeId, Frame.Client.Session.SolarSystemId }, true);
 }
コード例 #5
0
ファイル: EveClient.cs プロジェクト: Pgde/EBot-master
 //def InjectSkillIntoBrain(self, invItems):     untested
 public void InjectSkillIntoBrain(EveItem skillbook)
 {
     List<EveItem> tmp = new List<EveItem>();
             tmp.Add(skillbook);
             Frame.Client.GetService("menu").CallMethod("InjectSkillIntoBrain", new object[] { tmp }, true);
             return;
 }
コード例 #6
0
ファイル: EveModule.cs プロジェクト: Pgde/EBot-master
 public void ChangeAmmo(EveItem charge)
 {
     //if (charge._itemId <= 0L)
     //    return;
     //this.CallMethod("ChangeAmmoType", new object[] { charge.TypeId, charge.Stacksize }, true);
 }
コード例 #7
0
 public void Add(EveItem item, int quantity)
 {
     this["invController"].CallMethod("_BaseInvContainer__AddItem", new object[] { item.ItemId, item.LocationId, quantity }, true);
 }
コード例 #8
0
 public void Add(EveItem item)
 {
     this["invController"].CallMethod("_AddItem", new object[] { item }, true);
 }
コード例 #9
0
ファイル: EveMarketOrder.cs プロジェクト: Pgde/EBot-master
 //def SellStuff(self, stationID, typeID, itemID, price, quantity, duration = 0, useCorp = False, located = None):
 public void sell(int quant, EveItem itemsell)
 {
     if (Frame.Client.Session.InStation)
     {
     if (quant > volRemaining)
     {
         quant = volRemaining;
     }
     if (quant > itemsell.Quantity)
     {
         quant = itemsell.Quantity;
     }
     Frame.Client.GetService("marketQuote").CallMethod("SellStuff", new object[] {Frame.Client.Session.stationId, itemsell.TypeId, itemsell.ItemId, price, quant },true);
     }
 }