Beispiel #1
0
 public virtual void Start()
 {
     if (IsPlaying)
         return;
     AddObjectVehiclePacket obj = new AddObjectVehiclePacket
                                      {
                                          EntityId = EntityId,
                                          Type = Type,
                                          FireBallThrowerEid = 0,
                                          X = Position.X,
                                          Y = Position.Y,
                                          Z = Position.Z
                                      };
     foreach (var nearbyPlayer in World.Server.GetNearbyPlayers(World, new AbsWorldCoords(Position.X, Position.Y, Position.Z)))
     {
         nearbyPlayer.SendPacket(obj);
     }
     IsPlaying = true;
 }
Beispiel #2
0
 public virtual void Start()
 {
     if (IsPlaying)
         return;
     AddObjectVehiclePacket obj = new AddObjectVehiclePacket
                                      {
                                          EntityId = EntityId,
                                          Type = Type,
                                          Data = 0,
                                          X = Position.X,
                                          Y = Position.Y,
                                          Z = Position.Z
                                      };
     World.Server.SendPacketToNearbyPlayers(World, 
                                            UniversalCoords.FromAbsWorld(Position), 
                                            obj);
     
     IsPlaying = true;
 }
 private void OnAddObjectVehicle(AddObjectVehiclePacket p)
 {
     if (AddObjectVehicle != null) AddObjectVehicle.Invoke(this, new PacketEventArgs<AddObjectVehiclePacket>(p));
 }