Quick help with chat needed... menu

User Tag List

Results 1 to 2 of 2
  1. #1
    fvicaria's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Quick help with chat needed...

    Can anyone tell me what is wrong with this please (removed all I could to make it simpler read)

    var msgPtr = IntPtr.Add(_imageBase, (int)ChatOffsets.ChatBase + (int)ChatOffsets.ChatMsgSize*_position);
    var msg = Memory.Read<WoWChatMsg>(msgPtr);
    var msgStr = msg.Text;

    I keep getting blank values for the fields in the struct.

    I must be missing something silly. This was working a while ago.

    My Offsets are here (I think they are OK)

    Code:
        // 6.03
        public enum ChatOffsets
        {
            ChatBase = 0xDEE8DC,
            ChatBufferPos = 0xD94560,
            ChatMsgSize = 0x17E8,
    
            // Message
            ChatMsgSenderGuid = 0x0000,
            ChatMsgSenderName = 0x0034,
            ChatMsgFullMessage = 0x0065,
            ChatMsgOnlyMessage = 0x0C1D,
            ChatMsgChannelNum = 0x17D8,
            ChatMsgTimeStamp = 0x17E4
        }
    Here is my chat struct (I may have messed up here):

    Code:
        [StructLayout(LayoutKind.Sequential)]
        public struct WoWChatMsg
        {
            public WoWGuid SenderGuid;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x0024)]
            private readonly byte[] _unk1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x30)]
            private readonly byte[] _senderName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xBB8)]
            private readonly byte[] _formattedMessage;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 0xBB8)]
            internal readonly byte[] _text;
    
            public uint MessageType;
            public uint ChannelNumber;
            public uint Sequence;
            internal readonly uint _unk2;
            internal readonly uint _time;
                
    
            internal static readonly DateTime UnixEpochStart = new DateTime(1970, 1, 1, 0, 0, 0, 0);
            public string SenderName
            {
                get { return Encoding.UTF8.GetString(_senderName.TakeWhile(b => b != 0).ToArray()); }
            }
            public string FormattedMessage
            {
                get { return Encoding.UTF8.GetString(_formattedMessage.TakeWhile(b => b != 0).ToArray()); }
            }
            public string Text
            {
                get
                {
                    return _text == null ? null : Encoding.UTF8.GetString(_text.TakeWhile(b => b != 0).ToArray());
                }
            }
            public DateTime Time
            {
                get { return UnixEpochStart.AddSeconds(_time); }
            }
            public static int Size
            {
                get { return (int)ChatOffsets.ChatMsgSize; }
            }
        }
    Thanks a lot.

    Quick help with chat needed...
  2. #2
    fvicaria's Avatar Active Member
    Reputation
    29
    Join Date
    Jan 2009
    Posts
    55
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind. I had sequence and channel number inverted in the struct.

Similar Threads

  1. Replies: 1
    Last Post: 11-10-2014, 04:15 PM
  2. [Java]need quick help with applet
    By Zantas in forum Programming
    Replies: 0
    Last Post: 06-08-2010, 06:03 AM
  3. [Need quick help]2.4.3 with 3.1.3 (arcemu)
    By nazi1992 in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 08-01-2009, 04:41 PM
  4. Help with Glider needed
    By Victor in forum Community Chat
    Replies: 6
    Last Post: 05-05-2007, 01:16 AM
  5. Need quick help with glider!
    By T.L. Cobra in forum World of Warcraft General
    Replies: 3
    Last Post: 01-31-2007, 04:09 PM
All times are GMT -5. The time now is 08:31 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search