WesQuests.cpp Utils, Changes, Etc
Going to edit this post as I add more changes etc.
I was bored, and I noticed when using the quest functions SAY, SHOUT, EMOTE etc... NPCs name's have 0 appended to them. This is due to the fact that EQLive only uses 2 digits for their NPC numbering (eg. a_shadow_wolf01), while EQEmu uses 3 (a_shadow_wolf001). Therefore when processed, I'm assuming the EQClient automatically removes 2 digits from the end of the name. However, because of EQEmu's 3, you're left with "a shadow wolf0 says, "Hi there, Soandso!". Anyway, I added the following code snippets to WesQuests.cpp and client.h that effectively remove any 0's through 9's and replace them with a null character. client.h I added this after the "char * strreplace" line, in the public section of class Client. Code:
char * stripNumFromStr( const char* strToStrip ); I added this after the method "Client::strreplace". (Originally it was editing the NPC's actual Name, which is very very bad. Changed it to store it in a static char once I found out the max length for a name) Code:
char* Client::stripNumFromStr ( const char* strToStrip ) Now simply wrap the "this->target->GetName()" call inside a call to stripNumFromStr. Here is SAY (modified): Code:
entity_list.Message(0, MT_Say, "%s says, %s", [b]stripNumFromStr( this->target->GetName() )[/b], nmessage); Code:
entity_list.Message(0, MT_Emote, "%s %s", stripNumFromStr( this->target->GetName() ), nmessage); Code:
entity_list.Message(0, MT_Shout, "%s shouts, %s", stripNumFromStr( this->target->GetName() ), nmessage); |
can you post here your version of wesquest.cpp ?
|
The better solution here is to simply pull off the trailing character if indeed the emu uses 3 instead of 2 id digits.
The problem with your code is that if the npc's name has any digits in it, anywhere in the name, they get striped. "Clockwork Model 8", "D7 Scavenger", "Obsolete Model 4", would be butchered. |
The real question is, why are we bothering to use three digits? Change it to only allow 2.
The devs are constantly complaining that we don't have as much CPU power as the real EQ servers use, so by no means will we be having 100+ of an NPC with the exact same name in a zone. |
steve you are wrong. what if somone wants to have a special event where say orcs invade Gfay. there could easly be 100+ orc cents.
Quote:
|
Quote:
Quote:
I'm not sure what you expect from the EMU, but most people are looking forward towards pathing, and having the NPCs more lifelike. The farther along we get by adding more features, the less and less people that will be able to run their own server. I don't think this is a bad thing. You can always play on an emulated server instead of running your own. Besides, if you don't have the CPU/RAM to be running a zone with pathing, the server will never amount to anything more than an interactive item creator/zone explorer. The best solution is to make the higher intensive CPU functions defineable in the makefile, so that if you can't support it, it doesn't try to use it. |
There are enough NPCs in certain zones to exceed 99 of a unique mob. Esp. Luclin
|
EQLive uses only two digits for mob names, even in PoP. Luclin zones would be fine. If it goes over 99, then that's the DB fault for having 20+ duplicates of the same NPC ;p
/shrug |
Last I checked, they use three.
|
Three digits, nowadays.
Used to be two. |
All times are GMT -4. The time now is 02:17 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.