// Constructor public TeleportablesManager(Account account, InteractivesManager interactives, MapGame map) { _account = account; _teleportable = Teleportables.NONE; _account.Network.RegisterMessage <ZaapListMessage>(HandleZaapListMessage); _account.Network.RegisterMessage <TeleportDestinationsListMessage>(HandleTeleportDestinationsListMessage); map.MapChanged += Map_MapChanged; interactives.UseFinished += Interactives_UseFinished; }
public bool UseZaapi(uint destinationMapId) { if (_account.IsBusy) { _account.Logger.LogWarning("TeleportablesManager", "Account is busy."); return(false); } if (_account.Game.Map.Zaapi == null) { _account.Logger.LogWarning("TeleportablesManager", LanguageManager.Translate("538")); return(false); } if (!_account.Game.Managers.Interactives.MoveToUseInteractive(_account.Game.Map.Zaapi.Element, _account.Game.Map.Zaapi.CellId, -1)) { return(false); } _teleportable = Teleportables.ZAAPI; _destinationMapId = destinationMapId; return(true); }
// Constructor public UseTeleportableAction(Teleportables type, uint destinationMapId) { Type = type; DestinationMapId = destinationMapId; }
public void Cancel() { _teleportable = Teleportables.NONE; _destinationMapId = 0; }