mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
clang-format LoadZoneObjects
This commit is contained in:
parent
aaa116d97c
commit
89183cf8b7
@ -157,24 +157,23 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//this really loads the objects into entity_list
|
//this really loads the objects into entity_list
|
||||||
bool Zone::LoadZoneObjects() {
|
bool Zone::LoadZoneObjects()
|
||||||
|
{
|
||||||
std::string query = StringFormat("SELECT id, zoneid, xpos, ypos, zpos, heading, "
|
std::string query =
|
||||||
"itemid, charges, objectname, type, icon, unknown08, "
|
StringFormat("SELECT id, zoneid, xpos, ypos, zpos, heading, itemid, charges, objectname, type, icon, "
|
||||||
"unknown10, unknown20, unknown24, unknown76, size, tilt_x, "
|
"unknown08, unknown10, unknown20, unknown24, unknown76, size, tilt_x, tilt_y, display_name "
|
||||||
"tilt_y, display_name FROM object "
|
"FROM object WHERE zoneid = %i AND (version = %u OR version = -1)",
|
||||||
"WHERE zoneid = %i AND (version = %u OR version = -1)",
|
|
||||||
zoneid, instanceversion);
|
zoneid, instanceversion);
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = database.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Error Loading Objects from DB: %s",results.ErrorMessage().c_str());
|
Log.Out(Logs::General, Logs::Error, "Error Loading Objects from DB: %s",
|
||||||
|
results.ErrorMessage().c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Out(Logs::General, Logs::Status, "Loading Objects from DB...");
|
Log.Out(Logs::General, Logs::Status, "Loading Objects from DB...");
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
if (atoi(row[9]) == 0)
|
if (atoi(row[9]) == 0) {
|
||||||
{
|
|
||||||
// Type == 0 - Static Object
|
// Type == 0 - Static Object
|
||||||
const char *shortname = database.GetZoneName(atoi(row[1]), false); // zoneid -> zone_shortname
|
const char *shortname = database.GetZoneName(atoi(row[1]), false); // zoneid -> zone_shortname
|
||||||
|
|
||||||
@ -258,8 +257,7 @@ bool Zone::LoadZoneObjects() {
|
|||||||
if (itemid == 0) {
|
if (itemid == 0) {
|
||||||
// Generic tradeskill container
|
// Generic tradeskill container
|
||||||
inst = new ItemInst(ItemInstWorldContainer);
|
inst = new ItemInst(ItemInstWorldContainer);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Groundspawn object
|
// Groundspawn object
|
||||||
inst = database.CreateItem(itemid);
|
inst = database.CreateItem(itemid);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user