User Tag List

Results 1 to 7 of 7

Thread: Extra Talent Points for GM ranks

  1. #1
    Enthusiast
    Join Date
    Mar 2014
    Posts
    8
    XP
    1,809
    Level
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Extra Talent Points for GM ranks

    Hello, i've been looking for a way to make it so people who have the Gm rank 1 or higher get 10 extra talent points. I have been looking into it for a while but i'm not the brightest when it comes to C++. so basically everyone gets 76 talent points unless they have a gm rank of 1 or higher then they would get 86 talent points. This is a Trinity 3.3.5 compile, where the level cap is 85. If someone could help me out with this, I would appreciate it a lot.

    Thank you,

  2. #2
    Exalted Member yvoms's Avatar
    Join Date
    Dec 2014
    Location
    The Netherlands
    Posts
    235
    XP
    3,280,426
    Level
    364
    Thanks
    23
    Thanked 51 Times in 28 Posts
    erm .mod talents?
    Achievements:
    Member Referrer Got a Sticky! Shopper 1 year registered Level XL Level C
    Awards:
    LOL Raffle Winner Support Drunk

    http://nephilimwow.com/ - Burning Crusade Realms.


    "Peace and prosperity lets life flow on. -Katos"


  3. #3
    Original Poster
    Enthusiast
    Join Date
    Mar 2014
    Posts
    8
    XP
    1,809
    Level
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, that would be fine if I was just modifying my own talent points. But I want it to modify all the vip / gm ranks, I would have a custom command or a creature gossip to do this but they would have to use the command or talk to the creature every time they create a new character or want to reset there talent points since trinity core doesn't save the amount talent points in the database. I would much rather have it so they can log in and start off with the extra talent points.

  4. #4
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,433
    XP
    20,133,663
    Level
    500
    Thanks
    1,069
    Thanked 322 Times in 206 Posts
    I did something like this with my C++ vip system. It adds extra talent points for vip levels. but you could could probably review my cheatsheat to get an idea of where to start.

    Code:
    /////////////////////////////////////////////////////
    /////////////////////////////////////////////////////
    -----------------------------------------------------
    src/server/game/entities/
    Player.cpp
    
    
    Code:
     line 3157 - void Player::InitTalentForLevel()
            uint32 VIP_TP_BONUS = sWorld->getIntConfig(CONFIG_VIP_TP_BONUS);
            uint8 Pvip = sAccountMgr->GetVIP(GetSession()->GetAccountId());
            uint32 TPMOD = (Pvip * VIP_TP_BONUS);
    
            uint32 talentPointsForLevel = CalculateTalentsPoints();
    Code:
     line 3164 - void Player::InitTalentForLevel()
            if (m_usedTalentCount > (talentPointsForLevel + TPMOD))
    Code:
     line 3158 - void Player::InitTalentForLevel()
                SetFreeTalentPoints((talentPointsForLevel + TPMOD) - m_usedTalentCount);
    -----------------------------------------------------
    Code:
     line 4415 - bool Player::resetTalents(bool no_cost)
        uint8 VIP_TP_BONUS = sWorld->getIntConfig(CONFIG_VIP_TP_BONUS);
        uint8 Pvip = sAccountMgr->GetVIP(GetSession()->GetAccountId());
        uint32 TPMOD = (Pvip * VIP_TP_BONUS);
    Code:
     line 4430 - bool Player::resetTalents(bool no_cost)
            SetFreeTalentPoints(talentPointsForLevel + TPMOD);
    Code:
     line 4492 - bool Player::resetTalents(bool no_cost)
        SetFreeTalentPoints(talentPointsForLevel + TPMOD);
    ----------------------------------------------------- /////////////////////////////////////////////////////
    instead of using the vip level you can use the acct security level.
    it works thru resets :D
    you could change
    uint8 VIP_TP_BONUS = 9;
    uint8 Pvip = 0;

    then add a check if(player:IsGM()) to set Pvip to 1 then if not it will stay 0 and affect the the math lol
    add this after the check
    uint32 TPMOD = (Pvip * VIP_TP_BONUS);
    Last edited by slp13at420; 05-29-2015 at 01:50 AM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  5. #5
    Original Poster
    Enthusiast
    Join Date
    Mar 2014
    Posts
    8
    XP
    1,809
    Level
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So far I think I have set it up correctly, just the part I don't understand is

    Quote Originally Posted by slp13at420 View Post
    Code:
     line 4415 - bool Player::resetTalents(bool no_cost)
        uint8 VIP_TP_BONUS = sWorld->getIntConfig(CONFIG_VIP_TP_BONUS);
        uint8 Pvip = sAccountMgr->GetVIP(GetSession()->GetAccountId());
        uint32 TPMOD = (Pvip * VIP_TP_BONUS);
    Not sure where I would put this part.. Well the edited part of it,

    Code:
        for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId)
        {
            TalentEntry const* talentInfo = sTalentStore.LookupEntry(talentId);
    
            if (!talentInfo)
                continue;
    
            TalentTabEntry const* talentTabInfo = sTalentTabStore.LookupEntry(talentInfo->TalentTab); ## This is my line 4415
    
            if (!talentTabInfo)
                continue;
    not even sure if that is the correct spot to put it..

  6. #6
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,433
    XP
    20,133,663
    Level
    500
    Thanks
    1,069
    Thanked 322 Times in 206 Posts
    im initializing variables here:
    uint32 VIP_TP_BONUS = sWorld->getIntConfig(CONFIG_VIP_TP_BONUS);
    uint8 Pvip = sAccountMgr->GetVIP(GetSession()->GetAccountId());
    uint32 TPMOD = (Pvip * VIP_TP_BONUS);

    you can change the names like this:
    uint32 GM_BONUS = 8;
    uint8 multiplier = 0;

    if(player:IsGM())then
    {
    multiplier = 1;
    };
    uint32 TPMOD = (multiplier * GM_BONUS);

    the line numbers are just for reference. find `bool Player::resetTalents(bool no_cost)`
    and add those variable lines at the top then find both `SetFreeTalentPoints(talentPointsForLevel)` inside this block and edit both lines to `SetFreeTalentPoints(talentPointsForLevel + TPMOD);

    if player is NOT gm then 8*0 = 0 so SetFreeTalentPoints(talentPointsForLevel + 0)
    if player is gm then 8*1 = 8 so SetFreeTalentPoints(talentPointsForLevel + 8)
    Last edited by slp13at420; 05-29-2015 at 02:43 AM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff Da Bomb!
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  7. #7
    Original Poster
    Enthusiast
    Join Date
    Mar 2014
    Posts
    8
    XP
    1,809
    Level
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Got it to work, thanks so much! Someone can mark it as solved

    Just had to set _vipBonus to that

    uint32 _vipBonus = Pvip == 0 ? 0 : 10;
    Last edited by Chronic; 05-29-2015 at 04:53 AM.
    Achievements:
    1 year registered Level X

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •