PDA

View Full Version : Small bug fix with player corpses.(snippets)


loudent2
05-26-2003, 08:27 AM
I changed the behavior slightly with corpses. If a corpse had no plat or items it was never saved which means empty corpses that could be used for rez were disappearing. I changed it so that it only disappears when empty of items after being looted

RCS file: /cvsroot/eqemu/NightDumps/NightDumps/Source/zone/PlayerCorpse.cpp,v
retrieving revision 1.1.1.1
diff -w -r1.1.1.1 PlayerCorpse.cpp
456,458c456,457
< bool Corpse::IsEmpty() {
< if (copper != 0 || silver != 0 || gold != 0 || platinum != 0)
< return false;
---
> bool Corpse::IsEmpty(bool bIgnoreRezXP) {

if (copper != 0 || silver != 0 || gold != 0 || platinum != 0)
> return false;

if(false == bIgnoreRezXP)
{
if(0 != rezzexp) return false;
}
849c848
< if (this->IsEmpty()) {
---
> if (this->IsEmpty(true)) {



Index: PlayerCorpse.h
================================================== =================
RCS file: /cvsroot/eqemu/NightDumps/NightDumps/Source/zone/PlayerCorpse.h,v
retrieving revision 1.1.1.1
diff -w -r1.1.1.1 PlayerCorpse.h
59c59
< bool IsEmpty();
---
> bool IsEmpty(bool bIgnoreRexXP = false);