mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-12 08:02:25 +00:00
SaveCharacterCorpse converted to xyz_heading
This commit is contained in:
parent
76210e1f0e
commit
4243ce8582
@ -590,7 +590,7 @@ bool Corpse::Save() {
|
|||||||
|
|
||||||
/* Create New Corpse*/
|
/* Create New Corpse*/
|
||||||
if (corpse_db_id == 0) {
|
if (corpse_db_id == 0) {
|
||||||
corpse_db_id = database.SaveCharacterCorpse(char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position.m_X, m_Position.m_Y, m_Position.m_Z, m_Position.m_Heading);
|
corpse_db_id = database.SaveCharacterCorpse(char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position);
|
||||||
}
|
}
|
||||||
/* Update Corpse Data */
|
/* Update Corpse Data */
|
||||||
else{
|
else{
|
||||||
|
|||||||
112
zone/zonedb.cpp
112
zone/zonedb.cpp
@ -3469,94 +3469,32 @@ void ZoneDatabase::MarkCorpseAsRezzed(uint32 db_id) {
|
|||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::SaveCharacterCorpse(uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, float x, float y, float z, float heading) {
|
uint32 ZoneDatabase::SaveCharacterCorpse(uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, const xyz_heading& position) {
|
||||||
/* Dump Basic Corpse Data */
|
/* Dump Basic Corpse Data */
|
||||||
std::string query = StringFormat("INSERT INTO `character_corpses` SET \n"
|
std::string query = StringFormat("INSERT INTO `character_corpses` "
|
||||||
"`charname` = '%s',\n"
|
"SET `charname` = '%s', `zone_id` = %u, `instance_id` = %u, `charid` = %d,"
|
||||||
"`zone_id` = %u,\n"
|
"`x` = %1.1f, `y` = %1.1f, `z` = %1.1f, `heading` = %1.1f,"
|
||||||
"`instance_id` = %u,\n"
|
"`time_of_death` = NOW(), `is_buried` = 0, `is_locked` = %d,"
|
||||||
"`charid` = %d,\n"
|
"`exp` = %u, `size` = %f, `level` = %u, `race` = %u, `gender` = %u,"
|
||||||
"`x` = %1.1f,\n"
|
"`class` = %u, `deity` = %u, `texture` = %u, `helm_texture` = %u,"
|
||||||
"`y` = %1.1f,\n"
|
"`copper` = %u, `silver` = %u,`gold` = %u,`platinum` = %u,"
|
||||||
"`z` = %1.1f,\n"
|
"`hair_color` = %u, `beard_color` = %u, `eye_color_1` = %u,"
|
||||||
"`heading` = %1.1f,\n"
|
"`eye_color_2` = %u, `hair_style` = %u, `face` = %u,"
|
||||||
"`time_of_death` = NOW(),\n"
|
"`beard` = %u, `drakkin_heritage` = %u, `drakkin_tattoo` = %u,"
|
||||||
"`is_buried` = 0,"
|
"`drakkin_details` = %u, `wc_1` = %u, `wc_2` = %u,"
|
||||||
"`is_locked` = %d,\n"
|
"`wc_3` = %u, `wc_4` = %u, `wc_5` = %u, `wc_6` = %u,"
|
||||||
"`exp` = %u,\n"
|
"`wc_7` = %u,`wc_8` = %u,`wc_9` = %u",
|
||||||
"`size` = %f,\n"
|
EscapeString(charname).c_str(), zoneid, instanceid, charid,
|
||||||
"`level` = %u,\n"
|
position.m_X, position.m_Y, position.m_Z, position.m_Heading,
|
||||||
"`race` = %u,\n"
|
dbpc->locked, dbpc->exp, dbpc->size, dbpc->level, dbpc->race,
|
||||||
"`gender` = %u,\n"
|
dbpc->gender, dbpc->class_, dbpc->deity, dbpc->texture,
|
||||||
"`class` = %u,\n"
|
dbpc->helmtexture, dbpc->copper, dbpc->silver, dbpc->gold,
|
||||||
"`deity` = %u,\n"
|
dbpc->plat, dbpc->haircolor, dbpc->beardcolor, dbpc->eyecolor1,
|
||||||
"`texture` = %u,\n"
|
dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard,
|
||||||
"`helm_texture` = %u,\n"
|
dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details,
|
||||||
"`copper` = %u,\n"
|
dbpc->item_tint[0].color, dbpc->item_tint[1].color, dbpc->item_tint[2].color,
|
||||||
"`silver` = %u,\n"
|
dbpc->item_tint[3].color, dbpc->item_tint[4].color, dbpc->item_tint[5].color,
|
||||||
"`gold` = %u,\n"
|
dbpc->item_tint[6].color, dbpc->item_tint[7].color, dbpc->item_tint[8].color);
|
||||||
"`platinum` = %u,\n"
|
|
||||||
"`hair_color` = %u,\n"
|
|
||||||
"`beard_color` = %u,\n"
|
|
||||||
"`eye_color_1` = %u,\n"
|
|
||||||
"`eye_color_2` = %u,\n"
|
|
||||||
"`hair_style` = %u,\n"
|
|
||||||
"`face` = %u,\n"
|
|
||||||
"`beard` = %u,\n"
|
|
||||||
"`drakkin_heritage` = %u,\n"
|
|
||||||
"`drakkin_tattoo` = %u,\n"
|
|
||||||
"`drakkin_details` = %u,\n"
|
|
||||||
"`wc_1` = %u,\n"
|
|
||||||
"`wc_2` = %u,\n"
|
|
||||||
"`wc_3` = %u,\n"
|
|
||||||
"`wc_4` = %u,\n"
|
|
||||||
"`wc_5` = %u,\n"
|
|
||||||
"`wc_6` = %u,\n"
|
|
||||||
"`wc_7` = %u,\n"
|
|
||||||
"`wc_8` = %u,\n"
|
|
||||||
"`wc_9` = %u \n",
|
|
||||||
EscapeString(charname).c_str(),
|
|
||||||
zoneid,
|
|
||||||
instanceid,
|
|
||||||
charid,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
z,
|
|
||||||
heading,
|
|
||||||
dbpc->locked,
|
|
||||||
dbpc->exp,
|
|
||||||
dbpc->size,
|
|
||||||
dbpc->level,
|
|
||||||
dbpc->race,
|
|
||||||
dbpc->gender,
|
|
||||||
dbpc->class_,
|
|
||||||
dbpc->deity,
|
|
||||||
dbpc->texture,
|
|
||||||
dbpc->helmtexture,
|
|
||||||
dbpc->copper,
|
|
||||||
dbpc->silver,
|
|
||||||
dbpc->gold,
|
|
||||||
dbpc->plat,
|
|
||||||
dbpc->haircolor,
|
|
||||||
dbpc->beardcolor,
|
|
||||||
dbpc->eyecolor1,
|
|
||||||
dbpc->eyecolor2,
|
|
||||||
dbpc->hairstyle,
|
|
||||||
dbpc->face,
|
|
||||||
dbpc->beard,
|
|
||||||
dbpc->drakkin_heritage,
|
|
||||||
dbpc->drakkin_tattoo,
|
|
||||||
dbpc->drakkin_details,
|
|
||||||
dbpc->item_tint[0].color,
|
|
||||||
dbpc->item_tint[1].color,
|
|
||||||
dbpc->item_tint[2].color,
|
|
||||||
dbpc->item_tint[3].color,
|
|
||||||
dbpc->item_tint[4].color,
|
|
||||||
dbpc->item_tint[5].color,
|
|
||||||
dbpc->item_tint[6].color,
|
|
||||||
dbpc->item_tint[7].color,
|
|
||||||
dbpc->item_tint[8].color
|
|
||||||
);
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
uint32 last_insert_id = results.LastInsertedID();
|
uint32 last_insert_id = results.LastInsertedID();
|
||||||
|
|
||||||
|
|||||||
@ -313,7 +313,7 @@ public:
|
|||||||
uint32 SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zoneid, uint16 instanceid, const xyz_heading& position);
|
uint32 SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zoneid, uint16 instanceid, const xyz_heading& position);
|
||||||
uint32 CreateGraveyardRecord(uint32 graveyard_zoneid, const xyz_heading& position);
|
uint32 CreateGraveyardRecord(uint32 graveyard_zoneid, const xyz_heading& position);
|
||||||
uint32 AddGraveyardIDToZone(uint32 zone_id, uint32 graveyard_id);
|
uint32 AddGraveyardIDToZone(uint32 zone_id, uint32 graveyard_id);
|
||||||
uint32 SaveCharacterCorpse(uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, float x, float y, float z, float heading);
|
uint32 SaveCharacterCorpse(uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, const xyz_heading& position);
|
||||||
uint32 UpdateCharacterCorpse(uint32 dbid, uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, float x, float y, float z, float heading, bool rezzed = false);
|
uint32 UpdateCharacterCorpse(uint32 dbid, uint32 charid, const char* charname, uint32 zoneid, uint16 instanceid, PlayerCorpse_Struct* dbpc, float x, float y, float z, float heading, bool rezzed = false);
|
||||||
uint32 GetFirstCorpseID(uint32 char_id);
|
uint32 GetFirstCorpseID(uint32 char_id);
|
||||||
uint32 GetCharacterCorpseCount(uint32 char_id);
|
uint32 GetCharacterCorpseCount(uint32 char_id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user