mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
UpdateCharacterCorpse converted to xyz_heading
This commit is contained in:
parent
4243ce8582
commit
275f2aa80f
@ -594,7 +594,7 @@ bool Corpse::Save() {
|
|||||||
}
|
}
|
||||||
/* Update Corpse Data */
|
/* Update Corpse Data */
|
||||||
else{
|
else{
|
||||||
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position.m_X, m_Position.m_Y, m_Position.m_Z, m_Position.m_Heading, IsRezzed());
|
corpse_db_id = database.UpdateCharacterCorpse(corpse_db_id, char_id, orgname, zone->GetZoneID(), zone->GetInstanceID(), dbpc, m_Position, IsRezzed());
|
||||||
}
|
}
|
||||||
|
|
||||||
safe_delete_array(dbpc);
|
safe_delete_array(dbpc);
|
||||||
|
|||||||
111
zone/zonedb.cpp
111
zone/zonedb.cpp
@ -3372,93 +3372,32 @@ uint32 ZoneDatabase::GetCharacterCorpseDecayTimer(uint32 corpse_db_id){
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::UpdateCharacterCorpse(uint32 db_id, uint32 char_id, const char* char_name, uint32 zone_id, uint16 instance_id, PlayerCorpse_Struct* dbpc, float x, float y, float z, float heading, bool is_rezzed) {
|
uint32 ZoneDatabase::UpdateCharacterCorpse(uint32 db_id, uint32 char_id, const char* char_name, uint32 zone_id, uint16 instance_id, PlayerCorpse_Struct* dbpc, const xyz_heading& position, bool is_rezzed) {
|
||||||
std::string query = StringFormat("UPDATE `character_corpses` SET \n"
|
std::string query = StringFormat("UPDATE `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"
|
"`is_locked` = %d, `exp` = %u, `size` = %f, `level` = %u, "
|
||||||
"`charid` = %d,\n"
|
"`race` = %u, `gender` = %u, `class` = %u, `deity` = %u, "
|
||||||
"`x` = %1.1f,\n"
|
"`texture` = %u, `helm_texture` = %u, `copper` = %u, "
|
||||||
"`y` = %1.1f,\n"
|
"`silver` = %u, `gold` = %u, `platinum` = %u, `hair_color` = %u, "
|
||||||
"`z` = %1.1f,\n"
|
"`beard_color` = %u, `eye_color_1` = %u, `eye_color_2` = %u, "
|
||||||
"`heading` = %1.1f,\n"
|
"`hair_style` = %u, `face` = %u, `beard` = %u, `drakkin_heritage` = %u, "
|
||||||
"`is_locked` = %d,\n"
|
"`drakkin_tattoo` = %u, `drakkin_details` = %u, `wc_1` = %u, "
|
||||||
"`exp` = %u,\n"
|
"`wc_2` = %u, `wc_3` = %u, `wc_4` = %u, `wc_5` = %u, `wc_6` = %u, "
|
||||||
"`size` = %f,\n"
|
"`wc_7` = %u, `wc_8` = %u, `wc_9` = %u "
|
||||||
"`level` = %u,\n"
|
|
||||||
"`race` = %u,\n"
|
|
||||||
"`gender` = %u,\n"
|
|
||||||
"`class` = %u,\n"
|
|
||||||
"`deity` = %u,\n"
|
|
||||||
"`texture` = %u,\n"
|
|
||||||
"`helm_texture` = %u,\n"
|
|
||||||
"`copper` = %u,\n"
|
|
||||||
"`silver` = %u,\n"
|
|
||||||
"`gold` = %u,\n"
|
|
||||||
"`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"
|
|
||||||
"WHERE `id` = %u",
|
"WHERE `id` = %u",
|
||||||
EscapeString(char_name).c_str(),
|
EscapeString(char_name).c_str(), zone_id, instance_id, char_id,
|
||||||
zone_id,
|
position.m_X, position.m_Y, position.m_Z, position.m_Heading,
|
||||||
instance_id,
|
dbpc->locked, dbpc->exp, dbpc->size, dbpc->level, dbpc->race,
|
||||||
char_id,
|
dbpc->gender, dbpc->class_, dbpc->deity, dbpc->texture,
|
||||||
x,
|
dbpc->helmtexture, dbpc->copper, dbpc->silver, dbpc->gold,
|
||||||
y,
|
dbpc->plat, dbpc->haircolor, dbpc->beardcolor, dbpc->eyecolor1,
|
||||||
z,
|
dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard,
|
||||||
heading,
|
dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details,
|
||||||
dbpc->locked,
|
dbpc->item_tint[0].color, dbpc->item_tint[1].color, dbpc->item_tint[2].color,
|
||||||
dbpc->exp,
|
dbpc->item_tint[3].color, dbpc->item_tint[4].color, dbpc->item_tint[5].color,
|
||||||
dbpc->size,
|
dbpc->item_tint[6].color, dbpc->item_tint[7].color, dbpc->item_tint[8].color,
|
||||||
dbpc->level,
|
db_id);
|
||||||
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,
|
|
||||||
db_id
|
|
||||||
);
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
return db_id;
|
return db_id;
|
||||||
|
|||||||
@ -314,7 +314,7 @@ public:
|
|||||||
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, const xyz_heading& position);
|
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, const xyz_heading& position, bool rezzed = false);
|
||||||
uint32 GetFirstCorpseID(uint32 char_id);
|
uint32 GetFirstCorpseID(uint32 char_id);
|
||||||
uint32 GetCharacterCorpseCount(uint32 char_id);
|
uint32 GetCharacterCorpseCount(uint32 char_id);
|
||||||
uint32 GetCharacterCorpseID(uint32 char_id, uint8 corpse);
|
uint32 GetCharacterCorpseID(uint32 char_id, uint8 corpse);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user