Implemented disjointed zone based time, this can be triggered via quest methods

Added parameter to LUA and Perl method settime(hour, minute, [update_world = true])
	- If update_world is false, the zone will then unsubscribe itself from regular worldserver time synchronizations
Added DB ver 9082 with update to add npc_types texture columns if table does not currently have them
This commit is contained in:
Akkadius
2015-05-25 23:48:11 -05:00
parent b06e1c2041
commit ee136881c8
17 changed files with 128 additions and 65 deletions
+5 -5
View File
@@ -624,7 +624,7 @@ void SpawnConditionManager::Process() {
//get our current time
TimeOfDay_Struct tod;
zone->zone_time.getEQTimeOfDay(&tod);
zone->zone_time.GetCurrentEQTimeOfDay(&tod);
//see if time is past our nearest event.
if(EQTime::IsTimeBefore(&next_event, &tod))
@@ -673,7 +673,7 @@ void SpawnConditionManager::ExecEvent(SpawnEvent &event, bool send_update) {
}
TimeOfDay_Struct tod;
zone->zone_time.getEQTimeOfDay(&tod);
zone->zone_time.GetCurrentEQTimeOfDay(&tod);
if(event.strict && (event.next.hour != tod.hour || event.next.day != tod.day || event.next.month != tod.month || event.next.year != tod.year))
{
Log.Out(Logs::Detail, Logs::Spawns, "Event %d: Unable to execute. Condition is strict, and event time has already passed.", event.id);
@@ -871,7 +871,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in
//better solution, and I just dont care thats much.
//get our current time
TimeOfDay_Struct tod;
zone->zone_time.getEQTimeOfDay(&tod);
zone->zone_time.GetCurrentEQTimeOfDay(&tod);
for(auto cur = spawn_events.begin(); cur != spawn_events.end(); ++cur) {
SpawnEvent &cevent = *cur;
@@ -1096,7 +1096,7 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
if(reset_base) {
Log.Out(Logs::Detail, Logs::Spawns, "Spawn event %d located in this zone. State set. Trigger time reset (period %d).", event_id, cevent.period);
//start with the time now
zone->zone_time.getEQTimeOfDay(&cevent.next);
zone->zone_time.GetCurrentEQTimeOfDay(&cevent.next);
//advance the next time by our period
EQTime::AddMinutes(cevent.period, &cevent.next);
} else {
@@ -1141,7 +1141,7 @@ void SpawnConditionManager::ToggleEvent(uint32 event_id, bool enabled, bool stri
if(reset_base) {
Log.Out(Logs::Detail, Logs::Spawns, "Spawn event %d is in zone %s. State set. Trigger time reset (period %d). Notifying world.", event_id, zone_short_name.c_str(), e.period);
//start with the time now
zone->zone_time.getEQTimeOfDay(&e.next);
zone->zone_time.GetCurrentEQTimeOfDay(&e.next);
//advance the next time by our period
EQTime::AddMinutes(e.period, &e.next);
} else {