1 (edited by Baynar 2016-06-02 11:19:29)

This will automatically learn the spells for your level Like in MOP

http://pastebin.com/9vsheX52

Make sure to have:
newscript->OnLevelChanged = &OnPlayerLevelChanged;

At the bottom

This is the error http://prntscr.com/bd42qx

cyberpro wrote:

This is the error http://prntscr.com/bd42qx

It corrected this commit

4 (edited by cyberpro 2016-06-07 09:10:25)

Going to test it smile big_smile

5 (edited by cyberpro 2016-06-07 18:26:02)

Well you see this  - >
http://prntscr.com/bdjncd

I can leave at the end the

" return true; "
If i delete it it gives me a warning like ---->
Warning    1    warning C4715: 'ChatHandler::HandleResetLevelCommand' : not all control paths return a value    c:\users\aleksandar\desktop\oregon source\src\game\level3.cpp    5264    1    game

So if i put  return true;
It doesn't give me any error/warning smile
So what are you thinking about ?



// reset level to summoned pet
    Guardian* pet = player->GetGuardianPet();
    if (pet)
        pet->InitStatsForLevel(startLevel);
    return true;
}

6 (edited by Vagabonden 2016-09-07 14:27:47)

cyberpro wrote:

Well you see this  - >
http://prntscr.com/bdjncd

I can leave at the end the

" return true; "
If i delete it it gives me a warning like ---->
Warning    1    warning C4715: 'ChatHandler::HandleResetLevelCommand' : not all control paths return a value    c:\users\aleksandar\desktop\oregon source\src\game\level3.cpp    5264    1    game

So if i put  return true;
It doesn't give me any error/warning smile
So what are you thinking about ?



// reset level to summoned pet
    Guardian* pet = player->GetGuardianPet();
    if (pet)
        pet->InitStatsForLevel(startLevel);
    return true;
}

I know its old topic, but did you get it to work?

I'm a sql man myself, new to this codes.

So i guess i put this into main.cpp?

Whatabout the

"Make sure to have:
newscript->OnLevelChanged = &OnPlayerLevelChanged;
At the bottom"

What does that mean?

Its working perfectly smile go to onevents.cpp and replace the empty void with name void OnPlayerLevelChanged(Player* player, uint8 oldLevel, uint8 newLevel) with the one in the pastebin

8 (edited by Vagabonden 2016-09-11 16:25:03)

Baynar wrote:

Its working perfectly smile go to onevents.cpp and replace the empty void with name void OnPlayerLevelChanged(Player* player, uint8 oldLevel, uint8 newLevel) with the one in the pastebin


I got it working for some classes.

Ally
Ally Paladins dont work - Reason is its TrainerID is for the Shaman in SW tongue
Ally warrior dont work - Reason is its a trainer NPC from level 10+. Need to find another that goes from level 1-70
Ally rouge work
Ally priest work
Ally mage work
Ally warlock work
Ally hunter work
Ally druid work
Ally shaman work

Horde
Hordw Warrior dont work - Well same as ally warrior
Horde Hunter work
Horde Shaman work
Horde Priest work
Horde Warlock work
Horde Rogue work
Horde Mage work
Horde Paladin work
Horde Druid work

------------------------------------------------------------------------------

What if they login as level 70? lets say they get instant level 70?
They dont get any spells.

Any clue what way would be the best to fix this??

the problem with lvl70 is, the OnPlayerLevelChanged Event will be never triggered because the char is already 70 at creation,

on character creation no script can be called, but on the first login it would be possible to call it.
i think this should be possible with a minimum of modifications....

They all seem to be working for me but i think i changed some id's idk

and the level 70 problem just use the same script in OnLogin event and make a if(playtime <= 5)