Getting+Player+Account+ID

How would I get the Player Account id? For instance (This didn’t work btw)

accountID = player->GetSession()->GetAccountID();

its GetAccountId, not GetAccountID

See here https://github.com/TrinityCore/TrinityCore/search?utf8=✓&q=GetAccountID

Rochet, Thank you… Not only for answering my question, but the link you posted has shown me a much easier way of searching through the code to find what I’m researching rather than opening every file individually and studying until I find what I’m after. You may have just saved me hours upon hours.

In git bash you can also use grep and other such nice things.
Notepad++ and visual studio also provide such searches.
Github search isnt always the best way to search because it doesnt show all results and the search capabilities are very limited. Notepad++ for example allows regex in your search.

Some other ways to search stuff I use is usually going to the command files (cs_*.cpp) and look around there. They have a lot of nice things implemented like mail, adding item etc. Another place to start is from opcodes.cpp that give you the functions that handle different opcodes. Like if you want to know about buying stuff, you can go there, search buy and find the function that handles buying. Then find that and look what it does.

Also using visual studio’s intellisense is pretty great.
Just open the TrinityCore.sln and then open your script in the same window. It will have highlighting and code completion and suggestions etc.
You can search for functions and definitions on the solution explorer (on left or right) and pressing CTRL+SPACE should do code completion.

Compile in debug to get crashlogs that you can read. They contain line numbers for crashes. and files etc. Even some variable contents at time of crash.
Not to mention then you can debug, which can be a huge help when coding anything at all.

Thanks for all the advice Rochet. I used to use Visual Studio, now I’m using CLion with the Intellisense IDE. It’s taken getting used to, but the auto upload to my VM works great for seamless Windows Development/Gaming to Linux compiling.