From 5c85c58184119d1efc628a6257315cb0b825bcda Mon Sep 17 00:00:00 2001 From: Alison <10372732+alisonrag@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:30:17 -0300 Subject: [PATCH] chore: move skill target time to ai_v temp now this key is deleted on map change --- src/AI/Attack.pm | 4 ++-- src/AI/CoreLogic.pm | 2 +- src/AI/SlaveAttack.pm | 2 +- src/Misc.pm | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AI/Attack.pm b/src/AI/Attack.pm index 11371fb152..4a672449c6 100644 --- a/src/AI/Attack.pm +++ b/src/AI/Attack.pm @@ -727,7 +727,7 @@ sub main { delete $args->{attackMethod}; $ai_v{"attackSkillSlot_${slot}_time"} = time; - $ai_v{"attackSkillSlot_${slot}_target_time"}{$ID} = time; + $ai_v{temp}{"attackSkillSlot_${slot}_target_time"}{$ID} = time; ai_setSuspend(0); my $skill = new Skill(auto => $config{"attackSkillSlot_$slot"}); @@ -759,7 +759,7 @@ sub main { delete $args->{attackMethod}; $ai_v{"attackComboSlot_${slot}_time"} = time; - $ai_v{"attackComboSlot_${slot}_target_time"}{$ID} = time; + $ai_v{temp}{"attackComboSlot_${slot}_target_time"}{$ID} = time; ai_skillUse2( $skill, diff --git a/src/AI/CoreLogic.pm b/src/AI/CoreLogic.pm index 07aa918fbb..3566a47cf8 100644 --- a/src/AI/CoreLogic.pm +++ b/src/AI/CoreLogic.pm @@ -3027,7 +3027,7 @@ sub processMonsterSkillUse { my $target = $config{"${prefix}_isSelfSkill"} ? $char : $monster; ai_skillUse2($skill, $lvl, $maxCastTime, $minCastTime, $target, $prefix); $ai_v{$prefix . "_time"} = time; - $ai_v{$prefix . "_target_time"}{$monsterID} = time; + $ai_v{temp}{$prefix . "_target_time"}{$monsterID} = time; last; } } diff --git a/src/AI/SlaveAttack.pm b/src/AI/SlaveAttack.pm index bab2176b5f..6636062811 100644 --- a/src/AI/SlaveAttack.pm +++ b/src/AI/SlaveAttack.pm @@ -687,7 +687,7 @@ sub main { delete $args->{attackMethod}; $ai_v{"attackSkillSlot_${slot}_time"} = time; - $ai_v{"attackSkillSlot_${slot}_target_time"}{$ID} = time; + $ai_v{temp}{"attackSkillSlot_${slot}_target_time"}{$ID} = time; ai_setSuspend(0); my $skill = new Skill(auto => $config{"attackSkillSlot_$slot"}); diff --git a/src/Misc.pm b/src/Misc.pm index 7b7256cd22..f465a22102 100644 --- a/src/Misc.pm +++ b/src/Misc.pm @@ -3072,7 +3072,7 @@ sub setPartySkillTimer { # set partySkill target_time my $i = $targetTimeout{$targetID}{$handle}; $ai_v{"partySkill_${i}_time"} = time if $i ne ""; - $ai_v{"partySkill_${i}_target_time"}{$targetID} = time if $i ne ""; + $ai_v{temp}{"partySkill_${i}_target_time"}{$targetID} = time if $i ne ""; } ##