public ZonesRange(string start, string end, ZoneMode mode, double para) { this.rangeStart = start; this.rangeEnd = end; this.rangeMode = mode; this.rangePara = para; }
// Clone constructor public LBGroupZone(LBGroupZone lbGroupZone) { if (lbGroupZone == null) { SetClassDefaults(); } else { zoneType = lbGroupZone.zoneType; zoneMode = lbGroupZone.zoneMode; zoneName = lbGroupZone.zoneName; GUID = lbGroupZone.GUID; centrePointX = lbGroupZone.centrePointX; centrePointZ = lbGroupZone.centrePointZ; width = lbGroupZone.width; length = lbGroupZone.length; isScaledPointX = lbGroupZone.isScaledPointX; isScaledPointZ = lbGroupZone.isScaledPointZ; isScaledWidth = lbGroupZone.isScaledWidth; isScaledLength = lbGroupZone.isScaledLength; showInScene = lbGroupZone.showInScene; showInEditor = lbGroupZone.showInEditor; useBiome = lbGroupZone.useBiome; lbBiome = lbGroupZone.lbBiome; } }
private void SetClassDefaults() { zoneType = LBGroupZoneType.circle; zoneMode = ZoneMode.OR; zoneName = "new group zone"; // Assign a unique identifier GUID = System.Guid.NewGuid().ToString(); centrePointX = 0f; centrePointZ = 0f; width = 10f; length = 10f; isScaledPointX = true; isScaledPointZ = true; isScaledWidth = true; isScaledLength = true; showInScene = true; showInEditor = true; useBiome = false; // This probably has little or no effect as it will always create // a default LBBiome as serializer cannot store nulls. lbBiome = null; }
//@# private void AllowRadBut_Checked(object sender, RoutedEventArgs e) { zoneMode = ZoneMode.Allowing_zone; SetZoneMode(); }
//###########################_ Радиокнопки Запрет.Позвол. Зоны_################################### //@# private void ForbidRadBut_Checked(object sender, RoutedEventArgs e) { zoneMode = ZoneMode.Forbidding_zone; SetZoneMode(); }
internal void MovePlayer(ZonePlayer zp, uint zoneId, uint instanceId, float x, float y, float z, float heading, ZoneMode zm) { if (zoneId == this.Zone.ZoneID) { // TODO: also test if the instance id is equal to this zone's if (zp.IsAIControlled) { // TODO: quick move the pc return; } // TODO: if they have a pet, quick move the pet to the new spot as well } zp.ZoneMode = zm; switch (zm) { case ZoneMode.EvacToSafeCoords: case ZoneMode.ZoneToSafeCoords: // TODO: start cheat timer? zp.ZoneSummonX = x; zp.ZoneSummonY = y; zp.ZoneSummonZ = z; zp.Heading = heading; break; case ZoneMode.GMSummon: zp.MsgMgr.SendSpecialMessage(MessageType.Default, "You have been summoned by a GM!"); zp.ZoneSummonX = x; zp.ZoneSummonY = y; zp.ZoneSummonZ = z; zp.Heading = heading; zp.ZoneSummonID = (ushort)zoneId; break; case ZoneMode.Solicited: zp.ZoneSummonX = x; zp.ZoneSummonY = y; zp.ZoneSummonZ = z; zp.Heading = heading; zp.ZoneSummonID = (ushort)zoneId; break; case ZoneMode.ZoneToBindPoint: zp.ZoneId = (ushort)zoneId; zp.X = x; zp.Y = y; zp.Z = z; zp.Heading = heading; _log.InfoFormat("Player {0} has died and will be zoned to bind point in zone {1} at LOC x={2}, y={3}, z={4}", zp.Name, zoneId, x, y, z); ZonePlayerToBind zptb = new ZonePlayerToBind(zoneId, x, y, z, heading, "Bind Location"); EQRawApplicationPacket zptbPack = new EQRawApplicationPacket(AppOpCode.ZonePlayerToBind, zp.Client.IPEndPoint, zptb.Serialize()); QueuePacketToClient(zp.Client, zptbPack, true, ZoneConnectionState.All); return; case ZoneMode.Unsolicited: throw new NotSupportedException("This type of player moving not supported yet. Implement it!"); //break; case ZoneMode.GateToBindPoint: throw new NotSupportedException("This type of player moving not supported yet. Implement it!"); //break; case ZoneMode.SummonPC: zp.MsgMgr.SendSpecialMessage(MessageType.Default, "You have been summoned!"); throw new NotSupportedException("This type of player moving not supported yet. Implement it!"); //break; } // Handle Packet sending wasn't handled yet if we've gotten this far, so handle it now if (zm == ZoneMode.Solicited || zm == ZoneMode.ZoneToSafeCoords) { RequestClientZoneChange rczc = new RequestClientZoneChange() { ZoneId = (ushort)zoneId, X = x, Y = y, Z = z, Heading = heading, InstanceId = (ushort)instanceId, Type = 0x01 // Might be meaningless... noted as an "observed value" }; EQApplicationPacket<RequestClientZoneChange> rczcPack = new EQApplicationPacket<RequestClientZoneChange>(AppOpCode.RequestClientZoneChange, rczc); QueuePacketToClient(zp.Client, rczcPack, true, ZoneConnectionState.Connected); } }