Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2010, 12:02 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default COMMITTED: Pass Corpse Name to EVENT_LOOT

The following changes allow the name of the corpse to be passed to perl in the EVENT_LOOT sub as $corpse in the NPC database name format such as "a_ra`tuk_screambringer" or "#Viarglug".

Code:
Index: zone/embparser.cpp
===================================================================
--- zone/embparser.cpp	(revision 1575)
+++ zone/embparser.cpp	(working copy)
@@ -594,6 +594,7 @@
 			Seperator *sep = new Seperator(data);
 			ExportVar(packagename.c_str(), "looted_id", sep->arg[0]);
 			ExportVar(packagename.c_str(), "looted_charges", sep->arg[1]);
+			ExportVar(packagename.c_str(), "corpse", sep->arg[2]);
 			safe_delete(sep);
 			break;
 		}
Index: zone/PlayerCorpse.cpp
===================================================================
--- zone/PlayerCorpse.cpp	(revision 1575)
+++ zone/PlayerCorpse.cpp	(working copy)
@@ -1057,9 +1057,12 @@
 		}
 
 #ifdef EMBPERL
-		char buf[24];
-		snprintf(buf, 23, "%d %d", inst->GetItem()->ID, inst->GetCharges());
-		buf[23] = '\0';
+		char buf[88];
+		char corpse_name[64];
+		strcpy(corpse_name, orgname);
+		EntityList::RemoveNumbers(corpse_name);
+		snprintf(buf, 87, "%d %d %s", inst->GetItem()->ID, inst->GetCharges(), corpse_name);
+		buf[87] = '\0';
 		((PerlembParser*)parse)->Event(EVENT_LOOT, 0, buf, (NPC*)NULL, client);
 #endif
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 06:12 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3