mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
CreateGraveyardRecord converted to xyz_heading
This commit is contained in:
parent
d22f136eea
commit
76210e1f0e
@ -8459,7 +8459,7 @@ void command_setgraveyard(Client *c, const Seperator *sep)
|
||||
zoneid = database.GetZoneID(sep->arg[1]);
|
||||
|
||||
if(zoneid > 0) {
|
||||
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetX(), t->GetY(), t->GetZ(), t->GetHeading());
|
||||
graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition());
|
||||
|
||||
if(graveyard_id > 0) {
|
||||
c->Message(0, "Successfuly added a new record for this graveyard!");
|
||||
|
||||
@ -3341,15 +3341,14 @@ uint32 ZoneDatabase::AddGraveyardIDToZone(uint32 zone_id, uint32 graveyard_id) {
|
||||
return zone_id;
|
||||
}
|
||||
|
||||
uint32 ZoneDatabase::CreateGraveyardRecord(uint32 graveyard_zone_id, float graveyard_x, float graveyard_y, float graveyard_z, float graveyard_heading) {
|
||||
std::string query = StringFormat(
|
||||
"INSERT INTO `graveyard` SET `zone_id` = %u, `x` = %1.1f, `y` = %1.1f, `z` = %1.1f, `heading` = %1.1f",
|
||||
graveyard_zone_id, graveyard_x, graveyard_y, graveyard_z, graveyard_heading
|
||||
);
|
||||
uint32 ZoneDatabase::CreateGraveyardRecord(uint32 graveyard_zone_id, const xyz_heading& position) {
|
||||
std::string query = StringFormat("INSERT INTO `graveyard` "
|
||||
"SET `zone_id` = %u, `x` = %1.1f, `y` = %1.1f, `z` = %1.1f, `heading` = %1.1f",
|
||||
graveyard_zone_id, position.m_X, position.m_Y, position.m_Z, position.m_Heading);
|
||||
auto results = QueryDatabase(query);
|
||||
if (results.Success()){
|
||||
if (results.Success())
|
||||
return results.LastInsertedID();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
uint32 ZoneDatabase::SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zone_id, uint16 instance_id, const xyz_heading& position) {
|
||||
|
||||
@ -311,7 +311,7 @@ public:
|
||||
uint32 GetCharacterCorpseDecayTimer(uint32 corpse_db_id);
|
||||
uint32 GetCharacterBuriedCorpseCount(uint32 char_id);
|
||||
uint32 SendCharacterCorpseToGraveyard(uint32 dbid, uint32 zoneid, uint16 instanceid, const xyz_heading& position);
|
||||
uint32 CreateGraveyardRecord(uint32 graveyard_zoneid, float graveyard_x, float graveyard_y, float graveyard_z, float graveyard_heading);
|
||||
uint32 CreateGraveyardRecord(uint32 graveyard_zoneid, const xyz_heading& position);
|
||||
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 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user