Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2006, 12:59 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default Cosmetic Text Changes

FNW,

I have found a simple and free diff tool and made the following patches for changes that are cosmetic in the sense that functions that send text to the client use GetCleanName() instead of GetName(). In college I had to take a theater production course and the one thing I took away from it that is useful is the whole idea of "suspension of disbelief". Anyway, I hope these patches work for you.

In \Zone\client_process.cpp
Code:
434c434
< 					entity_list.MessageClose(this,false,100,0,"%s ceases shielding %s.",GetCleanName(),shield_target->GetCleanName());
---
> 					entity_list.MessageClose(this,false,100,0,"%s ceases shielding %s.",GetName(),shield_target->GetName());
In \Zone\MobAI.cpp
Code:
1119c1119
<	 entity_list.MessageClose(this, true, 600, 13, "%s has become ENRAGED.", GetCleanName());
---
>	 entity_list.MessageClose(this, true, 600, 13, "%s has become ENRAGED.", GetName());
1127c1127
<		 entity_list.MessageClose(this, true, 600, 13, "%s is no longer enraged.", GetCleanName());
---
>		 entity_list.MessageClose(this, true, 600, 13, "%s is no longer enraged.", GetName());
1167c1167
<	 entity_list.MessageClose(this, true, 600, 13, "%s goes on a RAMPAGE!", GetCleanName());
---
>	 entity_list.MessageClose(this, true, 600, 13, "%s goes on a RAMPAGE!", GetName());
In \Zone\attack.cpp
Code:
1276c1276
< 			entity_list.MessageClose(this, 1, 200, 10, "%s says, 'That is not a legal target master.'", this->GetCleanName());
---
> 			entity_list.MessageClose(this, 1, 200, 10, "%s says, 'That is not a legal target master.'", this->GetName());
2230c2230
< 					owner->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName(),ConvertArray(damage,val1));
---
> 					owner->Message_StringID(4,OTHER_HIT_NONMELEE,GetName(),ConvertArray(damage,val1));
2253c2253
< 					attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName(),ConvertArray(damage,val1));
---
> 					attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetName(),ConvertArray(damage,val1));
In \Zone\client_packet.cpp
Code:
4583c4583
< 		Message(0,"%s says, 'Now taunting foes, Master!",mypet->GetCleanName());
---
> 		Message(0,"%s says, 'Now taunting foes, Master!",mypet->GetName());
4588c4588
< 		Message(0,"%s says, 'No longer taunting foes, Master!",mypet->GetCleanName());
---
> 		Message(0,"%s says, 'No longer taunting foes, Master!",mypet->GetName());
In \Zone\mob.cpp
Code:
1766c1766
< 		entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetCleanName(), GetHateTop()->GetName() );
---
> 		entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetName(), GetHateTop()->GetName() );
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #2  
Old 10-23-2006, 03:31 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

a unified diff would be easier to work with, especially one which has file headers in it. This way I do not have to apply it by hand. Something like:
Code:
--- mob.cpp	2006-10-20 14:38:47.000000000 +0200
+++ ../source/zone/mob.cpp	2006-10-23 17:50:11.000000000 +0200
@@ -1149,9 +1149,9 @@
 	if (WholeZone)
 		entity_list.QueueClients(this, outapp, iIgnoreSelf);
 	else if(specific_target != NULL)
-		specific_target->QueuePacket(outapp);
+		specific_target->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
 	else if (this->IsClient())
-		this->CastToClient()->QueuePacket(outapp);
+		this->CastToClient()->QueuePacket(outapp, false, Client::CLIENT_CONNECTED);
 	safe_delete(outapp);
 }
Reply With Quote
  #3  
Old 10-23-2006, 05:26 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Hows about....

