public static void Postfix(Agent __instance, SpawnedItemEntity spawnedItemEntity, EquipmentIndex weaponPickUpSlotIndex, bool removeWeapon) { try { AgentInitializeMissionEquipmentPatch.AgentOriginalWeaponSpeed[__instance][(int)weaponPickUpSlotIndex] = new Tuple <int, int>(spawnedItemEntity.WeaponCopy.PrimaryItem.PrimaryWeapon.SwingSpeed, spawnedItemEntity.WeaponCopy.PrimaryItem.PrimaryWeapon.ThrustSpeed); MissionOnTickPatch.ChangeWeaponSpeedsHandler(__instance, MissionSpawnAgentPatch.GetCurrentStaminaRatio(__instance)); } catch (KeyNotFoundException) { #if DEBUG InformationManager.DisplayMessage(new InformationMessage("Caught KeyNotFoundException in AgentOnItemPickupPatch!", new Color(1.00f, 0.38f, 0.01f), "Debug")); #endif } }
public static void Postfix(BattleAgentLogic __instance, Agent affectedAgent, Agent affectorAgent, AgentState agentState, KillingBlow killingBlow) { if (affectedAgent != MissionSpawnAgentPatch.heroAgent) { AgentInitializeMissionEquipmentPatch.AgentOriginalWeaponSpeed.Remove(affectedAgent); MissionOnTickPatch.AgentRecoveryTimers.Remove(affectedAgent); MissionSpawnAgentPatch.CurrentStaminaPerAgent.Remove(affectedAgent); MissionSpawnAgentPatch.MaxStaminaPerAgent.Remove(affectedAgent); } else { // need to reset weapons' speeds on agent death MissionOnTickPatch.ChangeWeaponSpeedsHandler(affectedAgent, 1.0, false); } }
public static void Postfix(TournamentRound __instance) { MissionOnTickPatch.Cleanup(); }
public static void Postfix(ArenaPracticeFightMissionController __instance) { MissionOnTickPatch.Cleanup(); }
public static void Postfix(Mission __instance) { MissionOnTickPatch.Cleanup(); }