Looking for function called straight after loading screen menu

Shout-Out

User Tag List

Results 1 to 10 of 10
  1. #1
    oldmanofmen's Avatar Member
    Reputation
    12
    Join Date
    Jan 2010
    Posts
    104
    Thanks G/R
    4/3
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Looking for function called straight after loading screen

    Does anyone know of a function that is called straight after a loading screen is disabled. I tried hooking the end of LoadingScreenDisable but that function doesn't seem to actually remove the loading screen.

    Looking for function called straight after loading screen
  2. #2
    culino2's Avatar Elite User
    Reputation
    336
    Join Date
    Feb 2013
    Posts
    183
    Thanks G/R
    139/72
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can't give you an example function because I'm not at home, but you could call ClntObjMgrGetActivePlayerObj() in your pulse function and check if the ptr changed from zero to non zero. Also WoW should add some console lines after the loading screen (not 100% sure about this),so you can compare the strings or check where the call came from.
    Last edited by culino2; 08-19-2013 at 05:30 PM.

  3. #3
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    CGGameUI::EnterWorld is called when the loading is done and the object manager is in a correct state (although sometimes the loading screen will still be up for a couple of seconds).

  4. #4
    oldmanofmen's Avatar Member
    Reputation
    12
    Join Date
    Jan 2010
    Posts
    104
    Thanks G/R
    4/3
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by culino2 View Post
    Can't give you an example function because I'm not at home, but you could call ClntObjMgrGetActivePlayerObj() in your pulse function and check if the ptr changed from zero to non zero. Also WoW should add some console lines after the loading screen (not 100% sure about this),so you can compare the strings or check where the call came from.
    Thanks for the reply but ClntObjMgrGetActivePlayerObj() doesn't do the trick, I should have mentioned that I've tried this before. CGPlayer_C__Initialize() is called before the loading screen is made invisible so the player object will be non zero before the loading screen is removed. Also, using the global that is set in LoadingScreenDisable (I believe people call it IsLoadingOrConnecting) is also not a very accurate way to tell if a loading screen is active because the loading screen will still be active very shortly after IsLoadingOrConnecting is set to 0 (no loading screen active).

    Originally Posted by Jadd View Post
    CGGameUI::EnterWorld is called when the loading is done and the object manager is in a correct state (although sometimes the loading screen will still be up for a couple of seconds).
    It is those few seconds or even milliseconds in some cases that are causing the trouble for me. The functions I am trying to call must be done outside a loading screen or the game will crash, I had actually tried using that function as well earlier today with no success.

  5. #5
    culino2's Avatar Elite User
    Reputation
    336
    Join Date
    Feb 2013
    Posts
    183
    Thanks G/R
    139/72
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What function do you want to call?

  6. #6
    oldmanofmen's Avatar Member
    Reputation
    12
    Join Date
    Jan 2010
    Posts
    104
    Thanks G/R
    4/3
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by culino2 View Post
    What function do you want to call?
    I was trying to get my morph program to support persisting through loading screens but whenever I set the player or mount display id during a loading screen the game will crash once the loading screen ends for some reason. It works fine outside of a loading screen. A few patches ago I found the functions that reset the mount and player display ids during a loading screen and hooking those functions did exactly what I needed so I may just have to go looking for those again.
    Last edited by oldmanofmen; 08-20-2013 at 05:41 AM.

  7. #7
    Wrongusername's Avatar Sergeant
    Reputation
    100
    Join Date
    Feb 2011
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you just want persistence why don't you hook UpdateDisplayInfo/OnMountDisplayChanged ... That way you won't have any competition from game trying to override your displayIDs.
    Check if "this" unitPtr in ecx is activeplayer ptr and have some flag global var indicating whether you initiated the change.

  8. #8
    oldmanofmen's Avatar Member
    Reputation
    12
    Join Date
    Jan 2010
    Posts
    104
    Thanks G/R
    4/3
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wrongusername View Post
    If you just want persistence why don't you hook UpdateDisplayInfo/OnMountDisplayChanged ... That way you won't have any competition from game trying to override your displayIDs.
    Check if "this" unitPtr in ecx is activeplayer ptr and have some flag global var indicating whether you initiated the change.
    Already got hooks which do exactly that but these only work for persistence where loading screens aren't involved. It does not look like the resetting of the display ids is handled through either of these 2 functions.

  9. #9
    Wrongusername's Avatar Sergeant
    Reputation
    100
    Join Date
    Feb 2011
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, just tested, hooking that functions only persist through in-zone load screens like from /reload, not ones like change of continent.
    Well it's logical that functions don't help in this case as models aren't updated but initiated/instantiated... You could probably memory-bp displayID and find out culprit writer function, but there's simpler way
    I looked for some nice event that would work, tried PLAYER_ENTER_WORLD but that gets overwritten if you do displayID change at that time, then there's "WORLD_MAP_UPDATE"...
    Since i expose morph functions to WoW lua i just do
    Code:
    if myMorphFrame==nil then
       myMorphFrame=CreateFrame("Frame");
    end;
    
    function myMorphEventHandler()
    		SetUnitDisplayID("player",20318)
    		SetUnitMountDisplayID("player",17890)
    end
    
    myMorphFrame:RegisterEvent("WORLD_MAP_UPDATE") 
    myMorphFrame:SetScript("OnEvent", myMorphEventHandler)
    You probably hook FrameScript_SignalEvent and find out the spot where it's called with param, EVENT_WORLD_MAP_UPDATE = 0x166, may not be up to date with retail but getting eventID isn't that hard. That's your spot where you can safely call displayID functions and not only they won't crash but will override displayIDs.

  10. #10
    oldmanofmen's Avatar Member
    Reputation
    12
    Join Date
    Jan 2010
    Posts
    104
    Thanks G/R
    4/3
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wrongusername View Post
    Yep, just tested, hooking that functions only persist through in-zone load screens like from /reload, not ones like change of continent.
    Well it's logical that functions don't help in this case as models aren't updated but initiated/instantiated... You could probably memory-bp displayID and find out culprit writer function, but there's simpler way
    I looked for some nice event that would work, tried PLAYER_ENTER_WORLD but that gets overwritten if you do displayID change at that time, then there's "WORLD_MAP_UPDATE"...
    Since i expose morph functions to WoW lua i just do
    Code:
    if myMorphFrame==nil then
       myMorphFrame=CreateFrame("Frame");
    end;
    
    function myMorphEventHandler()
    		SetUnitDisplayID("player",20318)
    		SetUnitMountDisplayID("player",17890)
    end
    
    myMorphFrame:RegisterEvent("WORLD_MAP_UPDATE") 
    myMorphFrame:SetScript("OnEvent", myMorphEventHandler)
    You probably hook FrameScript_SignalEvent and find out the spot where it's called with param, EVENT_WORLD_MAP_UPDATE = 0x166, may not be up to date with retail but getting eventID isn't that hard. That's your spot where you can safely call displayID functions and not only they won't crash but will override displayIDs.
    A really great idea, thanks for that I'll see how it goes.

Similar Threads

  1. Game crashes when calling lua function before loading screen
    By avizer in forum WoW Memory Editing
    Replies: 6
    Last Post: 04-03-2013, 09:04 PM
  2. [Request] Looking for WOTLK loading screen!
    By Strathrename in forum World of Warcraft Model Editing
    Replies: 5
    Last Post: 09-16-2012, 09:31 PM
  3. Replies: 2
    Last Post: 01-31-2009, 11:43 PM
  4. Looking for Call of Duty 4 CD Key - Giving US Warhammer cd key
    By Mentol in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 0
    Last Post: 11-09-2008, 04:02 PM
All times are GMT -5. The time now is 06:46 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search