예제 #1
0
 public EveEntity(EveObject ball, EveItem item, long id)
 {
     _item = item;
     _ball = ball;
     Id = id;
     this.PointerToObject = ball.PointerToObject;
 }
예제 #2
0
        // 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
        /// <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
 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
 //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
 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
 //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);
     }
 }