コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Spell.cs プロジェクト: rhoninsk/novas-addons
        private static void UpdateDoubleCastDict(string spellName)
        {
            if (DoubleCastPreventionDict.ContainsKey(spellName))
            {
                DoubleCastPreventionDict[spellName] = DateTime.UtcNow;
            }

            DoubleCastPreventionDict.Add(spellName, DateTime.UtcNow);
        }