Sharing With Community #2

This is all followup on my last ‘share’ the CharNameInfo.

One thing to note MAX_INFOCHAR_NAME_LENGTH is defined as (MAX_CHARACTER_NAME * 2 + 1), It should be (MAX_CHARACTER_NAME + 1) but I saw characters with names longer that that (maybe from some of my previous experimenting with someting) in DB. Also name is stored in char[] instead of std::string to allow fast and easy copying by memcopy. 1st version, horribly slow lookup by name Just improvement to character deletion Crashfix Typo fix Useless (and actually harmful on UNIX) mutex removal Fix loading Fix crash on petition turn in Rewrite lookup by name Improvement to debug command Improve lookup by name Prevent lookup by name from modifying original string Add timing output to debug command Add account character count to it Make use of last patch

So basically what this does is handle characters and their respective interactions with other characters in a more efficient way than we currently have? this is a newb’s assumption after reading your code. If it’s wrong, would you mind telling me what is it for? Everything you code interests me /emoticons/default_smile.png

Thank you for your time.

Exactly. It removes database interaction from many simple ‘queries’ about players.

That looks nice.

Thank you, I wonder why things like this doesn’t get pushed to the core instantly hehe

They have not been submitted till now (and it’s not a pull request).

I am way too lazy to fork TC and make pull requests. I’m just sharing snippets of code that some people may find useful or interesting.

I can do that if u want.

Sorry for post on a old topic but could you upload one more time these code?

Thanks and good work /emoticons/default_smile.png

The code has been removed from paste2 ( I wonder what is their expiration time). Could you upload it to a gist in ?