Esempio n. 1
0
        public bool originalObjectExists(ushort originalId, Location location)
        {
            WorldObject worldObject = getObject(originalId, location);

            if (worldObject == null)
            {
                addObjectToList(originalId, location);
                return(true);
            }
            return(worldObject != null && !worldObject.isSecondForm() && worldObject.getObjectHealth() > 0);
        }
Esempio n. 2
0
        public void lowerHealth(ushort originalId, Location location)
        {
            WorldObject worldObject = getObject(originalId, location);

            if (worldObject == null)
            {
                addObjectToList(originalId, location);
            }
            if (worldObject.getOriginalId() == 733)           // Web
            {
                if (misc.random(6) == 0)
                {
                    changeObject(worldObject);
                }
                return;
            }
            worldObject = getObject(originalId, location);
            worldObject.setObjectHealth(worldObject.getObjectHealth() - 1);
            if (worldObject.getObjectHealth() <= 0)
            {
                changeObject(worldObject);
            }
        }