Exemplo n.º 1
0
        /// <summary>
        /// Checks for Skills Allow
        /// </summary>
        public bool AllowedSkills(Character c)
        {
            bool result = true;

            foreach (qSkills qs in skillsAllowed.Items)
            {
                result = result && c.HaveSkill((int)qs);
            }
            return(result);
        }
Exemplo n.º 2
0
		void SendMessageTo( Character c, ChatMsgType chat, string txt, int langue )
		{
			int offset = 4;
			bool understand = false;
			switch( langue )
			{
				case 7://	Common
					if ( c.HaveSkill( 98 ) )
						understand = true;
					break;
				case 1://	Orcish
					if ( c.HaveSkill( 109 ) )
						understand = true;
					break;
				case 13://	Gnomish
					if ( c.HaveSkill( 313 ) )
						understand = true;
					break;
				case 33://	Gutter
					if ( c.HaveSkill( 673 ) )
						understand = true;
					break;
				case 3://	Tauren
					if ( c.HaveSkill( 115 ) )
						understand = true;
					break;
				case 14://	Troll
					if ( c.HaveSkill( 315 ) )
						understand = true;
					break;
				case 2://	Elf
					if ( c.HaveSkill( 113 ) )
						understand = true;
					break;
				case 6://	Dwarf
					if ( c.HaveSkill( 111 ) )
						understand = true;
					break;
			}
			if ( understand )
			{
				tempBuff[ offset++ ] = (byte)chat;//type, CHAT_MSG_SAY, CHAT_MSG_CHANNEL, CHAT_MSG_WHISPER, CHAT_MSG_YELL, CHAT_MSG_PARTY
				Converter.ToBytes( langue, tempBuff, ref offset );
			}
			else
			{
				tempBuff[ offset++ ] = (byte)chat;//type
				Converter.ToBytes( langue, tempBuff, ref offset );
			}
			Converter.ToBytes( Guid, tempBuff, ref offset );
			Converter.ToBytes( Guid, tempBuff, ref offset );
			
			//		string tx = txt + " ( " + r.ToString() + " )";
			//		r = (ushort)( r << 1 );
			Converter.ToBytes( txt.Length + 1, tempBuff, ref offset );
			Converter.ToBytes( txt, tempBuff, ref offset );
			Converter.ToBytes( (short)1, tempBuff, ref offset );// Togle afk
			int len = offset;

			c.Send( OpCodes.SMSG_MESSAGECHAT, tempBuff, len );
	
		}
Exemplo n.º 3
0
 /// <summary>
 /// Checks for Skills Allow
 /// </summary>
 public bool AllowedSkills( Character c )
 {
     bool result = true;
     foreach ( qSkills qs in skillsAllowed.Items )
     {
         result = result && c.HaveSkill( (int)qs );
     }
     return result;
 }