예제 #1
0
        public bool ValidateHarvestable(HarvestableObjectView resource)
        {
            //Seems not to work anymore (I know it worked^^)
            //var toolNeeded = resource.GetTool(_localPlayerCharacterView) as aro;
            //var toolDurability = a4w.b(toolNeeded.b3(), toolNeeded.b5());

            if (!resource.CanLoot(_localPlayerCharacterView) || resource.GetCurrentCharges() <= 0 || resource.GetTier() < _minimumHarvestableTier)// || toolDurability <= 10)
            {
                return(false);
            }

            var position    = resource.transform.position;
            var validHeight = _landscape.GetLandscapeHeight(position.c());

            if (position.y < validHeight - 5)
            {
                return(false);
            }

            if (_blacklist.ContainsKey(resource))
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        public bool ValidateHarvestable(HarvestableObjectView resource)
        {
            if (!resource.CanLoot(_localPlayerCharacterView) || resource.GetCurrentCharges() <= 0 || resource.GetTier() < _minimumHarvestableTier)
            {
                return(false);
            }

            var position    = resource.transform.position;
            var validHeight = _landscape.GetLandscapeHeight(position.c());

            if (position.y < validHeight - 5)
            {
                return(false);
            }

            if (_blacklist.ContainsKey(resource))
            {
                return(false);
            }

            return(true);
        }