Examples of NpcSpeechMessage


Examples of org.pokenet.server.network.message.NpcSpeechMessage

   * @param p
   */
  public void challengePlayer(PlayerChar p) {
    String speech = this.getSpeech();
    if(!speech.equalsIgnoreCase("")) {
      TcpProtocolHandler.writeMessage(p.getTcpSession(), new NpcSpeechMessage(speech));
    }
  }
View Full Code Here

Examples of org.pokenet.server.network.message.NpcSpeechMessage

  public void talkToPlayer(PlayerChar p) {
    if(isTrainer()) {
      if(canBattle()) {
        String speech = this.getSpeech();
        if(!speech.equalsIgnoreCase("")) {
          TcpProtocolHandler.writeMessage(p.getTcpSession(), new NpcSpeechMessage(speech));
        }
        setLastBattleTime(System.currentTimeMillis());
        p.setBattling(true);
        p.setBattleField(new NpcBattleField(DataService.getBattleMechanics(), p, this));
        return;
      } else {
        p.setTalking(false);
        return;
      }
    } else {
      /* If this NPC wasn't a trainer, handle other possibilities */
      String speech = this.getSpeech();
      if(!speech.equalsIgnoreCase("")) {
        if(!p.isShopping()) {
          //Dont send if player is shopping!
          TcpProtocolHandler.writeMessage(p.getTcpSession(), new NpcSpeechMessage(speech));
        }
      }
      /* If this NPC is a sprite selection npc */
      if(m_name.equalsIgnoreCase("Spriter")) {
        p.setSpriting(true);
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.