Package marauroa.common.game

Examples of marauroa.common.game.RPSlot.clear()


      // collect objects from slot before clearing and transforming
      for (final RPObject objectInSlot : slot) {
        objects.add(objectInSlot);
      }
      // clear the slot
      slot.clear();
      SpellTransformer transformer = new SpellTransformer();
      //transform rpobjects in slot to spell
      for(RPObject o : objects) {
        Spell s = (Spell) transformer.transform(o);
        //only add to slot if transforming was successful
View Full Code Here


    if (!player.hasSlot("#flock")) {
      player.addSlot(new RPSlot("#flock"));
    }

    final RPSlot slot = player.getSlot("#flock");
    slot.clear();

    /*
     * RPSlot.add() destroys zoneid, so preserve/restore it.
     *
     * TODO: Remove if getID()/setID() are made purely virtual.
View Full Code Here

  protected boolean syncContent() {
    if (attending != null) {
      /* Can be replaced when we add Equip event */
      /* Mirror chest content into player's bank slot */
      final RPSlot bank = getBankSlot();
      bank.clear();

      for (final RPObject item : getSlot("content")) {
        try {
          bank.addPreservingId(cloneItem(item));
        } catch (final Exception e) {
View Full Code Here

    chestSynchronizer = new SyncContent();
    SingletonRepository.getTurnNotifier().notifyInTurns(0, chestSynchronizer);

    final RPSlot content = getSlot("content");
    content.clear();

    for (final RPObject item : getBankSlot()) {
      try {
        content.addPreservingId(cloneItem(item));
      } catch (final Exception e) {
View Full Code Here

    if (!player.hasSlot("#pets")) {
      player.addSlot(new RPSlot("#pets"));
    }

    final RPSlot slot = player.getSlot("#pets");
    slot.clear();

    /*
     * RPSlot.add() destroys zoneid, so preserve/restore it.
     *
     * TODO: Remove if getID()/setID() are made purely virtual.
View Full Code Here

      final RPSlot slot = getSlot("content");
      final List<RPObject> objects = new LinkedList<RPObject>();
      for (final RPObject objectInSlot : slot) {
        objects.add(objectInSlot);
      }
      slot.clear();
      removeSlot("content");

      final RPSlot newSlot = new ChestSlot(this);
      addSlot(newSlot);
     
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.