DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetLock()

void Container::SetLock ( EntityAI item)
inlineprotected

См. определение в файле CargoContainer.c строка 180

181 {
182 #ifndef PLATFORM_CONSOLE
183 if( GetGame().GetPlayer() )
184 {
185 InventoryLocation il = new InventoryLocation;
186 int index = GetGame().GetPlayer().GetHumanInventory().FindUserReservedLocationIndex( item );
187 if( index >= 0 )
188 {
189 GetGame().GetPlayer().GetHumanInventory().GetUserReservedLocation( index, il );
190
191 ref Icon icon = new Icon( this, false );
192 m_Icons.Insert( icon );
193 icon.InitLock( m_Entity, item, il.GetCol(), il.GetRow(), il.GetFlip() );
194 m_ShowedLockPositions.Insert( item, new Param3<ref Icon, int, int>( icon, 1, 1 ) );
195 item.GetOnReleaseLock().Insert( ReleaseLock );
196 }
197 }
198 #endif
199 }
EntityAI m_Entity
Определения ActionDebug.c:11
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native DayZPlayer GetPlayer()
ref array< ref Icon > m_Icons
Определения CargoContainer.c:11
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedLockPositions
Определения CargoContainer.c:13
void ReleaseLock(EntityAI item)
Определения CargoContainer.c:201
proto native int GetCol()
returns column of cargo if current type is Cargo / ProxyCargo
proto native int GetRow()
returns row of cargo if current type is Cargo / ProxyCargo
proto native bool GetFlip()
returns flip status of cargo
proto native CGame GetGame()

Перекрестные ссылки InventoryLocation::GetCol(), InventoryLocation::GetFlip(), GetGame(), CGame::GetPlayer(), GetPlayer(), InventoryLocation::GetRow(), m_Entity, m_Icons, m_ShowedLockPositions и ReleaseLock().

Используется в SetEntity() и ~CargoContainer().