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

◆ UnlockServer()

void UnlockServer ( EntityAI player,
EntityAI parent )
protected

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

300 {
301 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] CombinationLock.UnlockServer " + " m_Combination=" + m_Combination + " m_CombinationLocked=" + m_CombinationLocked);
302 if ( IsLockAttached() )
303 {
304 Fence fence = Fence.Cast( parent );
305
306 //set slot unlock
307 InventoryLocation inventory_location = new InventoryLocation;
308 GetInventory().GetCurrentInventoryLocation( inventory_location );
309 fence.GetInventory().SetSlotLock( inventory_location.GetSlot(), false );
310
311 //drop entity from attachment slot
312 if (GetGame().IsMultiplayer())
313 {
314 if (player)
315 player.ServerDropEntity(this);
316 else
317 parent.GetInventory().DropEntity(InventoryMode.SERVER, parent, this);
318 }
319 else
320 {
321 if (player)
322 player.LocalDropEntity(this);
323 else
324 parent.GetInventory().DropEntity(InventoryMode.LOCAL, parent, this);
325 }
326
327 SetPosition( fence.GetKitSpawnPosition() );
328 PlaceOnSurface();
329
331 SetTakeable(true);
333 //synchronize
334 Synchronize();
335 }
336
337 //reset performed action
338 //m_LockActionPerformed = LockAction.NONE;
339 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1292
void CheckLockedStateServer()
Определения CombinationLock.c:370
LockAction
Определения CombinationLock.c:2
void Synchronize()
Определения CombinationLock.c:151
int m_Combination
Определения CombinationLock.c:15
int m_CombinationLocked
Определения CombinationLock.c:16
bool IsLockAttached()
Определения CombinationLock.c:389
LockAction m_LockActionPerformed
Определения CombinationLock.c:20
override void SetTakeable(bool pState)
Определения ItemBase.c:9042
override bool ServerDropEntity(notnull EntityAI item)
Определения Man.c:137
override bool LocalDropEntity(notnull EntityAI item)
Определения Man.c:132
proto native int GetSlot()
returns slot id if current type is Attachment
InventoryLocation.
Определения InventoryLocation.c:29
static bool IsBaseBuildingLogEnable()
Определения Debug.c:698
Определения Debug.c:594
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:438

Перекрестные ссылки bsbDebugPrint(), CheckLockedStateServer(), GetGame(), InventoryLocation::GetSlot(), LogManager::IsBaseBuildingLogEnable(), IsLockAttached(), EntityAI::LocalDropEntity(), m_Combination, m_CombinationLocked, m_LockActionPerformed, EntityAI::ServerDropEntity(), SetPosition(), SetTakeable() и Synchronize().