Migrate getZoneX calls and npc types calls [skip ci]

This commit is contained in:
Akkadius
2020-03-12 02:27:09 -05:00
parent b22d8f6148
commit ca49f3902f
25 changed files with 181 additions and 181 deletions
+8 -8
View File
@@ -785,7 +785,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
if (tutorial_enabled) {
zone_id = RuleI(World, TutorialZoneID);
database.MoveCharacterToZone(charid, database.GetZoneName(zone_id));
database.MoveCharacterToZone(charid, content_db.GetZoneName(zone_id));
}
else {
LogInfo("[{}] is trying to go to tutorial but are not allowed", char_name);
@@ -796,7 +796,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
}
}
if (zone_id == 0 || !database.GetZoneName(zone_id)) {
if (zone_id == 0 || !content_db.GetZoneName(zone_id)) {
// This is to save people in an invalid zone, once it's removed from the DB
database.MoveCharacterToZone(charid, "arena");
LogInfo("Zone not found in database zone_id=[{}], moveing char to arena character:[{}]", zone_id, char_name);
@@ -1154,7 +1154,7 @@ void Client::EnterWorld(bool TryBootup) {
else
zone_server = zoneserver_list.FindByZoneID(zone_id);
const char *zone_name = database.GetZoneName(zone_id, true);
const char *zone_name = content_db.GetZoneName(zone_id, true);
if (zone_server) {
if (false == enter_world_triggered) {
//Drop any clients we own in other zones.
@@ -1267,7 +1267,7 @@ void Client::Clearance(int8 response)
return;
}
const char* zonename = database.GetZoneName(zone_id);
const char* zonename = content_db.GetZoneName(zone_id);
if (zonename == 0) {
LogInfo("zonename is nullptr in Client::Clearance!!");
TellClientZoneUnavailable();
@@ -1322,7 +1322,7 @@ void Client::Clearance(int8 response)
void Client::TellClientZoneUnavailable() {
auto outapp = new EQApplicationPacket(OP_ZoneUnavail, sizeof(ZoneUnavail_Struct));
ZoneUnavail_Struct* ua = (ZoneUnavail_Struct*)outapp->pBuffer;
const char* zonename = database.GetZoneName(zone_id);
const char* zonename = content_db.GetZoneName(zone_id);
if (zonename)
strcpy(ua->zonename, zonename);
QueuePacket(outapp);
@@ -1581,11 +1581,11 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
}
Log(Logs::Detail, Logs::WorldServer, "Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
content_db.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
Log(Logs::Detail, Logs::WorldServer, "Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
content_db.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
Log(Logs::Detail, Logs::WorldServer, "Home location: %s (%d) %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
content_db.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
/* Starting Items inventory */
content_db.SetStartingItems(&pp, &inv, pp.race, pp.class_, pp.deity, pp.zone_id, pp.name, GetAdmin());