Exemplo n.º 1
0
        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
            }
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 public static void Postfix(TournamentRound __instance)
 {
     MissionOnTickPatch.Cleanup();
 }
Exemplo n.º 4
0
 public static void Postfix(ArenaPracticeFightMissionController __instance)
 {
     MissionOnTickPatch.Cleanup();
 }
Exemplo n.º 5
0
 public static void Postfix(Mission __instance)
 {
     MissionOnTickPatch.Cleanup();
 }