Esempio n. 1
0
 static bool HasCooldown(UnitCombatState combatState)
 {
     if (Mod.Enabled && FixActionTypeOfSwappingWeapon)
     {
         return
             (combatState.HasCooldownForCommand(UnitCommand.CommandType.Standard) &&
              combatState.HasCooldownForCommand(UnitCommand.CommandType.Move));
     }
     else
     {
         return(combatState.HasCooldownForCommand(UnitCommand.CommandType.Standard));
     }
 }
 static bool Prefix(UnitCombatState __instance, UnitCommand command, ref bool __result)
 {
     if (IsInCombat() && __instance.Unit.IsInCombat)
     {
         __result = !command.IsIgnoreCooldown &&
                    (ShouldRestrictCommand(__instance.Unit, command) || __instance.HasCooldownForCommand(command.Type));
         return(false);
     }
     return(true);
 }
Esempio n. 3
0
 static void UpdateCooldown(UnitCombatState combatState)
 {
     if (Mod.Enabled && FixActionTypeOfSwappingWeapon)
     {
         if (combatState.HasCooldownForCommand(UnitCommand.CommandType.Move))
         {
             combatState.Cooldown.StandardAction = 6.0f;
         }
         else
         {
             combatState.Cooldown.MoveAction += 3.0f;
         }
     }
     else
     {
         combatState.Cooldown.StandardAction = 6.0f;
     }
 }