mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Fixed bug following Players in Database
Group was not null, but did not exist.
This commit is contained in:
parent
0aae73ef58
commit
1739305d12
3
.gitignore
vendored
3
.gitignore
vendored
@ -214,3 +214,6 @@ pip-log.txt
|
|||||||
|
|
||||||
#Mr Developer
|
#Mr Developer
|
||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
|
*.gss
|
||||||
|
*._gs
|
||||||
|
*.gsl
|
||||||
|
|||||||
@ -301,7 +301,10 @@ trace.f( self.ClassName, UnitData )
|
|||||||
|
|
||||||
if UnitData:isExist() then
|
if UnitData:isExist() then
|
||||||
local UnitName = UnitData:getName()
|
local UnitName = UnitData:getName()
|
||||||
local GroupName = Unit.getGroup(UnitData):getName()
|
local GroupData = UnitData:getGroup()
|
||||||
|
|
||||||
|
if GroupData and GroupData:isExist() then
|
||||||
|
local GroupName = GroupData:getName()
|
||||||
local PlayerName = UnitData:getPlayerName()
|
local PlayerName = UnitData:getPlayerName()
|
||||||
|
|
||||||
trace.i(self.ClassName, "Player : " .. PlayerName .. " Unit : " .. UnitName .. " Group : " .. GroupName )
|
trace.i(self.ClassName, "Player : " .. PlayerName .. " Unit : " .. UnitName .. " Group : " .. GroupName )
|
||||||
@ -342,6 +345,7 @@ trace.f( self.ClassName, UnitData )
|
|||||||
self.Players[PlayerName].UnitCategory = Unit.getGroup(UnitData):getCategory()
|
self.Players[PlayerName].UnitCategory = Unit.getGroup(UnitData):getCategory()
|
||||||
self.Players[PlayerName].UnitType = UnitData:getTypeName()
|
self.Players[PlayerName].UnitType = UnitData:getTypeName()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
30
Message.lua
30
Message.lua
@ -187,21 +187,21 @@ function MESSAGEQUEUE:_DisplayMessages()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Now check if the Client also has messages that belong to the Coalition of the Client...
|
-- Now check if the Client also has messages that belong to the Coalition of the Client...
|
||||||
for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
-- for CoalitionSideID, CoalitionSideData in pairs( self.CoalitionSides ) do
|
||||||
for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
-- for MessageID, MessageData in pairs( CoalitionSideData.Messages ) do
|
||||||
local CoalitionGroup = Group.getByName( ClientGroupName )
|
-- local CoalitionGroup = Group.getByName( ClientGroupName )
|
||||||
if CoalitionGroup and CoalitionGroup:getCoalition() == CoalitionSideID then
|
-- if CoalitionGroup and CoalitionGroup:getCoalition() == CoalitionSideID then
|
||||||
if MessageData.MessageCoalition == false then
|
-- if MessageData.MessageCoalition == false then
|
||||||
trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
-- trigger.action.outTextForGroup( Group.getByName(ClientGroupName):getID(), MessageData.MessageCategory .. '\n' .. MessageData.MessageText:gsub("\n$",""):gsub("\n$",""), MessageData.MessageDuration )
|
||||||
MessageData.MessageCoalition = true
|
-- MessageData.MessageCoalition = true
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
-- local MessageTimeLeft = ( MessageData.MessageTime + MessageData.MessageDuration ) - timer.getTime()
|
||||||
if MessageTimeLeft <= 0 then
|
-- if MessageTimeLeft <= 0 then
|
||||||
MessageData = nil
|
-- MessageData = nil
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user