Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a value preventing attacking of agents #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sm_profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function sm_profile:UpdateContext()
-- Check if we (still) have an active target to attack and update that. Make sure it is not our player.
local attacktargetvalid = false
if (self.temp.attack_targetid) then
self.temp.attack_target = CharacterList:Get(self.temp.attack_targetid) or GadgetList:Get(self.temp.attack_targetid) or AgentList:Get(self.targetid)
self.temp.attack_target = CharacterList:Get(self.temp.attack_targetid) or GadgetList:Get(self.temp.attack_targetid) or AgentList:Get(self.temp.attack_targetid)
if (self.temp.attack_target and (self.temp.attack_target_lastupdate and ml_global_information.Now - self.temp.attack_target_lastupdate < 1000) and not self.temp.attack_target.dead and (self.temp.attack_target.attackable or (self.temp.attack_target.isentity and self.temp.attack_target.attitude == GW2.ATTITUDE.Hostile and not self.temp.attack_target.isgadget and not self.temp.attack_target.ischaracter and not self.temp.attack_target.health))) then
self.temp.context.attack_target = setmetatable({}, {
__index = function(self, key)
Expand Down