public void SetLadder(int ladderId, bool isVisible, bool animationEffect, byte animationDelay) { Field.State.TriggerLadders[ladderId].IsVisible = isVisible; Field.State.TriggerLadders[ladderId].AnimationEffect = animationEffect; Field.State.TriggerLadders[ladderId].AnimationDelay = animationDelay; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerLadders[ladderId])); }
public void SetCube(int[] triggerIds, bool isVisible, byte randomCount) { foreach (int triggerId in triggerIds) { Field.State.TriggerCubes[triggerId].IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerCubes[triggerId])); } }
public void SetMesh(int[] meshIds, bool isVisible, int arg3, int arg4, float arg5) { foreach (int triggerMeshId in meshIds) { Field.State.TriggerMeshes[triggerMeshId].IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerMeshes[triggerMeshId])); } }
public void SetEffect(int[] triggerIds, bool isVisible, int arg3, byte arg4) { foreach (int triggerId in triggerIds) { Field.State.TriggerEffects[triggerId].IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerEffects[triggerId])); } }
public void SetMesh(int[] meshIds, bool isVisible, int arg3, int arg4, float arg5) { foreach (int triggerMeshId in meshIds) { if (Field.State.TriggerMeshes.TryGetValue(triggerMeshId, out TriggerMesh triggerMesh)) { triggerMesh.IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(triggerMesh)); } } }
public void SetEffect(int[] triggerIds, bool isVisible, int arg3, byte arg4) { foreach (int triggerId in triggerIds) { if (Field.State.TriggerEffects.TryGetValue(triggerId, out TriggerEffect triggerEffect)) { triggerEffect.IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(triggerEffect)); } } }
public void SetActor(int actorId, bool isVisible, string stateName, bool arg4, bool arg5) { if (!Field.State.TriggerActors.TryGetValue(actorId, out TriggerActor stateTriggerActor)) { Logger.Warning("SetActor: Actor not found: {0}", actorId); return; } stateTriggerActor.IsVisible = isVisible; stateTriggerActor.StateName = stateName; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(stateTriggerActor)); }
public void SetLadder(int ladderId, bool isVisible, bool animationEffect, byte animationDelay) { if (!Field.State.TriggerLadders.TryGetValue(ladderId, out TriggerLadder ladder)) { return; } ladder.IsVisible = isVisible; ladder.AnimationEffect = animationEffect; ladder.AnimationDelay = animationDelay; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(ladder)); }
public void SetRandomMesh(int[] meshIds, bool isVisible, byte meshCount, int arg4, int delayTime) { Random random = RandomProvider.Get(); int[] pickedMeshIds = meshIds.OrderBy(x => random.Next()).Take(meshCount).ToArray(); Task.Run(async() => { foreach (int triggerMeshId in pickedMeshIds) { Field.State.TriggerMeshes[triggerMeshId].IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerMeshes[triggerMeshId])); await Task.Delay(delayTime); } }); }
public void SetMesh(int[] meshIds, bool isVisible, int arg3, int delay, float arg5) { Task.Run(async() => { foreach (int triggerMeshId in meshIds) { if (!Field.State.TriggerMeshes.TryGetValue(triggerMeshId, out TriggerMesh triggerMesh)) { continue; } triggerMesh.IsVisible = isVisible; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(triggerMesh)); await Task.Delay(delay); } }); }
public void SetEffect(int[] triggerIds, bool isVisible, int arg3, byte arg4) { foreach (int triggerId in triggerIds) { if (!Field.State.TriggerEffects.TryGetValue(triggerId, out TriggerEffect triggerEffect)) { continue; } bool oldValue = triggerEffect.IsVisible; triggerEffect.IsVisible = isVisible; if (oldValue != isVisible) // If the value changed, broadcast the packet. { Field.BroadcastPacket(TriggerPacket.UpdateTrigger(triggerEffect)); } } }
public void SetActor(int actorId, bool isVisible, string stateName, bool arg4, bool arg5) { Field.State.TriggerActors[actorId].IsVisible = isVisible; Field.State.TriggerActors[actorId].StateName = stateName; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerActors[actorId])); }
public void SetSound(int soundId, bool isEnabled) { Field.State.TriggerSounds[soundId].IsEnabled = isEnabled; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerSounds[soundId])); }
public void CameraSelect(int cameraId, bool enable) { Field.State.TriggerCameras[cameraId].IsEnabled = enable; Field.BroadcastPacket(TriggerPacket.UpdateTrigger(Field.State.TriggerCameras[cameraId])); }