Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        subscribedObject = other.gameObject;
        itemGiver        = subscribedObject.GetComponent <ItemGiver>();
        Item item = subscribedObject.gameObject.GetComponent <ItemGiver>().item;

        if (item != null && itemGiver != null)
        {
            subscribedItem = item;
            Debug.Log($"Subscribed : {item.Name}");
        }
    }
Ejemplo n.º 2
0
        public void Start()
        {
            _valheimToolerRect = new Rect(5, 5, 800, 300);

            PlayerHacks.Start();
            EntitiesItemsHacks.Start();
            ItemGiver.Start();
            MiscHacks.Start();
            ESP.Start();

            _version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }
Ejemplo n.º 3
0
        public void Update()
        {
            if (Input.GetKeyDown(KeyCode.Delete))
            {
                _showMainWindow = !_showMainWindow;
            }

            PlayerHacks.Update();
            EntitiesItemsHacks.Update();
            ItemGiver.Update();
            MiscHacks.Update();
            ESP.Update();
        }
Ejemplo n.º 4
0
        public void OnGUI()
        {
            GUI.skin = InterfaceMaker.CustomSkin;

            if (_showMainWindow)
            {
                _valheimToolerRect = GUILayout.Window(1001, _valheimToolerRect, ValheimToolerWindow, VTLocalization.instance.Localize($"$vt_main_title (v{_version})"), GUILayout.Height(10), GUILayout.Width(10));

                if (s_showItemGiver)
                {
                    ItemGiver.DisplayGUI();
                }
            }

            ESP.DisplayGUI();
        }
        public static async Task <dynamic> Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            try{
                string body = await req.ReadAsStringAsync();

                var context = JsonConvert.DeserializeObject <FunctionExecutionContext <dynamic> >(body);
                var args    = context.FunctionArgument;

                // 引数でテーブル名を渡す
                dynamic dropTableName = null;
                if (args != null && args["dropTableName"] != null)
                {
                    dropTableName = args["dropTableName"];
                }

                // ドロップテーブルからアイテムを取得する
                var evaluateResult = await EvaluateRandomResultTable(context, dropTableName);

                // プレイヤーにアイテムを付与する
                var grantResult = await ItemGiver.GrantItemsToUserAsync(context, new List <string>() { evaluateResult });

                // レスポンスの作成
                var response = new DropItemApiResponse()
                {
                    itemInstanceList = grantResult,
                };
                return(PlayFabSimpleJson.SerializeObject(response));
            }catch (PMApiException e) {
                // レスポンスの作成
                var response = new PMApiResponseBase()
                {
                    errorCode = e.errorCode,
                    message   = e.message
                };
                return(PlayFabSimpleJson.SerializeObject(response));
            }
        }
        public void SpawnItem(int cfgid, Vector3 pos, Quaternion rot)
        {
            ItemConfig itemCfg = ConfigDataMgr.Instance.ItemCfgLoader.GetDataByID(cfgid);

            if (!System.Object.ReferenceEquals(null, itemCfg))
            {
                GameObject go = PrefabsAssetHolder.Instance.GetPrefabByID(itemCfg.PrefabID);

                if (!System.Object.ReferenceEquals(null, go))
                {
                    GameObject inst =
                        PrefabPoolingSystem.Instance.Spawn(go,
                                                           pos, rot);

                    inst.transform.SetParent(RoleContenter);

                    ItemGiver ig = inst.GetComponent <ItemGiver>();
                    if (!System.Object.ReferenceEquals(null, ig))
                    {
                        ig.ItemCfgID = cfgid;
                    }
                }
            }
        }