Merchant names when talking to players
When talking to players, the Merchant Name that shows up is not the version of the name with spaces so it shows up as:
Quote:
Code:
if(merch != NULL && handyitem){ Code:
if(merch != NULL && handyitem){ Quote:
However, if you do have merchants with names longer than 64 characters then that specific merchant just won't say anything. The reason for this is because you can't copy something longer than 64 characters into something that is 64 characters, so the code doesn't work at that point, but it does continue and does not crash, so the merchant just skips what he would have said. If you're concerned about this, the way to fix it is to calculate the length of the string generated by merch->GetCleanName() and if it is longer than 64 characters use strncpy to chop it to 64 characters, otherwise use the function I've changed above. I wasn't that industrious. |
Hmmm this was merged into the official code and it is working very nicely. Such a small but extremely nice change. However, certain NPCs will no longer say anything, specifically all of the Necromancer merchants in Paineel. 'Linnleu_Brackmar Necromancer Supplies' is one example. I don't think the lastname is used, but even if it is as you can see it is still under 64 characters in length.
Now, oddly in the same area the guildmasters all do work. 'Coriante_Verisue Necromancer Guildmaster' as example does use her proper text. I went through other cities, and had no problem with their merchants and they all had a nice clean name :) Not a big deal, as most don't even look at the text anyway I'm sure, and since it probably is a minority of NPCs anyway who really cares. I was just letting you know about it in case you can stumble upon the problem. |
The guildmaster code is in a different area, so this wouldn't have affected that.
I loaded up an older version of the emu and found that I couldn't get the Paineel merchants to talk to me before the change above. I thought at first it had something to do with the handyitem, but I'm not sure now that it is the case. I probably won't really get around to looking at it any time soon, but thank you for letting me know so that I have NPCs to test with if I happen to see the problem. |
All times are GMT -4. The time now is 05:17 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.