public override bool Interact(GamePlayer player)
        {
            if (!base.Interact(player))
            {
                return(false);
            }

            //For players in frontiers only
            if (GameServer.KeepManager.FrontierRegionsList.Contains(player.CurrentRegionID))
            {
                if (player.Client.Account.PrivLevel == (int)ePrivLevel.Player)
                {
                    if (player.Realm != this.Realm)
                    {
                        return(false);
                    }

                    if (Component != null && Component.Keep is GameKeep)
                    {
                        if ((Component.Keep as GameKeep).OwnsAllTowers == false || (Component.Keep as GameKeep).InCombat)
                        {
                            return(false);
                        }
                    }

                    if (GameRelic.IsPlayerCarryingRelic(player))
                    {
                        return(false);
                    }
                }

                // open up the warmap window

                eDialogCode code = eDialogCode.WarmapWindowAlbion;
                switch (player.Realm)
                {
                case eRealm.Albion: code = eDialogCode.WarmapWindowAlbion; break;

                case eRealm.Midgard: code = eDialogCode.WarmapWindowMidgard; break;

                case eRealm.Hibernia: code = eDialogCode.WarmapWindowHibernia; break;
                }

                player.Out.SendDialogBox(code, 0, 0, 0, 0, eDialogType.Warmap, false, "");
            }

            //if no component assigned, teleport to the border keep
            if (Component == null && GameServer.KeepManager.FrontierRegionsList.Contains(player.CurrentRegionID) == false)
            {
                GameServer.KeepManager.ExitBattleground(player);
            }

            return(true);
        }
Beispiel #2
0
 public void SendDialogBox(eDialogCode code, ushort data1, ushort data2, ushort data3, ushort data4, eDialogType type, bool autoWarpText, string message)
 {
 }
		public virtual void SendDialogBox(eDialogCode code, ushort data1, ushort data2, ushort data3, ushort data4,
		                                  eDialogType type, bool autoWrapText, string message)
		{
			using (var pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.Dialog)))
			{
				pak.WriteByte(0x00);
				pak.WriteByte((byte) code);
				pak.WriteShort(data1); //data1
				pak.WriteShort(data2); //data2
				pak.WriteShort(data3); //data3
				pak.WriteShort(data4); //data4
				pak.WriteByte((byte) type);
				pak.WriteByte((byte) (autoWrapText ? 0x01 : 0x00));
				if (message.Length > 0)
					pak.WriteString(message, message.Length);
				pak.WriteByte(0x00);
				SendTCP(pak);
			}
		}
		public void SendDialogBox(eDialogCode code, ushort data1, ushort data2, ushort data3, ushort data4, eDialogType type, bool autoWarpText, string message) { }
Beispiel #5
0
		public void SendDialogBox(eDialogCode code, ushort data1, ushort data2, ushort data3, ushort data4, eDialogType type,
		                   bool autoWrapText, string message)
		{
			if (SendDialogBoxMethod != null) SendDialogBoxMethod(this, code, data1, data2, data3, data4, type, autoWrapText, message);
		}