Decouple zone calls, cleanup logic

This commit is contained in:
Akkadius
2020-04-19 04:36:39 -05:00
parent ebda1cf601
commit 373fb3f0e7
57 changed files with 705 additions and 467 deletions
+4 -4
View File
@@ -790,7 +790,7 @@ void Client::CompleteConnect()
//enforce some rules..
if (!CanBeInZone()) {
LogDebug("[CLIENT] Kicking char from zone, not allowed here");
GoToSafeCoords(content_db.GetZoneID("arena"), 0);
GoToSafeCoords(ZoneID("arena"), 0);
return;
}
@@ -6419,7 +6419,7 @@ void Client::Handle_OP_GMZoneRequest(const EQApplicationPacket *app)
uint16 zid = gmzr->zone_id;
if (gmzr->zone_id == 0)
zid = zonesummon_id;
const char * zname = content_db.GetZoneName(zid);
const char * zname = ZoneName(zid);
if (zname == nullptr)
tarzone[0] = 0;
else
@@ -12441,7 +12441,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
{
// if the character has a start city, don't let them use the command
if (m_pp.binds[4].zoneId != 0 && m_pp.binds[4].zoneId != 189) {
Message(Chat::Yellow, "Your home city has already been set.", m_pp.binds[4].zoneId, content_db.GetZoneName(m_pp.binds[4].zoneId));
Message(Chat::Yellow, "Your home city has already been set.", m_pp.binds[4].zoneId, ZoneName(m_pp.binds[4].zoneId));
return;
}
@@ -12507,7 +12507,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
zoneid = atoi(row[0]);
char* name = nullptr;
content_db.GetZoneLongName(content_db.GetZoneName(zoneid), &name);
content_db.GetZoneLongName(ZoneName(zoneid), &name);
Message(Chat::Yellow, "%d - %s", zoneid, name);
}