Esempio n. 1
0
  public Shield(ShieldTemplate template) {
    super(IDFactory.getInstance().nextId(), new ShieldController(), null, null, null);

    ((ShieldController) getController()).setOwner(this);
    this.template = template;
    this.name = (template.getName() == null) ? "SHIELD" : template.getName();
    this.id = template.getId();
    setKnownlist(new SphereKnownList(this, template.getRadius() * 2));
  }
Esempio n. 2
0
 public void spawn() {
   World w = World.getInstance();
   WorldPosition position =
       w.createPosition(
           template.getMap(),
           template.getCenter().getX(),
           template.getCenter().getY(),
           template.getCenter().getZ(),
           (byte) 0,
           0);
   this.setPosition(position);
   w.storeObject(this);
   w.spawn(this);
 }