Optional Disable Character Deletion
Disable or Enable Character Deletion

Briefly, i added "DisableCharDeletion" support in arcemu-optional.conf file (http://pastebin.com/m7196b8b0).
If set to 1, Players are able to create but not delete Characters (this is for avoiding unvoluntary char delection (i.e.: stolen account))

You're wrong, my code is correct. You have to set it to TRUE in the function control in order to NOT ACTIVATE the deletion procedure. Your code would do the OPPOSITE thing ! (Try by yourself). Anyway, I just compiled it and it works fine. You have badly interpreted the boolean procedure:

"Disabled by default", yes, but in the CONFIG FILE, not in the function ! The function reads the value in the config file, and if it's set to 1, avoid the deletion. Otherwise, it will allow it. It's obvious.

Please don't post such things, this mess up people brain and create a lot of confusion.

Again, my code is correct

About the "this isn't a patch file", i have no idea of what you mean by that...I just committed my idea and the related piece of code

I'm not an idiot and this cannot make a compile error, it's a sort of typo fix... The third argument of the function is the default value if the second argument doesn't exist in config file. So it's better to set it like the default value in config file .

This makes no sense at all. The config file is updated by the patch file, so i do not see any reason to use the opposite value. In that case, too, the Disable is called by an IF statement, so if you set that value to false by default, the function would work ...INVERTED. So it would disable the deletion only if set to...FALSE. And this is NOT what the function has to do. Additionally, if the value is not found in the conf file, the IF would automatically NOT execute its statement, as long as there's no ELSE statement specified (it's a simple conditional jump).

After a few chatlines with Elenion, i now fully understand your point of view.

I take a look at the GetBoolDefault declaration in Config.cpp (arcemu-shared) and in fact you're right. It would return true if the config file does not contain the DisableCharDeletion directive. Now i fully understand your point of view. Sorry, i did not intend it in that way I thinked that you just misunderstood the boolean execution (EnableCharDeletion instead of DisableCharDeletion) Yep, returning false by default, in that case is a good idea. Anyway, if people update (as they should do) their config file, there will be no problem at all

I attach to the post the new patchfile Thank you Sadikum, it's always an "anti-lazy user fix"