It's great to see interest in source diving and understanding the source code, but you should probably truly understand C++ before trying to teach others. Your explanations of things are very vague and sometimes incorrect, I can't even imagine how you're going to explain A* pathfinding and how the map is stored in memory (quad tree), and several other parts of the source code that aren't beginner friendly. I don't mean any offense, I think it's really great that you want help others climb up to your level of understanding the source code, but I find it counterintuitive when the explanations aren't accurate. I'm also sorry to hear about your uncle.
I'm not going to argue against you, because you're obviously more limited in Lua, but that can be a good thing to protect the end-user from
literally making any mistake that is possible to do with machine instructions. Besides, most of the things you mentioned are possible to do in TFS 1.0 in Lua, using monster scripting (it was added a while back by @
Dalkon).
"::" is used in three different ways that I am aware of. In two of the cases, it is a separator between class name and function name. It is used both when writing the function body that belongs to a class and when calling a static function.
A function body in ClassName example:
void ClassName::FunctionName() {
}
Now, if FunctionName in ClassName is declared static, you could call it like this:
ClassName::FunctionName();
The third case is when you have a namespace, for example the C++ Standard Library is in the "std" namespace, so to access types from the standard library namespace you must prepend it with "std::", example (cout and endl are part of the C++ standard library):
std::cout << "Hello world" << std::endl;
"leftside->" is a shortcut for "(*leftside).", which is dereferencing a pointer and accessing a data member or calling a function of the dereferenced pointer (which the dot is a separator for), example:
(*leftside).do_something();
! means
not. You will usually see it in an if statement, example:
if (!player->isOffline()) {
That will evaluate true if the player is not offline.