Package games.stendhal.server.core.engine

Examples of games.stendhal.server.core.engine.GameEvent


      player2.sendPrivateText("Congratulations! You are now married to \""
          + name1
          + "\". You can use #/spouse if you want to be together.");
      text = "You have successfully married \"" + name1 + "\" and \""
          + name2 + "\".";
      new GameEvent(player.getName(), "marry",  name1 + " + " + name2).raise();
    }

    player.sendPrivateText(text.trim());
  }
View Full Code Here


      final int y = teleported.getY();

      // TODO: use Player.teleport()

      if (StendhalRPAction.placeat(zone, player, x, y)) {
        new GameEvent(player.getName(), "teleportto", teleported.getName() + "(spouse)").raise();
      }

      player.notifyWorldAboutChanges();
    }
  }
View Full Code Here

      logger.info(player.getName() + " is attacking " + victim.getName());
    }

    StendhalKillLogDAO killLog = DAORegister.get().get(StendhalKillLogDAO.class);
    new GameEvent(killLog.getEntityName(player), "attack", killLog.getEntityName(victim), killLog.entityToType(player), killLog.entityToType(victim)).raise();

    player.setTarget(victim);
    player.faceToward(victim);
    player.applyClientDirection(false);
    player.notifyWorldAboutChanges();
View Full Code Here

        if (oldZone != null) {
          final String source = oldZone.getName();
          final String destination = zone.getName();

          new GameEvent(player.getName(), "change zone", destination).raise();

          TutorialNotifier.zoneChange(player, source, destination);
          ZoneNotifier.zoneChange(player, source, destination);
        }
      }
View Full Code Here

    String infostring = "";
    if (object.has("infostring")) {
      infostring = object.get("infostring");
    }

    new GameEvent(player.getName(), USE, name, infostring).raise();
   
  }
View Full Code Here

    String title = achievement.getTitle();
    Category category = achievement.getCategory();
    String playerName = player.getName();
    DBCommandQueue.get().enqueue(new WriteReachedAchievementCommand(identifiersToIds.get(identifier), title, category, playerName));
    player.addReachedAchievement(achievement.getIdentifier());
    new GameEvent(playerName, "reach-achievement", category.toString(), title, identifier).raise();
  }
View Full Code Here

      }
    } catch (UnsupportedEncodingException e) {
      logger.error(e, e);
    }

    new GameEvent(player.getName(), "sentence", Integer.toString(sentence.length()), sentence).raise();
    player.setSentence(sentence);
    player.sendPrivateText("Your sentence was updated to: " + action.get(VALUE));
  }
View Full Code Here

    final int levels = newLevel - (getAtk() - 10);

    // In case we level up several levels at a single time.
    for (int i = 0; i < Math.abs(levels); i++) {
      setAtk(this.atk + (int) Math.signum(levels) * 1);
      new GameEvent(getName(), "atk", Integer.toString(getAtk())).raise();
    }
  }
View Full Code Here

    final int levels = newLevel - (getDef() - 10);

    // In case we level up several levels at a single time.
    for (int i = 0; i < Math.abs(levels); i++) {
      setDef(this.def + (int) Math.signum(levels) * 1);
      new GameEvent(getName(), "def", Integer.toString(getDef())).raise();
    }
  }
View Full Code Here

    // Increment experience points
    this.xp += newxp;
    put("xp", xp);
    String[] params = { Integer.toString(newxp) };

    new GameEvent(getName(), "added xp", params).raise();
    new GameEvent(getName(), "xp", String.valueOf(xp)).raise();
   
    updateLevel();
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.core.engine.GameEvent

Copyright © 2018 www.massapicom. 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.