Add alternative CreateExpedition api

This allows expedition creation to be passed via Lua tables

This also allows for compass, safereturn, and/or zone in location data
of dynamic zones to be set on expedition creation from lua api

Usage example:
  local instance_info = {
    "anguish", 0, 21600,
    compass = { 300, 1353.15, 1712.19, 109.001 },
    safereturn = { 300, 1349.13, 1715.00, 123.81, 0 },
    zonein = { -9, -2466, -79, 0 }
  }
  local expedition_info = { "Anguish, the Fallen Palace", 6, 54, true }
  local dz = e.other:CreateExpedition(instance_info, expedition_info)
This commit is contained in:
hg
2020-05-16 10:44:12 -04:00
parent a1b5b210dd
commit cc0c5afd00
4 changed files with 80 additions and 0 deletions
+5
View File
@@ -9584,6 +9584,11 @@ void Client::UpdateExpeditionInfoAndLockouts()
LoadAllExpeditionLockouts();
}
Expedition* Client::CreateExpedition(DynamicZone& dz_instance, ExpeditionRequest& request)
{
return Expedition::TryCreate(this, dz_instance, request);
}
Expedition* Client::CreateExpedition(
std::string zone_name, uint32 version, uint32 duration, std::string expedition_name,
uint32 min_players, uint32 max_players, bool has_replay_timer, bool disable_messages)