Can the 'Level Up' action be canceled? menu

User Tag List

Results 1 to 4 of 4
  1. #1
    phantazmo7's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    5
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can the 'Level Up' action be canceled?

    I am using Azerothcore 3.3.5a.

    I am trying to find a way to disable a player from being 'automatically' leveled up once the xp for the level has been met.
    I want the level up to happen from a gobject instead.

    I have performed many sniffs to weed out the exact action associated with the level up but I only come up with the following:
    After 1193 ms
    Strigid Owl (1995) (GUID 15) dies [343]
    Strigid Owl (1995) (GUID 15) exits combat [343]
    Player 7 exits combat [343]
    Updated Player 7 [343]
    UNIT_FIELD_LEVEL = 2 (old: 1)

    Is there a more advanced sniff to show more of whats happening here: UNIT_FIELD_LEVEL = 2 (old: 1)?
    Or this a function that cannot be changed?

    Can the 'Level Up' action be canceled?
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    This is entirely controlled server side. Look at the Player.cpp class and the methods around LevelUp / GiveXp.

  3. Thanks phantazmo7 (1 members gave Thanks to stoneharry for this useful post)
  4. #3
    phantazmo7's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    5
    Thanks G/R
    2/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stoneharry dead on as always.

    So this is where the magic happens in Player.cpp

    while (newXP >= nextLvlXP && level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
    {
    newXP -= nextLvlXP;

    if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
    GiveLevel(level + 1);

    level = GetLevel();
    nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP);
    }

    SetUInt32Value(PLAYER_XP, newXP);

    I've just begun to learning c++ but if I were to make this statement into its own function that I could call during say....a quest reward....that shouldn't cause any issues elsewhere would it?

    I guess what I am asking is, what's the best way to go about making that statement into it's own function? Just make the function in Player.cpp? Custom Script?

  5. #4
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by phantazmo7 View Post
    Stoneharry dead on as always.

    So this is where the magic happens in Player.cpp

    while (newXP >= nextLvlXP && level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
    {
    newXP -= nextLvlXP;

    if (level < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
    GiveLevel(level + 1);

    level = GetLevel();
    nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP);
    }

    SetUInt32Value(PLAYER_XP, newXP);

    I've just begun to learning c++ but if I were to make this statement into its own function that I could call during say....a quest reward....that shouldn't cause any issues elsewhere would it?

    I guess what I am asking is, what's the best way to go about making that statement into it's own function? Just make the function in Player.cpp? Custom Script?
    The easiest way to stop the existing level up functionality is to disable this function. You can add to the first line: "if (true) return;" so that it always immediately returns (exits the function) without executing anything.

    Then yes, add a new version of the function that can be called from your script and/or other logic when you want. In C++ you need to define the method signature in the header file and the implementation in the class file.

    The reason I suggest doing it this way is then you don't need to go and update all the references to leveling up logic, instead you just disable the level up function and use your own method when required.

  6. Thanks phantazmo7 (1 members gave Thanks to stoneharry for this useful post)

Similar Threads

  1. [Tool] How can people level up to 35+ after the mass banwave?
    By johnnxiv in forum Pokemon GO Hacks|Cheats
    Replies: 13
    Last Post: 01-22-2017, 01:07 AM
  2. Replies: 6
    Last Post: 08-12-2008, 10:23 AM
  3. Can the CoD4 mod be used?
    By tcslasher20 in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 07-09-2008, 07:34 PM
  4. Can any legal action be taken for scamming?
    By liquidator888 in forum World of Warcraft General
    Replies: 0
    Last Post: 01-22-2008, 08:49 PM
  5. Whats the command to level up ranks?
    By sabend in forum World of Warcraft General
    Replies: 2
    Last Post: 11-24-2006, 06:45 AM
All times are GMT -5. The time now is 04:37 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