コード例 #1
0
        public void RemTree(Vector3 v3)
        {
            Vector2L tree    = new Vector2L(v3.X, v3.Z);
            bool     found   = false;
            int      foundId = 0;

            for (int i = 0; i < Trees.Count; i++)
            {
                if (Trees[i] == tree)
                {
                    foundId = Trees[i].ID;
                    Trees.RemoveAt(i);
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                return;
            }
            List <string> list = new List <string>();

            list.Add("damageTreeCallback");
            list.Add(foundId.ToString());
            Map.SendAll(list);
            for (int i = 0; i < 4; i++)
            {
                Map.thrownOutItems.ThrowNewObject(
                    116, "砍掉的树干", "", v3.ADD(new Vector3(0, i + 3, 0)));
            }
        }