static async void Refresh() { if (Client.Characters.CurrentPlayerCharacter is null) { return; } var rates = await Instance.CallServer( _ => _.ServerRemote_RequestTechRates()); TechConstants.ClientSetLearningPointsGainMultiplier(rates.LearningPointsGainMultiplier); TechConstants.ClientSetPvpTechTimeGame(rates.TimeGameTier3Basic, rates.TimeGameTier3Specialized, rates.TimeGameTier4Basic, rates.TimeGameTier4Specialized, rates.TimeGameTier5Basic, rates.TimeGameTier5Specialized); }
public override void ClientInitialize() { Client.Characters.CurrentPlayerCharacterChanged += Refresh; Refresh(); async void Refresh() { if (Api.Client.Characters.CurrentPlayerCharacter == null) { return; } var rate = await Instance.CallServer( _ => _.ServerRemote_RequestLearningPointsGainMultiplierRate()); TechConstants.ClientSetLearningPointsGainMultiplier(rate); } }