# Agent Of Player For Unit

Grammar — Agent of player player for unit
FlagsNative | Function

Returns the unit that is currently assigned as the specified player’s purchasing agent for the specified shop unit.

# Arguments

  • unit — Unit
  • int — Player

Returns — unit

native unit UnitAgent(unit inUnit, int inPlayer);

Category: Unit / Basic

# Examples

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:762

        }

        if (!((UnitAgent(lv_sHOP, UnitGetOwner(lv_uNIT)) != lv_sHOP))) {
            return false;
        }