Examples of CharMoveToLocation


Examples of lineage2.gameserver.network.serverpackets.CharMoveToLocation

    rewarder.setHeading((int) (Math.atan2(spawnLoc.y - rewarded.getY(), spawnLoc.x - rewarded.getX()) * Creature.HEADINGS_IN_PI) + 32768);
    rewarder.spawnMe();
    Functions.npcSayCustomMessage(rewarder, "scripts.events.SavingSnowman.RewarderPhrase1");
    Location targetLoc = Location.findFrontPosition(rewarded, rewarded, 40, 50);
    rewarder.setSpawnedLoc(targetLoc);
    rewarder.broadcastPacket(new CharMoveToLocation(rewarder.getObjectId(), rewarder.getLoc(), targetLoc));
    executeTask("events.SavingSnowman.SavingSnowman", "reward", new Object[]
    {
      rewarder,
      rewarded
    }, 5000);
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.CharMoveToLocation

    Location loc = rewarder.getSpawnedLoc();
    double radian = PositionUtils.convertHeadingToRadian(rewarder.getHeading());
    int x = loc.x - (int) (Math.sin(radian) * 300);
    int y = loc.y + (int) (Math.cos(radian) * 300);
    int z = loc.z;
    rewarder.broadcastPacket(new CharMoveToLocation(rewarder.getObjectId(), loc, new Location(x, y, z)));
    executeTask("events.SavingSnowman.SavingSnowman", "unspawnRewarder", new Object[]
    {
      rewarder
    }, 2000);
  }
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.CharMoveToLocation

   * Method movePacket.
   * @return L2GameServerPacket
   */
  public L2GameServerPacket movePacket()
  {
    return new CharMoveToLocation(this);
  }
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.CharMoveToLocation

      {
        activeChar.sendActionFailed();
      }
      else
      {
        activeChar.sendPacket(new CharMoveToLocation(activeChar.getObjectId(), _originLoc, _targetLoc));
      }
      return;
    }
    if (activeChar.isOutOfControl())
    {
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharMoveToLocation

            // Send a Server->Client packet MoveToPawn/CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
            if (pawn instanceof L2Character) {
              if(_actor.isOnGeodataPath())
              {
                _actor.broadcastPacket(new CharMoveToLocation(_actor));
                _clientMovingToPawnOffset = 0;
              }
              else if (sendPacket) // don't repeat unnecessarily
                _actor.broadcastPacket(new MoveToPawn(_actor, (L2Character) pawn, offset));
            }
            else
              _actor.broadcastPacket(new CharMoveToLocation(_actor));
        }
        else
        {
            _actor.sendPacket(new ActionFailed());
        }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharMoveToLocation

            // Calculate movement data for a move to location action and add the actor to movingObjects of GameTimeController
            _accessor.moveTo(x, y, z);

            // Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
            CharMoveToLocation msg = new CharMoveToLocation(_actor);
            _actor.broadcastPacket(msg);

        }
        else
        {
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharMoveToLocation

                player.sendPacket(msg);
            }
            else
            {
                // Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
                CharMoveToLocation msg = new CharMoveToLocation(_actor);
                player.sendPacket(msg);
            }
        }
    }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.CharMoveToLocation

   
    // the CtrlEvent.EVT_ARRIVED will be sent when the character will actually arrive
    // to destination by GameTimeController
   
    // Send a Server->Client packet CharMoveToLocation to the actor and all L2PcInstance in its _knownPlayers
    CharMoveToLocation msg = new CharMoveToLocation(this);
    broadcastPacket(msg);
   
    return 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.