Table of Contents

Class JsonWeather

Namespace
Moongate.UO.Data.Json.Weather
Assembly
Moongate.UO.Data.dll

Represents a weather type configuration from JSON

public class JsonWeather
Inheritance
JsonWeather
Inherited Members

Properties

AverageTemperature

Gets the average temperature for this weather type

[JsonIgnore]
public double AverageTemperature { get; }

Property Value

double

ColdChance

public int ColdChance { get; set; }

Property Value

int

ColdIntensity

public int ColdIntensity { get; set; }

Property Value

int

Description

public string Description { get; set; }

Property Value

string

HasRain

Checks if this weather type supports rain

[JsonIgnore]
public bool HasRain { get; }

Property Value

bool

HasSnow

Checks if this weather type supports snow

[JsonIgnore]
public bool HasSnow { get; }

Property Value

bool

HasStorms

Checks if this weather type supports storms

[JsonIgnore]
public bool HasStorms { get; }

Property Value

bool

HeatChance

public int HeatChance { get; set; }

Property Value

int

HeatIntensity

public int HeatIntensity { get; set; }

Property Value

int

Id

public int Id { get; set; }

Property Value

int

IsColdClimate

Checks if this is a cold climate

[JsonIgnore]
public bool IsColdClimate { get; }

Property Value

bool

IsExtreme

Checks if this weather type has extreme conditions

[JsonIgnore]
public bool IsExtreme { get; }

Property Value

bool

IsHotClimate

Checks if this is a hot climate

[JsonIgnore]
public bool IsHotClimate { get; }

Property Value

bool

LightMax

public int? LightMax { get; set; }

Property Value

int?

LightMin

public int? LightMin { get; set; }

Property Value

int?

MaxTemp

public int MaxTemp { get; set; }

Property Value

int

MinTemp

public int MinTemp { get; set; }

Property Value

int

Name

public string Name { get; set; }

Property Value

string

RainChance

public int RainChance { get; set; }

Property Value

int

RainIntensity

public JsonIntensityRange RainIntensity { get; set; }

Property Value

JsonIntensityRange

RainTempDrop

public int RainTempDrop { get; set; }

Property Value

int

SnowChance

public int SnowChance { get; set; }

Property Value

int

SnowIntensity

public JsonIntensityRange SnowIntensity { get; set; }

Property Value

JsonIntensityRange

SnowThreshold

public int SnowThreshold { get; set; }

Property Value

int

StormChance

public int StormChance { get; set; }

Property Value

int

StormIntensity

public JsonIntensityRange StormIntensity { get; set; }

Property Value

JsonIntensityRange

StormTempDrop

public int StormTempDrop { get; set; }

Property Value

int

TemperatureRange

Gets the temperature range for this weather type

[JsonIgnore]
public int TemperatureRange { get; }

Property Value

int

Methods

DetermineJsonWeatherCondition(int, Random?)

Determines the current weather condition based on chances

public JsonWeatherCondition DetermineJsonWeatherCondition(int currentTemp, Random? random = null)

Parameters

currentTemp int

Current temperature

random Random

Random instance (optional)

Returns

JsonWeatherCondition

Current weather condition

GetDamageIntensity(JsonWeatherCondition, Random?)

Gets the damage intensity for the current weather condition

public int GetDamageIntensity(JsonWeatherCondition condition, Random? random = null)

Parameters

condition JsonWeatherCondition

Current weather condition

random Random

Random instance (optional)

Returns

int

Damage intensity value

GetTemperatureDrop(JsonWeatherCondition)

Gets the appropriate temperature drop for the current weather

public int GetTemperatureDrop(JsonWeatherCondition condition)

Parameters

condition JsonWeatherCondition

Current weather condition

Returns

int

Temperature drop amount

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.