Thread: Naked Corpses
View Single Post
  #10  
Old 10-14-2006, 07:30 AM
LostZaphod
Sarnak
 
Join Date: May 2006
Posts: 43
Default Corpse Loot Fix

In PVP no experence is lost from a PVP kill, Here is a Unified Diff file of PlayerCorpse.cpp. (EQEmu-0.7.0-857) The bottom line is all sections that delete corpses need to be removed except for the finished loot section.

Code:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Tk is available, Tk-macros are enabled
TCL is available, shell is enabled : help (select and press enter)
cvs diff -u -- PlayerCorpse.cpp (in directory C:\cvs\EQEmuCVS\Source\zone\)
Index: PlayerCorpse.cpp
===================================================================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/zone/PlayerCorpse.cpp,v
retrieving revision 1.15.2.12
diff -u -r1.15.2.12 PlayerCorpse.cpp
--- PlayerCorpse.cpp	9 Jul 2006 20:02:37 -0000	1.15.2.12
+++ PlayerCorpse.cpp	14 Oct 2006 19:17:32 -0000
@@ -98,13 +98,13 @@
 	pc->beard = dbpc->beard;
 	pc->Rezzed(rezzed);
 	pc->become_npc = false;
-	if (pc->IsEmpty()) {
-		safe_delete(pc);
-		return 0;
-	}
-	else {
+	//if (pc->IsEmpty()) {
+	//	safe_delete(pc);
+	//	return 0;
+	//}
+	//else {
 		return pc;
-	}
+	//}
 }
 
 // To be used on NPC death and ZoneStateLoad
@@ -336,9 +336,10 @@
 
 Corpse::~Corpse() {
 	if (p_PlayerCorpse) {
-		if (IsEmpty() && dbid != 0)
-			database.DeletePlayerCorpse(dbid);
-		else if (!IsEmpty() && !(p_depop && dbid == 0))
+		//if (IsEmpty() && dbid != 0)
+		//	database.DeletePlayerCorpse(dbid);
+		//else if (!IsEmpty() && !(p_depop && dbid == 0))
+		if (!IsEmpty() && !(p_depop && dbid == 0))
 			Save();
 	}
 //	safe_delete(NPCTypedata);
@@ -366,10 +367,10 @@
 }
 
 bool Corpse::Save() {
-	if (IsEmpty()) {
-		Delete();
-		return true;
-	}	
+	//if (IsEmpty()) {
+	//	Delete();
+	//	return true;
+	//}	
 	if (!p_PlayerCorpse)
 		return true;
 	if (!pIsChanged)

***** CVS exited normally with code 1 *****
Reply With Quote