mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#UNIT - Fix getting skill from N/A Templates
This commit is contained in:
parent
eab643268f
commit
d36cd8e284
@ -1729,7 +1729,10 @@ end
|
|||||||
function UNIT:GetSkill()
|
function UNIT:GetSkill()
|
||||||
self:F2( self.UnitName )
|
self:F2( self.UnitName )
|
||||||
local name = self.UnitName
|
local name = self.UnitName
|
||||||
local skill = _DATABASE.Templates.Units[name].Template.skill or "Random"
|
local skill = "Random"
|
||||||
|
if _DATABASE.Templates.Units[name] and _DATABASE.Templates.Units[name].Template and _DATABASE.Templates.Units[name].Template.skill then
|
||||||
|
skill = _DATABASE.Templates.Units[name].Template.skill or "Random"
|
||||||
|
end
|
||||||
return skill
|
return skill
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user