mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Add client->SendToGuildHall - have instances properly cycle out IDs
This commit is contained in:
+19
-5
@@ -140,7 +140,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
if(iInstanceID != 0)
|
||||
{
|
||||
auto pack = new ServerPacket(ServerOP_AdventureZoneData, sizeof(uint16));
|
||||
*((uint16*)pack->pBuffer) = iInstanceID;
|
||||
*((uint16*)pack->pBuffer) = iInstanceID;
|
||||
worldserver.SendPacket(pack);
|
||||
delete pack;
|
||||
}
|
||||
@@ -491,7 +491,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) {
|
||||
|
||||
void Zone::GetMerchantDataForZoneLoad() {
|
||||
LogInfo("Loading Merchant Lists");
|
||||
std::string query = StringFormat(
|
||||
std::string query = StringFormat(
|
||||
"SELECT "
|
||||
"DISTINCT ml.merchantid, "
|
||||
"ml.slot, "
|
||||
@@ -816,7 +816,7 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name)
|
||||
{
|
||||
LogDebug("Graveyard ID is [{}]", graveyard_id());
|
||||
bool GraveYardLoaded = database.GetZoneGraveyard(graveyard_id(), &pgraveyard_zoneid, &m_Graveyard.x, &m_Graveyard.y, &m_Graveyard.z, &m_Graveyard.w);
|
||||
|
||||
|
||||
if (GraveYardLoaded) {
|
||||
LogDebug("Loaded a graveyard for zone [{}]: graveyard zoneid is [{}] at [{}]", short_name, graveyard_zoneid(), to_string(m_Graveyard).c_str());
|
||||
}
|
||||
@@ -907,7 +907,7 @@ Zone::~Zone() {
|
||||
//Modified for timezones.
|
||||
bool Zone::Init(bool iStaticZone) {
|
||||
SetStaticZone(iStaticZone);
|
||||
|
||||
|
||||
//load the zone config file.
|
||||
if (!LoadZoneCFG(zone->GetShortName(), zone->GetInstanceVersion())) // try loading the zone name...
|
||||
LoadZoneCFG(zone->GetFileName(), zone->GetInstanceVersion()); // if that fails, try the file name, then load defaults
|
||||
@@ -1018,6 +1018,10 @@ bool Zone::Init(bool iStaticZone) {
|
||||
petition_list.ClearPetitions();
|
||||
petition_list.ReadDatabase();
|
||||
|
||||
if (zone->GetInstanceID() > 0) {
|
||||
zone->SetInstanceTimeRemaining(database.GetTimeRemainingInstance(zone->GetInstanceID()));
|
||||
}
|
||||
|
||||
LogInfo("Loading timezone data");
|
||||
zone->zone_time.setEQTimeZone(database.GetZoneTZ(zoneid, GetInstanceVersion()));
|
||||
|
||||
@@ -1089,7 +1093,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id)
|
||||
if (instance_id != 0)
|
||||
{
|
||||
safe_delete_array(map_name);
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, can_combat, can_levitate,
|
||||
if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, can_combat, can_levitate,
|
||||
can_castoutdoor, is_city, is_hotzone, allow_mercs, max_movement_update_range, zone_type, default_ruleset, &map_name))
|
||||
{
|
||||
LogError("Error loading the Zone Config");
|
||||
@@ -2455,3 +2459,13 @@ void Zone::SetQuestHotReloadQueued(bool in_quest_hot_reload_queued)
|
||||
{
|
||||
quest_hot_reload_queued = in_quest_hot_reload_queued;
|
||||
}
|
||||
|
||||
uint32 Zone::GetInstanceTimeRemaining() const
|
||||
{
|
||||
return instance_time_remaining;
|
||||
}
|
||||
|
||||
void Zone::SetInstanceTimeRemaining(uint32 instance_time_remaining)
|
||||
{
|
||||
Zone::instance_time_remaining = instance_time_remaining;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user