Code:
--- c:\temp\1\zone\client_process.cpp	2006-10-19 13:03:34.593750000 -0500
+++ c:\temp\2\zone\client_process.cpp	2006-10-15 23:11:28.000000000 -0500
@@ -431,7 +431,7 @@
			 {
				 if (!CombatRange(shield_target))
				 {
-					entity_list.MessageClose(this,false,100,0,"%s ceases shielding %s.",GetCleanName(),shield_target->GetCleanName());
+					entity_list.MessageClose(this,false,100,0,"%s ceases shielding %s.",GetName(),shield_target->GetName());
					 for (int y = 0; y < 2; y++)
					 {
						 if (shield_target->shielder[y].shielder_id == GetID())
--- c:\temp\1\zone\MobAI.cpp	2006-10-18 22:10:57.328125000 -0500
+++ c:\temp\2\zone\MobAI.cpp	2006-10-15 17:21:50.000000000 -0500
@@ -1116,7 +1116,7 @@
	 // start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
	 SpecAttackTimers[SPECATK_ENRAGE]->Start();
	 bEnraged = true;
-	entity_list.MessageClose(this, true, 600, 13, "%s has become ENRAGED.", GetCleanName());
+	entity_list.MessageClose(this, true, 600, 13, "%s has become ENRAGED.", GetName());
 }
 
 bool Mob::IsEnraged()
@@ -1124,7 +1124,7 @@
	 // check the timer and set to false if time is up
	 if (bEnraged && SpecAttackTimers[SPECATK_ENRAGE] && SpecAttackTimers[SPECATK_ENRAGE]->Check())
	 {
-		entity_list.MessageClose(this, true, 600, 13, "%s is no longer enraged.", GetCleanName());
+		entity_list.MessageClose(this, true, 600, 13, "%s is no longer enraged.", GetName());
		 safe_delete(SpecAttackTimers[SPECATK_ENRAGE]);
		 SpecAttackTimers[SPECATK_ENRAGE] = new Timer(360000);
		 SpecAttackTimers[SPECATK_ENRAGE]->Start();
@@ -1164,7 +1164,7 @@
 bool Mob::Rampage()
 {
 
-	entity_list.MessageClose(this, true, 600, 13, "%s goes on a RAMPAGE!", GetCleanName());
+	entity_list.MessageClose(this, true, 600, 13, "%s goes on a RAMPAGE!", GetName());
	 for (int i = 0; i < MAX_RAMPAGE_TARGETS; i++)
	 {
		 // range is important
--- c:\temp\1\zone\attack.cpp	2006-10-18 22:10:57.812500000 -0500
+++ c:\temp\2\zone\attack.cpp	2006-10-15 17:21:16.000000000 -0500
@@ -1273,7 +1273,7 @@
	 
	 if (!IsAttackAllowed(other)) {
		 if (this->GetOwnerID())
-			entity_list.MessageClose(this, 1, 200, 10, "%s says, 'That is not a legal target master.'", this->GetCleanName());
+			entity_list.MessageClose(this, 1, 200, 10, "%s says, 'That is not a legal target master.'", this->GetName());
		 if(other)
			 RemoveFromHateList(other);
		 mlog(COMBAT__ATTACKS, "I am not allowed to attack %s", other->GetName());
@@ -2227,7 +2227,7 @@
				 if ((spell_id != SPELL_UNKNOWN || (attack_skill>200 && attack_skill<250)) && damage>0) {
					 //special crap for spell damage, looks hackish to me
					 char val1[20]={0};
-					owner->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName(),ConvertArray(damage,val1));
+					owner->Message_StringID(4,OTHER_HIT_NONMELEE,GetName(),ConvertArray(damage,val1));
				 } else {
					 if(damage > 0) {
						 if(spell_id != SPELL_UNKNOWN)
@@ -2250,7 +2250,7 @@
				 if ((spell_id != SPELL_UNKNOWN || (attack_skill>200 && attack_skill<250)) && damage>0) {
					 //special crap for spell damage, looks hackish to me
					 char val1[20]={0};
-					attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName(),ConvertArray(damage,val1));
+					attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetName(),ConvertArray(damage,val1));
				 } else {
					 if(damage > 0) {
						 if(spell_id != SPELL_UNKNOWN)
--- c:\temp\1\zone\client_packet.cpp	2006-10-18 22:10:57.921875000 -0500
+++ c:\temp\2\zone\client_packet.cpp	2006-10-15 23:11:28.000000000 -0500
@@ -4580,12 +4580,12 @@
		 break;
	 }
	 case PET_TAUNT: {
-		Message(0,"%s says, 'Now taunting foes, Master!",mypet->GetCleanName());
+		Message(0,"%s says, 'Now taunting foes, Master!",mypet->GetName());
		 mypet->CastToNPC()->SetTaunting(true);
		 break;
	 }
	 case PET_NOTAUNT: {
-		Message(0,"%s says, 'No longer taunting foes, Master!",mypet->GetCleanName());
+		Message(0,"%s says, 'No longer taunting foes, Master!",mypet->GetName());
		 mypet->CastToNPC()->SetTaunting(false);
		 break;
	 }
--- c:\temp\1\zone\mob.cpp	2006-10-18 22:36:37.203125000 -0500
+++ c:\temp\2\zone\mob.cpp	2006-10-15 23:11:28.000000000 -0500
@@ -1763,7 +1763,7 @@
	 {
		 if (target->IsClient())
			 target->CastToClient()->Message(15,"You have been summoned!");
-		entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetCleanName(), GetHateTop()->GetName() );
+		entity_list.MessageClose(this, true, 500, 10, "%s says,'You will not evade me, %s!' ", GetName(), GetHateTop()->GetName() );
 
		 // RangerDown - GMMove doesn't seem to be working well with players, so use MovePC for them, GMMove for NPC's
		 if (target->IsClient())
Better?
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #4  
Old 11-02-2006, 10:37 PM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

Just out of curosity: What is the difference in output from GetCleanName() and GetName()? Is it the npc's name w/o the _ and spawn number?

That has been annoying me for awhile now, but I haven't had time to really do anything about it (read as: too lazy to even read posts) while i was setting up some zones. Espically since it was more of a cosmetic thing than a server breaking one.
Reply With Quote
  #5  
Old 11-02-2006, 10:48 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Clean name will essentially remove the junk from NPC's server side name. Jobaner00 turns into Jobaner etc.
Reply With Quote
  #6  
Old 11-02-2006, 11:01 PM
bufferofnewbies
Hill Giant
 
Join Date: Dec 2005
Location: Lurking in KY
Posts: 239
Default

excellent, that's one more annoying thing able to be gotten rid of. Thanks for the quick reply, KLS.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:51 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3