public static void UpdateDoubleCastDict(string spellName, GameObject unit) { if (unit == null) { return; } SpellData spellData; ActionManager.CurrentActions.TryGetValue(spellName, out spellData); if (spellData == null) { return; } DateTime expir = DateTime.UtcNow + spellData.AdjustedCastTime + TimeSpan.FromSeconds(3); string key = DoubleCastKey(unit.ObjectId, spellName); if (DoubleCastPreventionDict.ContainsKey(key)) { DoubleCastPreventionDict[key] = expir; } DoubleCastPreventionDict.Add(key, expir); }
private static void UpdateDoubleCastDict(string spellName) { if (DoubleCastPreventionDict.ContainsKey(spellName)) { DoubleCastPreventionDict[spellName] = DateTime.UtcNow; } DoubleCastPreventionDict.Add(spellName, DateTime.UtcNow); }