Examples of BattleInitMessage


Examples of org.pokenet.server.network.message.battle.BattleInitMessage

  public WildBattleField(BattleMechanics m, PlayerChar p, Pokemon wild) {
    super(m, new Pokemon[][] { p.getParty(), new Pokemon[] { wild } });
    /* Send information to client */
    p.setBattling(true);
    p.setBattleId(0);
    TcpProtocolHandler.writeMessage(p.getTcpSession(), new BattleInitMessage(
        true, 1));
    TcpProtocolHandler.writeMessage(p.getTcpSession(), new EnemyDataMessage(0,
        wild));

    /* Store variables */
 
View Full Code Here

Examples of org.pokenet.server.network.message.battle.BattleInitMessage

    /*
     * Send battle initialisation packets
     */
    TcpProtocolHandler.writeMessage(p1.getTcpSession(),
        new BattleInitMessage(false, p2.getPartyCount()));
    TcpProtocolHandler.writeMessage(p2.getTcpSession(),
        new BattleInitMessage(false, p1.getPartyCount()));
    /* Send the enemy's name to both players*/
    p1.getTcpSession().write("bn" + p2.getName());
    p2.getTcpSession().write("bn" + p1.getName());
    /* Send pokemon data to both players */
    sendPokemonData(p1, p2);
View Full Code Here

Examples of org.pokenet.server.network.message.battle.BattleInitMessage

    m_player = p;
    m_npc = n;

    /* Start the battle */
    TcpProtocolHandler.writeMessage(p.getTcpSession(),
        new BattleInitMessage(false, getAliveCount(1)));
    /* Send enemy's Pokemon data */
    sendPokemonData(p);
    /* Set the player's battle id */
    m_player.setBattleId(0);
    /* Send enemy name */
 
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.