mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-11 21:22:31 +00:00
Resurrection - Fix for RoF + fixed a couple of memory leaks.
This commit is contained in:
parent
a14fecaf78
commit
810fdf3cca
@ -1,5 +1,8 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 03/15/2013 ==
|
||||||
|
Derision: RoF: Added ENCODE for Resurrect_struct (Accepting a rez should now work).
|
||||||
|
Derision: Fixed a couple of memory leaks in Rez code.
|
||||||
|
|
||||||
== 03/14/2013 ==
|
== 03/14/2013 ==
|
||||||
JJ: (NatedogEZ) Fix for hate list random never selecting last member of hate list.
|
JJ: (NatedogEZ) Fix for hate list random never selecting last member of hate list.
|
||||||
|
|||||||
@ -3987,6 +3987,24 @@ ENCODE(OP_BeginCast)
|
|||||||
FINISH_ENCODE();
|
FINISH_ENCODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ENCODE(OP_RezzRequest)
|
||||||
|
{
|
||||||
|
SETUP_DIRECT_ENCODE(Resurrect_Struct, structs::Resurrect_Struct);
|
||||||
|
|
||||||
|
OUT(zone_id);
|
||||||
|
OUT(instance_id);
|
||||||
|
OUT(y);
|
||||||
|
OUT(x);
|
||||||
|
OUT(z);
|
||||||
|
OUT_str(your_name);
|
||||||
|
OUT_str(rezzer_name);
|
||||||
|
OUT(spellid);
|
||||||
|
OUT_str(corpse_name);
|
||||||
|
OUT(action);
|
||||||
|
|
||||||
|
FINISH_ENCODE();
|
||||||
|
}
|
||||||
|
|
||||||
DECODE(OP_BuffRemoveRequest)
|
DECODE(OP_BuffRemoveRequest)
|
||||||
{
|
{
|
||||||
// This is to cater for the fact that short buff box buffs start at 30 as opposed to 25 in prior clients.
|
// This is to cater for the fact that short buff box buffs start at 30 as opposed to 25 in prior clients.
|
||||||
@ -4777,6 +4795,25 @@ DECODE(OP_GuildStatus)
|
|||||||
FINISH_DIRECT_DECODE();
|
FINISH_DIRECT_DECODE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODE(OP_RezzAnswer)
|
||||||
|
{
|
||||||
|
DECODE_LENGTH_EXACT(structs::Resurrect_Struct);
|
||||||
|
SETUP_DIRECT_DECODE(Resurrect_Struct, structs::Resurrect_Struct);
|
||||||
|
|
||||||
|
IN(zone_id);
|
||||||
|
IN(instance_id);
|
||||||
|
IN(y);
|
||||||
|
IN(x);
|
||||||
|
IN(z);
|
||||||
|
memcpy(emu->your_name, eq->your_name, sizeof(emu->your_name));
|
||||||
|
memcpy(emu->rezzer_name, eq->rezzer_name, sizeof(emu->rezzer_name));
|
||||||
|
IN(spellid);
|
||||||
|
memcpy(emu->corpse_name, eq->corpse_name, sizeof(emu->corpse_name));
|
||||||
|
IN(action);
|
||||||
|
|
||||||
|
FINISH_DIRECT_DECODE();
|
||||||
|
}
|
||||||
|
|
||||||
uint32 NextItemInstSerialNumber = 1;
|
uint32 NextItemInstSerialNumber = 1;
|
||||||
uint32 MaxInstances = 2000000000;
|
uint32 MaxInstances = 2000000000;
|
||||||
|
|
||||||
|
|||||||
@ -100,6 +100,7 @@ E(OP_MercenaryDataResponse)
|
|||||||
E(OP_GuildMemberUpdate)
|
E(OP_GuildMemberUpdate)
|
||||||
E(OP_GMLastName)
|
E(OP_GMLastName)
|
||||||
E(OP_BeginCast)
|
E(OP_BeginCast)
|
||||||
|
E(OP_RezzRequest)
|
||||||
//list of packets we need to decode on the way in:
|
//list of packets we need to decode on the way in:
|
||||||
D(OP_SetServerFilter)
|
D(OP_SetServerFilter)
|
||||||
D(OP_CharacterCreate)
|
D(OP_CharacterCreate)
|
||||||
@ -156,5 +157,6 @@ D(OP_GuildRemove)
|
|||||||
D(OP_GuildStatus)
|
D(OP_GuildStatus)
|
||||||
D(OP_Trader)
|
D(OP_Trader)
|
||||||
D(OP_GMLastName)
|
D(OP_GMLastName)
|
||||||
|
D(OP_RezzAnswer)
|
||||||
#undef E
|
#undef E
|
||||||
#undef D
|
#undef D
|
||||||
|
|||||||
@ -2792,20 +2792,23 @@ struct Underworld_Struct {
|
|||||||
float z;
|
float z;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Resurrect_Struct {
|
struct Resurrect_Struct
|
||||||
uint32 unknown00;
|
{
|
||||||
uint16 zone_id;
|
/*000*/ uint32 unknown000;
|
||||||
uint16 instance_id;
|
/*004*/ uint16 zone_id;
|
||||||
float y;
|
/*006*/ uint16 instance_id;
|
||||||
float x;
|
/*008*/ float y;
|
||||||
float z;
|
/*012*/ float x;
|
||||||
char your_name[64];
|
/*016*/ float z;
|
||||||
uint32 unknown88;
|
/*020*/ uint32 unknown020;
|
||||||
char rezzer_name[64];
|
/*024*/ char your_name[64];
|
||||||
uint32 spellid;
|
/*088*/ uint32 unknown088;
|
||||||
char corpse_name[64];
|
/*092*/ char rezzer_name[64];
|
||||||
uint32 action;
|
/*156*/ uint32 spellid;
|
||||||
/* 228 */
|
/*160*/ char corpse_name[64];
|
||||||
|
/*224*/ uint32 action;
|
||||||
|
/*228*/ uint32 unknown228;
|
||||||
|
/*232*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SetRunMode_Struct {
|
struct SetRunMode_Struct {
|
||||||
|
|||||||
@ -1578,9 +1578,9 @@ uint32 ZoneDatabase::UpdatePlayerCorpse(uint32 dbid, uint32 charid, const char*
|
|||||||
}
|
}
|
||||||
if(rezzed){
|
if(rezzed){
|
||||||
if (!RunQuery(query, MakeAnyLenString(&query, "update player_corpses set rezzed = 1 WHERE id=%d",dbid), errbuf)) {
|
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;
|
cerr << "Error in UpdatePlayerCorpse/Rezzed query: " << errbuf << endl;
|
||||||
}
|
}
|
||||||
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
return dbid;
|
return dbid;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4768,10 +4768,8 @@ void Client::Handle_OP_InstillDoubt(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
|
void Client::Handle_OP_RezzAnswer(const EQApplicationPacket *app)
|
||||||
{
|
{
|
||||||
if (app->size != sizeof(Resurrect_Struct)) {
|
VERIFY_PACKET_LENGTH(OP_RezzAnswer, app, Resurrect_Struct);
|
||||||
LogFile->write(EQEMuLog::Error, "Wrong size: OP_RezzAnswer, size=%i, expected %i", app->size, sizeof(Resurrect_Struct));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const Resurrect_Struct* ra = (const Resurrect_Struct*) app->pBuffer;
|
const Resurrect_Struct* ra = (const Resurrect_Struct*) app->pBuffer;
|
||||||
|
|
||||||
_log(SPELLS__REZ, "Received OP_RezzAnswer from client. Pendingrezzexp is %i, action is %s",
|
_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.
|
// the rezzed corpse is in to mark the corpse as rezzed.
|
||||||
outapp->SetOpcode(OP_RezzComplete);
|
outapp->SetOpcode(OP_RezzComplete);
|
||||||
worldserver.RezzPlayer(outapp, 0, 0, OP_RezzComplete);
|
worldserver.RezzPlayer(outapp, 0, 0, OP_RezzComplete);
|
||||||
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user