Exemplo n.º 1
0
        /// <summary>
        /// Like the above, but sends messages to multiple players
        /// </summary>
        static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat)
        {               //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = chat.chatType;

            schat.from    = from._alias;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                if (player == from)
                {
                    continue;
                }
                if (from != null)
                {
                    if (player._accountIgnore.ContainsKey(from._alias))
                    {
                        continue;
                    }
                    if (player._accountIgnore.ContainsValue(from._ipAddress))
                    {
                        continue;
                    }
                }
                player._client.sendReliable(schat);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sends the list of Raids completed and In progress and when they will reset.
        /// </summary>
        public void SendRaidTimes(IChatTarget listener)
        {
            var bindings = m_bindings[(int)BindingType.Hard];

            if (bindings != null)
            {
                foreach (var binding in bindings)
                {
                    listener.SendMessage("Raid {0} #{1}, Until: {1}", binding.MapId, binding.InstanceId, binding.NextResetTime);
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sends the list of Raids completed and In progress and when they will reset.
        /// </summary>
        public void SendRaidTimes(IChatTarget listener)
        {
            List <InstanceBinding> binding = m_bindings[1];

            if (binding == null)
            {
                return;
            }
            foreach (InstanceBinding instanceBinding in binding)
            {
                listener.SendMessage("Raid {0} #{1}, Until: {1}", (object)instanceBinding.MapId,
                                     (object)instanceBinding.InstanceId, (object)instanceBinding.NextResetTime);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Sends arena messages to players
        /// </summary>
        static public void Social_ArenaChat(IChatTarget a, string message, int bong)
        {               //Prepare the chat packet
            SC_Chat chat = new SC_Chat();

            chat.bong     = (byte)bong;
            chat.chatType = Chat_Type.Arena;
            chat.message  = message;
            chat.from     = "";

            //Send it to all arena participants
            foreach (Player player in a.getChatTargets())
            {
                player._client.sendReliable(chat);
            }
        }
Exemplo n.º 5
0
        static public void Player_RouteChatRaw(IChatTarget target, String from, string message, byte bong, Chat_Type chatType)
        {
            SC_Chat schat = new SC_Chat();

            schat.chatType = chatType;

            schat.from    = from;
            schat.message = message;
            schat.bong    = bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                player._client.sendReliable(schat);
            }
        }
Exemplo n.º 6
0
 /// <summary>
 /// Dumps all currently applied auras to the given chr
 /// </summary>
 /// <param name="receiver"></param>
 /// <param name="includePassive">Whether to also include invisible effects (eg through items etc)</param>
 public void DumpTo(IChatTarget receiver, bool includePassive)
 {
     if (m_auras.Count > 0)
     {
         receiver.SendMessage("{0}'s Auras:", m_owner.Name);
         foreach (var aura in m_auras.Values)
         {
             if (includePassive || !aura.Spell.IsPassive)
             {
                 receiver.SendMessage("	{0}{1}", aura.Spell, aura.HasTimeout ? " [" + TimeSpan.FromMilliseconds(aura.TimeLeft).Format() + "]" : "");
             }
         }
     }
     else
     {
         receiver.SendMessage("{0} has no active Auras.", m_owner.Name);
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Like the above, but sends messages to multiple players
        /// </summary>
        static public void Player_RouteChat(IChatTarget target, Player from, CS_Chat chat)
        {               //Formulate the chat notification!
            SC_Chat schat = new SC_Chat();

            schat.chatType = chat.chatType;

            schat.from    = from._alias;
            schat.message = chat.message;
            schat.bong    = chat.bong;

            //Go!
            foreach (Player player in target.getChatTargets())
            {
                if (player != from)
                {
                    player._client.sendReliable(schat);
                }
            }
        }
Exemplo n.º 8
0
 /// <summary>Dumps all currently applied auras to the given chr</summary>
 /// <param name="receiver"></param>
 /// <param name="includePassive">Whether to also include invisible effects (eg through items etc)</param>
 public void DumpTo(IChatTarget receiver, bool includePassive)
 {
     if (this.m_auras.Count > 0)
     {
         receiver.SendMessage("{0}'s Auras:", (object)this.m_owner.Name);
         foreach (Aura aura in this.m_auras.Values)
         {
             if (includePassive || !aura.Spell.IsPassive)
             {
                 receiver.SendMessage("\t{0}{1}", (object)aura.Spell,
                                      aura.HasTimeout
                         ? (object)(" [" + TimeSpan.FromMilliseconds((double)aura.TimeLeft).Format() + "]")
                         : (object)"");
             }
         }
     }
     else
     {
         receiver.SendMessage("{0} has no active Auras.", (object)this.m_owner.Name);
     }
 }
Exemplo n.º 9
0
		/// <summary>
		/// Sends the list of Raids completed and In progress and when they will reset.
		/// </summary>
		public void SendRaidTimes(IChatTarget listener)
		{
			var bindings = m_bindings[(int)BindingType.Hard];
			if (bindings != null)
			{
				foreach (var binding in bindings)
				{
					listener.SendMessage("Raid {0} #{1}, Until: {1}", binding.MapId, binding.InstanceId, binding.NextResetTime);
				}
			}
		}
Exemplo n.º 10
0
		/// <summary>
		/// Dumps all currently applied auras to the given chr
		/// </summary>
		/// <param name="receiver"></param>
		/// <param name="includePassive">Whether to also include invisible effects (eg through items etc)</param>
		public void DumpTo(IChatTarget receiver, bool includePassive)
		{
			if (m_auras.Count > 0)
			{
				receiver.SendMessage("{0}'s Auras:", m_owner.Name);
				foreach (var aura in m_auras.Values)
				{
					if (includePassive || !aura.Spell.IsPassive)
					{
						receiver.SendMessage("	{0}{1}", aura.Spell, aura.HasTimeout ? " [" + TimeSpan.FromMilliseconds(aura.TimeLeft).Format() + "]" : "");
					}
				}
			}
			else
			{
				receiver.SendMessage("{0} has no active Auras.", m_owner.Name);
			}
		}