//TESH.scrollpos=34
//TESH.alwaysfold=0
function IndexUnit takes unit u returns nothing
local integer this = udg_UDexRecycle
//
// You can use the boolean UnitIndexerEnabled dynamically to protect some
// of your undesirable units from being indexed by this system.
//
// Example:
// Set UnitIndexerEnabled = False
// Unit - Create 1 Dummy for ...
// Set UnitIndexerEnabled = True
//
if udg_UnitIndexerEnabled then
//
// Generate a unique integer index for this unit
//
if this == 0 then
set this = udg_UDexGen
set udg_UDexGen = this + 1
else
set udg_UDexRecycle = udg_UDexNext[this]
endif
//
// Link index to unit, unit to index
//
set udg_UDexUnits[this] = u
call SetUnitUserData(u, this)
//
// Use a doubly-linked list to store all active indexes
//
set udg_UDexPrev[udg_UDexNext[0]] = this
set udg_UDexNext[this] = udg_UDexNext[0]
set udg_UDexNext[0] = this
endif
endfunction
function IndexNewUnit takes nothing returns boolean
call TriggerExecute(gg_trg_Unit_Indexer)
return false
endfunction
function IndexUnitsFilter takes nothing returns boolean
call IndexUnit(GetFilterUnit())
return false
endfunction
function IndexUnits takes nothing returns nothing
local integer i = 15
local region re = CreateRegion()
local rect r = GetWorldBounds()
loop
call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup, Player(i), Filter(function IndexUnitsFilter))
exitwhen 0 == i
set i = i - 1
endloop
call RegionAddRect(re, r)
call TriggerRegisterEnterRegion(CreateTrigger(), re, Filter(function IndexNewUnit))
call RemoveRect(r)
set re = null
set r = null
endfunction
Name | Type | is_array | initial_value |
AirNerfIncrement | integer | Yes | |
AirNerfSource | unit | Yes | |
ArtCastText | texttag | No | |
AutomaticResourceGain | integer | No | |
BlackSpiritUnit | unit | No | |
BodyChangeFirst | unit | No | |
BodyChangeInteger | integer | No | |
BodyChangeMiddlePoint | location | No | |
BodyChangePolarPoint | location | No | |
BodyChangeSecond | unit | No | |
BodyChangeUnit | unit | No | |
BodyChangeUser | unit | No | |
BodyChangeUserPlayer | player | No | |
BodyChangeUserPoint | location | No | |
BodyChangeVictim | unit | No | |
BodyChangeVictimPlayer | player | No | |
BodyChangeVictimPoint | location | No | |
ChatUnitNames | string | Yes | |
ClearUnit | unit | No | |
CometUnit | unit | No | |
ControlPoints | group | No | |
DamnationGroup | group | No | |
DamnationMaxHP | real | No | |
DespairGroup | group | No | |
DevourGroup | group | No | |
DevourPoint | location | No | |
DevourSoulVictim | unit | No | |
DragonPoint | location | No | |
DreamControlled | unit | Yes | |
DreamController | unit | Yes | |
DreamEffect | effect | Yes | |
DreamGroup | group | No | |
DreamPreviousOwner | player | Yes | |
FlamesPoint | location | No | |
FlamesPolarPoint | location | No | |
GiveAbilityAbility | abilcode | Yes | |
GiveAbilityEnteredString | string | No | |
GiveAbilityString | string | Yes | |
GiveUnitToCircles | unit | Yes | |
GiveUnitToRegions | rect | Yes | |
GlobalResourceIncome | integer | No | |
GoddessOfSouls | unit | No | |
GoddessOfSoulsSouls | group | No | |
GuldanSoulsHarvested | integer | No | |
HeroList | unit | Yes | |
IceStormPoint | location | No | |
IllidanFlames | group | No | |
ImmobilizedUnits | group | No | |
IncomePlayer | integer | No | |
IntervalforIncome | real | No | |
InvisibilityAuraGroup | group | No | |
InvisRadiantGroup | group | No | |
IsViewingDialog | boolean | Yes | |
ItemAbilityForInteger | integer | No | |
ItemAbilityGroup | group | No | |
ItemAbilityPoint | location | No | |
ItemAbilityPoint2 | location | No | |
ItemAbilityPolarPoint | location | No | |
ItemDropPoint | location | No | |
JackItem | item | No | |
LegendaryScrollSpellGroup | group | No | |
LegendaryScrollSpellInteger | integer | No | |
LegendaryScrollSpellPoint | location | No | |
LegendaryScrollSpellPolarPoint | location | No | |
LivingGardenGroup | group | No | |
LivingGardenPoint | location | No | |
LivingGardenRootsGroup | group | No | |
MapStartHasLocation | boolean | Yes | |
MapStartVisModifier | fogmodifier | Yes | |
MortalsForce | force | No | |
MortalWorldVisionModA | fogmodifier | Yes | |
MortalWorldVisionModB | fogmodifier | Yes | |
MortalWorldVisionModC | fogmodifier | Yes | |
NEStructures | group | No | |
NextRandomEvent | string | Yes | |
NextRandomEventLoc | unit | Yes | |
NightGraveyardGroup | group | No | |
NightGraveyardPoint | location | No | |
ObeliskGroup | group | No | |
ObliterationAuraGroup | group | No | |
PerkAngelicPlayers | force | No | |
PerkBarbaricPlayers | force | No | |
PerkLeadershipPlayers | force | No | |
PerkMechanistPlayers | force | No | |
PerkNecromancerPlayers | force | No | |
PerkNecromanticUnits | group | No | |
PerkOmniscientPlayers | force | No | |
PerkPrescientPlayers | force | No | |
PerpetuationAuraGroup | group | No | |
PillarsOfCreation | group | No | |
PlayerColourString | string | Yes | |
PlayerColourStringCodes | string | Yes | |
PlayerGoldIncomeBase | real | Yes | |
PlayerGoldIncomeMultiplier | real | Yes | |
PlayerSelection | group | Yes | |
PlayerStartLocation | location | Yes | |
PlayerWoodIncomeBase | real | Yes | |
PlayerWoodIncomeMultiplier | real | Yes | |
PlayerX | integer | Yes | |
Prescience_Point | location | No | |
PrivateRoomPoint | location | No | |
ProperAllianceInteger | integer | Yes | |
PureWaterPoint | location | No | |
RaceDialogBox | dialog | No | |
RaceDialogButton | button | Yes | |
RaceHuman | force | No | |
RaceNaga | force | No | |
RaceNightElf | force | No | |
RaceOrc | force | No | |
RaceUndead | force | No | |
RandomEvents | string | Yes | |
RandomEventTimeUntilNext | integer | No | |
RandomInsults | integer | No | |
RealNames | string | Yes | |
RescuableUnits | group | No | |
RockBlastForInteger | integer | No | |
RockBlastGroup | group | No | |
RockBlastPoint | location | No | |
RockBlastPolarPoint | location | No | |
RootsInteger | integer | No | |
RootUnit | unit | No | |
ScaryFog | weathereffect | No | |
ShadowstealUnit | unit | No | |
ShowdownPoint | location | No | |
SolidHibernationUnits | group | No | |
SoulPactDefenseEffect | effect | No | |
SoulPactGoddessOwner | player | No | |
SoulPactGoddessPoint | location | No | |
SoulPactPoint | location | No | |
SoulPactPolarPoint | location | No | |
SoulPactSwitch | boolean | No | |
SoulPactUser | unit | No | |
SoulPactVictim | unit | No | |
SoulPoint | location | No | |
SoulPoint2 | location | No | |
SpawnerCurrentTime | integer | Yes | |
SpawnerGroup | group | No | |
SpawnerTimer | integer | Yes | |
SpawnerUnitImage | unit | Yes | |
SpawnerUnitType | unitcode | Yes | |
StopTimeGroup | group | No | |
TechPoint | location | No | |
TechPolarPoint | location | No | |
Temp_Angle | real | No | |
Temp_Boolean | boolean | No | |
Temp_Force | force | No | |
Temp_Group | group | No | |
Temp_Integer | integer | No | |
Temp_Integer2 | integer | No | |
Temp_Integer_FormerOwner | integer | No | |
Temp_Integer_ForRandom | integer | No | |
Temp_Integer_NewOwner | integer | No | |
Temp_Player | player | No | |
Temp_Point | location | No | |
Temp_Point2 | location | No | |
Temp_Real | real | No | |
Temp_Real2 | real | No | |
Temp_String | string | No | |
Temp_Unit | unit | No | |
Temp_Unit_Group | group | No | |
Temp_UnitType | unitcode | No | |
TheKegPoint | location | No | |
ThrallEarthElemental | unit | No | |
ThrallPoint | location | No | |
TimeStoneGroup | group | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexTemp | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UniqueHeroType | unitcode | Yes | |
UniqueHeroUnit | unit | Yes | |
UnitIndexerEnabled | boolean | No | |
UseOfTechnicalGroup | group | No | |
VisionToggle | boolean | No | false |
VoidBlastGroup | group | No | |
WarpBarrageInteger | integer | No | |
WarpBarragePoint | location | No | |
WarpBarragePolarPoint | location | No | |
WarpBarrageUnit | unit | No |