Resurrection - Fix for RoF + fixed a couple of memory leaks.

This commit is contained in:
Derision
2013-03-15 19:37:29 +00:00
parent a14fecaf78
commit 810fdf3cca
6 changed files with 63 additions and 19 deletions
+1 -1
View File
@@ -1578,9 +1578,9 @@ uint32 ZoneDatabase::UpdatePlayerCorpse(uint32 dbid, uint32 charid, const char*
}
if(rezzed){
if (!RunQuery(query, MakeAnyLenString(&query, "update player_corpses set rezzed = 1 WHERE id=%d",dbid), errbuf)) {
safe_delete_array(query);
cerr << "Error in UpdatePlayerCorpse/Rezzed query: " << errbuf << endl;
}
safe_delete_array(query);
}
return dbid;
}
+3 -4
View File
@@ -4768,10 +4768,8 @@ void Client::Handle_OP_InstillDoubt(const EQApplicationPacket *app)
void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
{
if (app->size != sizeof(Resurrect_Struct)) {
LogFile->write(EQEMuLog::Error, "Wrong size: OP_RezzAnswer, size=%i, expected %i", app->size, sizeof(Resurrect_Struct));
return;
}
VERIFY_PACKET_LENGTH(OP_RezzAnswer, app, Resurrect_Struct);
const Resurrect_Struct* ra = (const Resurrect_Struct*) app->pBuffer;
_log(SPELLS__REZ, "Received OP_RezzAnswer from client. Pendingrezzexp is %i, action is %s",
@@ -4788,6 +4786,7 @@ void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
// the rezzed corpse is in to mark the corpse as rezzed.
outapp->SetOpcode(OP_RezzComplete);
worldserver.RezzPlayer(outapp, 0, 0, OP_RezzComplete);
safe_delete(outapp);
}
return;
}