Unit.GetOwner (Civ5 API)
This page is a part of the Lua and UI Reference (Civ5).
This function is a member of Unit. This is an instance method, invoke it with a colon. |
Usage
PlayerID Unit:GetOwner()
Returned Value
- No description available.
Source code samples
Redundant occurences have been removed.
EnemyUnitPanel.lua
UI/InGame/WorldView/EnemyUnitPanel.lua
0103
|
local pPlayer = Players[pUnit:GetOwner()]; |
0567
|
local iMyPlayer = pMyUnit:GetOwner(); |
0568
|
local iTheirPlayer = pTheirUnit:GetOwner(); |
0611
|
local pFireSupportUnit = pMyUnit:GetFireSupportUnit(pTheirUnit:GetOwner(), pToPlot:GetX(), pToPlot:GetY()); |
1055
|
iModifier = iModifier + Players[pMyUnit:GetOwner()]:GetBarbarianCombatBonus(); |
1422
|
local iTheirPlayer = theirUnit:GetOwner(); |
1460
|
local theirPlayerID = theirUnit:GetOwner(); |
1845
|
if (pTeam:IsAtWar(pUnit:GetTeam()) or (UIManager:GetAlt() and pUnit:GetOwner() ~= iTeam)) then |
1941
|
if (myTeam:IsAtWar(theirUnit:GetTeam()) or (UIManager:GetAlt() and theirUnit:GetOwner() ~= myTeamID)) then |
InGame.lua
UI/InGame/InGame.lua
0184
|
if (pFoundUnit:GetOwner() == iPlayerID) then |
PlotMouseoverInclude.lua
UI/InGame/PlotMouseoverInclude.lua
0268
|
local pPlayer = Players[unit:GetOwner()]; |
0294
|
strUnitText = strUnitText .. " ("..tostring(unit:GetOwner()).." - " .. tostring(unit:GetID()) .. ")"; |
TurnsRemaining.lua - DLC_04 DLC
DLC/DLC_04/Scenarios/1066Scenario/TurnsRemaining.lua
0204
|
iOldOwner = unit:GetOwner(); |
TutorialChecks.lua
Tutorial/TutorialChecks.lua
0251
|
if (v:IsCombatUnit() and pPlot:GetOwner() == v:GetOwner()) then |
1371
|
if (pPlot and pPlot:GetOwner() ~= v:GetOwner() and pPlot:GetUnitPower() <= 0) then |
UnitFlagManager.lua
UI/InGame/UnitFlagManager.lua
0609
|
local playerTable = g_MasterList[ escortUnit:GetOwner() ]; |
1069
|
controlTable.Button:SetVoids( pPlotUnit:GetOwner(), pPlotUnit:GetID() ); |
1264
|
local owner, unitID = unit:GetOwner(), unit:GetID(); |
1447
|
local playerTable = g_MasterList[ pUnit:GetOwner() ]; |
UnitPanel.lua
UI/InGame/WorldView/UnitPanel.lua
0447
|
local pPlayer = Players[ unit:GetOwner() ]; |
0944
|
if (pPlot:GetOwner() ~= unit:GetOwner()) then |
WorldView.lua
UI/InGame/WorldView/WorldView.lua
0618
|
if (plot:IsVisibleEnemyUnit(pHeadSelectedUnit:GetOwner()) or plot:IsEnemyCity(pHeadSelectedUnit)) then |
0644
|
if (city and city:GetOwner() == pHeadSelectedUnit:GetOwner() and pHeadSelectedUnit:IsCanAttack()) then |
The initial version of this page was created by the Civ5 API Bot, see the Civ5 API Reference FAQ. Some of the texts come from the 2kgames' wiki and most of code samples are copyrighted to Firaxis.
Functions' signatures were either copied from the 2kgames' wiki, or infered from the Lua source files and the binaries. Errors are possible.
Contributors may find help in the Contributors guide to the Civ5 API.