示例#1
0
文件: Player.cs 项目: Club559/Mining
 public void Teleport(RealmTime time, TeleportPacket pkt)
 {
     Teleport(time, pkt.ObjectId);
 }
示例#2
0
 public void Teleport(RealmTime time, TeleportPacket pkt)
 {
     var obj = Owner.GetEntity(pkt.ObjectId);
     if (obj == null) return;
     Move(obj.X, obj.Y);
     fames.Teleport();
     SetNewbiePeriod();
     UpdateCount++;
     Owner.BroadcastPacket(new GotoPacket()
     {
         ObjectId = Id,
         Position = new Position()
         {
             X = X,
             Y = Y
         }
     }, null);
     Owner.BroadcastPacket(new ShowEffectPacket()
     {
         EffectType = EffectType.Teleport,
         TargetId = Id,
         PosA = new Position()
         {
             X = X,
             Y = Y
         },
         Color = new ARGB(0xFFFFFFFF)
     }, null);
 }
示例#3
0
 public void Teleport(RealmTime time, TeleportPacket pkt)
 {
     if (!this.TPCooledDown())
     {
         psr.SendPacket(new TextPacket()
         {
             BubbleTime = 0,
             Stars = -1,
             Name = "",
             Text = "Too soon to teleport again!"
         });
         return;
     }
     SetTPDisabledPeriod();
     var obj = Owner.GetEntity(pkt.ObjectId);
     if (obj == null) return;
     Move(obj.X, obj.Y);
     fames.Teleport();
     SetNewbiePeriod();
     UpdateCount++;
     Owner.BroadcastPacket(new GotoPacket()
     {
         ObjectId = Id,
         Position = new Position()
         {
             X = X,
             Y = Y
         }
     }, null);
     Owner.BroadcastPacket(new ShowEffectPacket()
     {
         EffectType = EffectType.Teleport,
         TargetId = Id,
         PosA = new Position()
         {
             X = X,
             Y = Y
         },
         Color = new ARGB(0xFFFFFFFF)
     }, null);
 }