public void Teleport(RealmTime time, TeleportPacket pkt) { Teleport(time, pkt.ObjectId); }
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); }
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); }