-
Contributor
[3.3.5a][wotlk] Object manager and stuff. c++ noob freestyle
---
Edit: I decided to remove the co called bot, due to the lack of interest and the possibly negative influence to the fragile now-days wow emulation community.
I
will publish basic examples, like injection, detours and interesting stuff.
Regarding that nobody interested in it, all content was removed, so please contact me if you have questions.
My aim was to learn c++ while having fun in same time, but after all, it seems that I still suck at it.
Last edited by tutrakan; 04-02-2017 at 11:55 PM.
-
Post Thanks / Like - 4 Thanks
-
Nice move thta you shared it with the community. +5 Rep.
A c++ noob myself but I would probably group up classes logically in folders
Edit: You must spread some Reputation around before giving it to tutrakan again.
Check my blog: https://zzuks.blogspot.com
-
-
Contributor
Originally Posted by
Corthezz
A c++ noob myself but I would probably group up classes logically in folders
.
My greatest fear was this #include nightmare with (even!) my own files from folders and sub-folders.
Regarding structuring: The MVS IDE has this nice feature (c++ only if I'm right): creating these virtual folder structures named "filters", which helped me to keep all the stuff in one physical place.
Anyway, I've listened your advice and classified in folders, in a way to help with the readability out of my IDE.
Thanks!
Last edited by tutrakan; 10-27-2016 at 10:24 PM.
-
Contributor
A question for advanced windows users:
Can i have any help with finding a window handle in relation on the text tittle(example; give me a window handle having this text on his title: "World of Warcraft Retail") and set focus on it.
Any help is good. TY!
-
Originally Posted by
tutrakan
A question for advanced windows users:
Can i have any help with finding a window handle in relation on the text tittle(example; give me a window handle having this text on his title: "World of Warcraft Retail") and set focus on it.
Any help is good. TY!
To find the window handle, use ::FindWindow -- FindWindow function (Windows)
To bring that window to the front, use ::SetForegroundWindow -- SetForegroundWindow function (Windows)
-
Post Thanks / Like - 1 Thanks
tutrakan (1 members gave Thanks to namreeb for this useful post)
-
Contributor
Thanks, concise answer. And worked well.
Any advice how to deal with these circular include nightmares?
Rvalue References: C++0x Features in VC10, Part 2 | Visual C++ Team Blog
Go to the comments (Tom and BF) and tell me your opinion about.
Honestly, sometimes I am discouraged to continue with c++. I spent more time struggling with includes than developing further the program logic^^.
Last edited by tutrakan; 11-03-2016 at 08:49 AM.
-
Private
If you want to avoid 'include hell', the first thing you should do is stop using headers for function definitions.
Why do you use headers for everything?
Do like this:
Manager.hpp:
Code:
void mrint(std::string name, std::string value);
Manager.cpp
Code:
void mrint(std::string name, std::string value)
{
if (graph == nullptr)
return;
std::string line = name + " = " + value;
graph->AddTextLine(line);
}
And in this function you better pass strings by const reference.
-
Post Thanks / Like - 1 Thanks
tutrakan (1 members gave Thanks to Naggwa Shel for this useful post)
-
Contributor
Originally Posted by
Naggwa Shel
Why do you use headers for everything?
I find that the famous c-like manner to split declarations and definitions in two separate files (IMHO), decreases maintainability and readability and adds a lot of redundancy in the code.
And I tried something else and I liked it more that way.
I imagine that this way can be a very bad practice, so that's why I posted it here to get some advises for c++ etc.
Thanks for the const reference, I wrote it as it was a c# function by mistake.
-
Member
Their is a C++ interface of WoW Client available somewhere on Github too... Very usefull, for 3.3.3 or 3.3.5a I don't remember.
Name is WowX or WowOne something like this someone hae any link?
-
WoWX is 2.4.3 TBC iirc.
There is however this:
GitHub - tomrus88/WowAddin
-
Contributor
Last edited by tutrakan; 11-25-2016 at 07:52 AM.