Ejemplo n.º 1
0
        private void Anim(ZoneCharacter character, params string[] param)
        {
            byte animid = param.Length >= 2 ? byte.Parse(param[1]) : (byte)50;

            using (var broad = Handler8.Animation(character, animid))
            {
                character.Broadcast(broad, true);
            }
        }
Ejemplo n.º 2
0
 public static void SendNormalChat(ZoneCharacter character, string chat, byte color = (byte)0x2a)
 {
     using (var packet = new Packet(SH8Type.ChatNormal))
     {
         packet.WriteUShort(character.MapObjectID);
         packet.WriteByte((byte)chat.Length);
         packet.WriteByte(color);
         packet.WriteString(chat, chat.Length);
         character.Broadcast(packet, true);
     }
 }
Ejemplo n.º 3
0
        public static void JumpHandler(ZoneClient client, Packet packet)
        {
            ZoneCharacter character = client.Character;

            if (character.State == PlayerState.Normal || character.State == PlayerState.Mount)
            {
                using (var broad = Jump(character))
                {
                    character.Broadcast(broad);
                }
            }
            else
            {
                character.CheatTracker.AddCheat(CheatTypes.InvalidMove, 50);
            }
        }
Ejemplo n.º 4
0
        public static void EmoteHandler(ZoneClient client, Packet packet)
        {
            ZoneCharacter character = client.Character;
            byte          action;

            if (!packet.TryReadByte(out action))
            {
                Log.WriteLine(LogLevel.Warn, "{0} did empty emote.", character.Name);
                return;
            }

            if (action > 74)
            {
                character.CheatTracker.AddCheat(CheatTypes.Emote, 500);
                return;
            }

            using (var broad = Animation(character, action))
            {
                character.Broadcast(broad, true);
            }
        }