Ejemplo n.º 1
0
 public static void AttackSelectedObject(this LocalPlayerCharacterView instance)
 {
     instance.InputHandler.AttackCurrentTarget();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Return a list with all inventory items.
 /// </summary>
 /// <param name="instance"> LocalPlayerCharacterview</param>
 /// <returns></returns>
 public static List <lg> GetInventoryItems(this LocalPlayerCharacterView instance)
 {
     return(instance.LocalPlayerCharacter.sm().eg().dv().ToList());
 }
Ejemplo n.º 3
0
 public static bool RequestMove(this LocalPlayerCharacterView instance, Vector3 position)
 {
     return(instance.RequestMove(position.c()));
 }
Ejemplo n.º 4
0
 public static float GetMaxLoad(this LocalPlayerCharacterView instance)
 {
     return(instance.LocalPlayerCharacter.we());
 }
Ejemplo n.º 5
0
 public static float GetLoadPercent(this LocalPlayerCharacterView instance)
 {
     return(instance.GetLoad() / instance.GetMaxLoad() * 100.0f * 2f);
 }
Ejemplo n.º 6
0
 public static bool CanLoot(this HarvestableObjectView view, LocalPlayerCharacterView localPlayer) => view.GetHarvestableObject().CanLoot(localPlayer);
Ejemplo n.º 7
0
 public static bool IsMounted(this LocalPlayerCharacterView instance)
 {
     return(instance.LocalPlayerCharacter.u3());
 }
Ejemplo n.º 8
0
 public static void CastAt(this LocalPlayerCharacterView instance, SpellSlotIndex slot, Vector3 target)
 {
     _startCastInternalPosition.Invoke(instance.InputHandler, new object[] { (byte)slot, target.c() });
 }
Ejemplo n.º 9
0
 public static void Interact(this LocalPlayerCharacterView instance, WorldObjectView target)
 {
     _doActionStaticObjectInteraction.Invoke(instance.InputHandler, new object[] { target, String.Empty });
 }
Ejemplo n.º 10
0
 public static arp GetTool(this HarvestableObjectView instance, LocalPlayerCharacterView player)
 {
     return(instance.HarvestableObject.az(player.LocalPlayerCharacter, true));
 }
Ejemplo n.º 11
0
 public static EquipmentItemProxy GetTool(this HarvestableObject obj, LocalPlayerCharacterView player)
 {
     return(obj.GetTool(player.GetLocalPlayerCharacter(), false));
 }
 public static bool CanLoot(this SilverObjectView view, LocalPlayerCharacterView localPlayer) => view.GetSilverObject().CanLoot();
Ejemplo n.º 13
0
        private IEnumerator GetViews()
        {
            while (true)
            {
                try
                {
                    localPlayer = FindObjectOfType <LocalPlayerCharacterView>();
                }
                catch (Exception e)
                {
                    Core.Log("ESP Finding localPlayer error: " + e);
                }

                yield return(new WaitForSeconds(0.2f));

                try
                {
                    players = FindObjectsOfType <PlayerCharacterView>();
                }
                catch (Exception e)
                {
                    Core.Log("ESP Finding players Error: " + e);
                }

                yield return(new WaitForSeconds(1f));

                try
                {
                    var harvestables = FindObjectsOfType <HarvestableObjectView>().Where(view =>
                    {
                        var harvestableObject = view.GetHarvestableObject();

                        var resourceType     = harvestableObject.GetResourceType().Value;
                        var tier             = (Tier)harvestableObject.GetTier();
                        var enchantmentLevel = (EnchantmentLevel)harvestableObject.GetRareState();

                        var info = new GatherInformation(resourceType, tier, enchantmentLevel);

                        return(enchantmentLevel > 0 && gatherInformations[info]);
                    }).ToArray();

                    var mobs = FindObjectsOfType <MobView>().Where(view =>
                    {
                        var resourceType = view.GetResourceType();
                        if (!resourceType.HasValue)
                        {
                            return(false);
                        }

                        var tier             = (Tier)view.GetTier();
                        var enchantmentLevel = (EnchantmentLevel)view.GetRareState();

                        var info = new GatherInformation(resourceType.Value, tier, enchantmentLevel);

                        return(enchantmentLevel > 0 && gatherInformations[info]);
                    }).ToArray();

                    resources = harvestables.OfType <SimulationObjectView>().Union(mobs.OfType <SimulationObjectView>()).ToArray();
                }
                catch (Exception e)
                {
                    Core.Log("ESP Finding Harvestable Views Error: " + e);
                }

                yield return(new WaitForSeconds(1f));
            }
        }
Ejemplo n.º 14
0
 public Spell(LocalPlayerCharacterView owner, adt internalSpell, SpellSlotIndex slot)
 {
     _owner         = owner;
     _internalSpell = internalSpell;
     _slot          = slot;
 }
Ejemplo n.º 15
0
 public static void CastOnSelf(this LocalPlayerCharacterView instance, SpellSlotIndex slot)
 {
     instance.CastOn(slot, instance);
 }
Ejemplo n.º 16
0
 public static float GetMaxHealth(this LocalPlayerCharacterView instance)
 {
     return(instance.LocalPlayerCharacter.v4().l());
 }
Ejemplo n.º 17
0
 public static void CastOn(this LocalPlayerCharacterView instance, SpellSlotIndex slot, FightingObjectView target)
 {
     _startCastInternalTarget.Invoke(instance.InputHandler, new object[] { (byte)slot, target });
 }
Ejemplo n.º 18
0
 public static IEnumerable <SpellSlot> Ready(this IEnumerable <SpellSlot> spells, LocalPlayerCharacterView player) => spells.Where(spell => player.GetFightingObject().IsReadyToCast(spell.Slot));