private void ensureFieldPaths(Entity e) { if (mana == null) { mana = e.getDtClass().getFieldPathForName("m_flMana"); maxMana = e.getDtClass().getFieldPathForName("m_flMaxMana"); } }
public Entity getByHandle(int handle) { Entity e = entities[engineType.indexForHandle(handle)]; return e == null || e.getSerial() != engineType.serialForHandle(handle) ? null : e; }
/** * Check if this entity contains the given property. * * @param property Name of the property * @return True, if and only if the given property is present in this entity */ public boolean hasProperty(String property) { return dtClass.getFieldPathForName(property) != null; }
@Override public boolean apply(Entity e) { return dtClassName.equals(e.getDtClass().getDtName()); } });
@Override public int getTargetNameIdx() { return (int) e.getProperty(indices.targetNameIdx); }
public AbstractFileRunner(Source source, EngineType engineType) throws IOException { super(engineType); engineType.readHeader(source); this.source = source; this.tick = -1; }
public GameEvent(GameEventDescriptor descriptor) { this.descriptor = descriptor; this.state = new Object[descriptor.getKeys().length]; }
@Override public String toString() { return id.toString(); }
public Entity getByHandle(int handle) { Entity e = entities[engineType.indexForHandle(handle)]; return e == null || e.getSerial() != engineType.serialForHandle(handle) ? null : e; }
@Override public boolean hasTargetSourceName() { return (int) e.getProperty(indices.targetSourceNameIdx) != 0; }
@Override public boolean isTargetHero() { return indices.targetHeroIdx != null ? (boolean) e.getProperty(indices.targetHeroIdx) : true; }
@Override public float getTimestamp() { return e.getProperty(indices.timestampIdx); }
@Override public int getDamageSourceNameIdx() { return (int) e.getProperty(indices.sourceNameIdx); }
@Override public int getInflictorNameIdx() { return (int) e.getProperty(indices.inflictorNameIdx); }
@Override public int getHealth() { return e.getProperty(indices.healthIdx); }
@Override public int getGoldReason() { return indices.goldReasonIdx != null ? (int) e.getProperty(indices.goldReasonIdx) : 0; }
@Override public int getXpReason() { return indices.xpReasonIdx != null ? (int) e.getProperty(indices.xpReasonIdx) : 0; }
@Override public boolean isAbilityToggleOn() { return indices.abilityToggleOnIdx != null ? (boolean) e.getProperty(indices.abilityToggleOnIdx) : false; }