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

◆ UnlockOnServer()

void UnlockOnServer ( EntityAI player,
EntityAI parent,
bool isInsideLock = false )
protected

Unlock AND drop.

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

410 {
411 if (LogManager.IsBaseBuildingLogEnable()) bsbDebugPrint("[bsb] CombinationLock.UnlockOnServer " + " m_Combination=" + m_Combination + " m_CombinationLocked=" + m_CombinationLocked);
412 if (IsLockAttached())
413 {
414 //set slot unlock
415 InventoryLocation inventoryLocation = new InventoryLocation;
416 GetInventory().GetCurrentInventoryLocation(inventoryLocation);
417 parent.GetInventory().SetSlotLock(inventoryLocation.GetSlot(), false);
418
419 //drop entity from attachment slot
420 if (g_Game.IsMultiplayer())
421 {
422 parent.GetInventory().DropEntity(InventoryMode.SERVER, parent, this);
423 }
424 else
425 {
426 parent.GetInventory().DropEntity(InventoryMode.LOCAL, parent, this);
427 }
428
429 vector groundPos;
430 if (player)
431 {
432 groundPos = player.GetPosition();
433 }
434 else
435 {
436 string slotName = InventorySlots.GetSlotName(inventoryLocation.GetSlot());
437 if (parent.MemoryPointExists(slotName))
438 {
439 groundPos = parent.ModelToWorld(parent.GetMemoryPointPos(slotName));
440 }
441 else
442 {
443 groundPos = GetPosition();
444 }
445 }
446
447 SetPosition(groundPos);
448 PlaceOnSurface();
449
451 SetTakeable(true);
452 CheckLockedStateServer(isInsideLock);
453
454 if (!isInsideLock)
455 {
457 }
458 else
459 {
461 }
462
464
465 //synchronize
466 Synchronize();
467 }
468 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
class BaseBuildingBase extends ItemBase bsbDebugPrint(string s)
Определения BaseBuildingBase.c:1291
PlayerSpawnPreset slotName
void CheckLockedStateServer(bool insideLock=false)
Определения CombinationLock.c:511
LockAction
Определения CombinationLock.c:13
void Synchronize()
Определения CombinationLock.c:205
int m_Combination
Определения CombinationLock.c:33
void UpdateLockDigits()
Определения CombinationLock.c:762
int m_CombinationLocked
Определения CombinationLock.c:35
bool IsLockAttached()
Определения CombinationLock.c:534
int m_CombinationInside
Определения CombinationLock.c:34
LockAction m_LockActionPerformed
Определения CombinationLock.c:41
DayZGame g_Game
Определения DayZGame.c:4074
override void SetTakeable(bool pState)
Определения ItemBase.c:4362
proto native int GetSlot()
returns slot id if current type is Attachment
InventoryLocation.
Определения InventoryLocation.c:30
static proto native owned string GetSlotName(int id)
converts slot_id to string
provides access to slot configuration
Определения InventorySlots.c:6
static bool IsBaseBuildingLogEnable()
Определения 3_Game/DayZ/tools/Debug.c:809
Определения EnConvert.c:119
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:463
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки bsbDebugPrint(), CheckLockedStateServer(), g_Game, GetPosition(), InventoryLocation::GetSlot(), InventorySlots::GetSlotName(), LogManager::IsBaseBuildingLogEnable(), IsLockAttached(), m_Combination, m_CombinationInside, m_CombinationLocked, m_LockActionPerformed, SetPosition(), SetTakeable(), slotName, Synchronize() и UpdateLockDigits().