wow AH expired time menu

User Tag List

Results 1 to 5 of 5
  1. #1
    charmik's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wow AH expired time

    Hello guys, I was wondering that someone can help me with a problem.
    I am trying to read memory AH, and I found this topic: https://www.ownedcore.com/forums/wor...ion-house.html ([WoW] [3.0.9] [C++] Auction House)

    I can get "expired time" for auction, buy I dont understand how it works.
    example: if I put 2 items for 48 hours in the same time, expired times are:
    675757678 and 688547678

    so it's obvious that suffix of number are the same, but the prefix is diffent. I thought maybe bits in the wrong order but it doesn't work...
    anybody can help me, how can I calculate "expired time" from these numbers? another number: 626323678 when I put item for 12 hours.
    I wasted many hours to understand this...
    thank you!

    wow AH expired time
  2. #2
    charles420's Avatar Contributor
    Reputation
    315
    Join Date
    Jun 2009
    Posts
    329
    Thanks G/R
    25/119
    Trade Feedback
    0 (0%)
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    public TimeSpan TimeLeft
    {
    get
    {
    DateTime now = DateTime.Now;
    DateTime dateTime = now.AddMilliseconds((double)(this.TimeLeftSeconds - Environment.TickCount));
    return dateTime - DateTime.Now;
    }
    }

    i know google had a great example on git or place like that with out process example ah bot back when i did mine for lb
    Last edited by charles420; 04-18-2018 at 06:30 AM.

  3. #3
    charmik's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you add to "now" (this.TimeLeftSeconds - Environment.TickCount) and then substract DateTime.Now
    so your code is equalent to expiredTime - Environment.TickCount, but then I try to divide it: /1000 / 60 / 60, and dont get result that I expect. what's the problem?
    and Why TimeLeftSeconds in seconds? because TickCount - milliseconds

  4. #4
    charmik's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone, guys?

  5. #5
    culino2's Avatar Elite User
    Reputation
    336
    Join Date
    Feb 2013
    Posts
    181
    Thanks G/R
    139/72
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Source | SVN | Assembla
    Source | SVN | Assembla

    Code:
        int __cdecl AuctionFrame_GetTimeLeftTextCallback( DWORD_PTR dwState )
    
        {
    
            if( Delegates::luaWoW_isnumber( dwState, 1 ) != 1 )
    
                return 0;
    
            std::string sResult;
    
            UINT uTime = (UINT) Delegates::luaWoW_tonumber( dwState, 1 );
    
            if( uTime <= 0 )
    
                sResult = "Ended";
    
            else
    
            {
    
                SChunkedTime chunkedTime = Functions::TimeToChunked( uTime );
    
                sResult = Functions::FormatCString( "%02d:%02d:%02d",
    
                    chunkedTime.Hours, chunkedTime.Minutes, chunkedTime.Seconds );
    
            }
    
            Delegates::luaWoW_pushlstring( dwState, sResult.data(), sResult.length() );
    
            return 1;
    
        }
    
        SChunkedTime TimeToChunked( UINT uTimeInterval )
    
        {
    
            SChunkedTime chunkedTime = { 0 };
    
            chunkedTime.Hours = ( uTimeInterval / 3600 ) & 0xFFFF;
    
            chunkedTime.Minutes = ( uTimeInterval / 60 - chunkedTime.Hours * 60 ) & 0xFF;
    
            chunkedTime.Seconds = ( uTimeInterval % 60 ) & 0xFF;
    
            return chunkedTime;
    
        }
    Last edited by culino2; 04-27-2018 at 08:40 PM. Reason: better solution

Similar Threads

  1. Sell your WoW account multiple times
    By Tontu in forum WoW Scam Prevention
    Replies: 4
    Last Post: 11-16-2007, 10:58 AM
  2. WoW Funny Chat Times
    By anmer in forum World of Warcraft General
    Replies: 6
    Last Post: 11-13-2007, 04:11 AM
  3. WoW Through the times
    By Acespades in forum Screenshot & Video Showoff
    Replies: 10
    Last Post: 10-10-2007, 05:49 PM
  4. WTS or WTT Original WoW Key + 4 Time Cards
    By m0rbidang3l in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 8
    Last Post: 08-09-2007, 10:19 AM
  5. WoW 60 day time cards
    By eat mah -.- in forum WoW Scam Prevention
    Replies: 22
    Last Post: 02-13-2007, 10:05 PM
All times are GMT -5. The time now is 10:30 AM. 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