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.

http://paste2.org/p/1902637 1st version, horribly slow lookup by name

http://paste2.org/p/1902638 Just improvement to character deletion

http://paste2.org/p/1902640 Crashfix

http://paste2.org/p/1902641 Typo fix

http://paste2.org/p/1902642 Useless (and actually harmful on UNIX) mutex removal

http://paste2.org/p/1902645 Fix loading

http://paste2.org/p/1902646 Fix crash on petition turn in

http://paste2.org/p/1902647 Rewrite lookup by name

http://paste2.org/p/1902648 Improvement to debug command

http://paste2.org/p/1902649 Improve lookup by name

http://paste2.org/p/1902650 Prevent lookup by name from modifying original string

http://paste2.org/p/1902651 Add timing output to debug command

http://paste2.org/p/1902652 Add account character count to it

http://paste2.org/p/1902653 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 http://gist.github.com ?

/emoticons/default_sad.png

up