/** Find objects that are in visibility range. */ protected void findVisibleObjects() { if (owner == null || !owner.isSpawned()) { return; } MapRegion[] regions = owner.getActiveRegion().getNeighbours(); for (int i = 0; i < regions.length; i++) { MapRegion r = regions[i]; FastMap<Integer, VisibleObject> objects = r.getObjects(); for (FastMap.Entry<Integer, VisibleObject> e = objects.head(), mapEnd = objects.tail(); (e = e.getNext()) != mapEnd; ) { VisibleObject newObject = e.getValue(); if (newObject == owner || newObject == null) { continue; } if (!isAwareOf(newObject)) { continue; } if (knownObjects.containsKey(newObject.getObjectId())) { continue; } if (!checkObjectInRange(newObject) && !newObject.getKnownList().checkReversedObjectInRange(owner)) { continue; } /** New object is not known. */ if (add(newObject)) { newObject.getKnownList().add(owner); } } } }
public Object get() { FastMap localMap = getLocalMap(); Object value = localMap.get(this); if ((value == null) && !(localMap.containsKey(this))) { value = initialValue(); localMap.put(this, value); } return value; }
public boolean setExists(int chestId) { return _armorSets.containsKey(chestId); }
/** * Check if object is known * * @param object * @return true if object is known */ public boolean knowns(AionObject object) { return knownObjects.containsKey(object.getObjectId()); }
/** * @param cooldownId * @return */ public long getSkillCoolDown(int cooldownId) { if (skillCoolDowns == null || !skillCoolDowns.containsKey(cooldownId)) return 0; return skillCoolDowns.get(cooldownId); }