Пример #1
0
 public static bool SpellUsage_HasSpellBeenUsed(GameEntityGUID encounterGUID, int empireIndex, StaticString spellUsed)
 {
     if (!ELCPUtilities.UseELCPSymbiosisBuffs)
     {
         return(false);
     }
     ELCPUtilities.SpellUsageTracker spellUsageTracker = ELCPUtilities.spellUsageTracker.Find((ELCPUtilities.SpellUsageTracker s) => s.EncounterGUID == encounterGUID && s.EmpireIndex == empireIndex);
     return(spellUsageTracker != null && spellUsageTracker.HasSpellBeenUsed(spellUsed));
 }
Пример #2
0
 public static void SpellUsage_Register(GameEntityGUID encounterGUID, int empireIndex, StaticString spellUsed)
 {
     if (!ELCPUtilities.UseELCPSymbiosisBuffs)
     {
         return;
     }
     ELCPUtilities.SpellUsageTracker spellUsageTracker = ELCPUtilities.spellUsageTracker.Find((ELCPUtilities.SpellUsageTracker s) => s.EncounterGUID == encounterGUID && s.EmpireIndex == empireIndex);
     if (spellUsageTracker == null)
     {
         ELCPUtilities.spellUsageTracker.Add(new ELCPUtilities.SpellUsageTracker(encounterGUID, empireIndex, spellUsed));
         return;
     }
     spellUsageTracker.AddSpellUsage(spellUsed);
 }