GridStatusHostileUnit

Status indicator that shows if a unit is hostile (probably mindcontrolled)

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of Julith Julith Wed, 21 Jan 2009 09:59:32

    If "UnitIsEnemy()" still returns true for an enemy currently under mindcontrol I can add your fix.

  • Avatar of saiket saiket Wed, 21 Jan 2009 00:20:39

    Was it your intention to have friendly mind-controlled units show up as hostile even though they are not attackable? I understand that you use UnitIsCharmed for performance reasons, but having priests' mind controlled NPCs show up as hostile is confusing. Would it be possible to swap the original hostile check,

    local hostile = UnitIsCharmed(unitid)
    

    ...with this one that additionally checks hostility only if the unit is actually charmed?

    local hostile = UnitIsCharmed(unitid) and UnitIsEnemy(unitid, "player")
    


    The additional UnitIsEnemy call hardly affects performance in this case, because 99% of the time it won't be called.

  • 2 comments

Facts

Date created
28 Sep 2008
Category
Last update
08 Jan 2010
Development stage
Release
Language
  • enUS
License
All Rights Reserved
Curse link
GridStatusHostileUnit
Recent files
  • A: r49 for 3.3.0 on 08 Jan 2010
  • A: r48 for 3.3.0 on 09 Dec 2009
  • R: v0.71 for 3.1.0 on 31 May 2009
  • A: r46 for 3.1.0 on 31 May 2009
  • A: r45 for 3.0.3 on 15 Jan 2009

Authors