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

◆ EEHealthLevelChanged()

override void CarWheel_Ruined::EEHealthLevelChanged ( int oldLevel,
int newLevel,
string zone )
inlineprivate

См. определение в файле 4_World/DayZ/Entities/Core/Inherited/InventoryItem.c строка 372

373 {
374 super.EEHealthLevelChanged( oldLevel, newLevel, zone );
375#ifdef DIAG_DEVELOPER
376 // used when fixing the whole car through debug
377 if (newLevel == GameConstants.STATE_PRISTINE)
378 {
379 string newWheel = GetReplacement();
380
381 if (newWheel != "")
382 {
383 //Unlock to allow creating a new item
384 if (IsLockedInSlot())
386
387 ReplaceWheelLambda lambda = new ReplaceWheelLambda(this, newWheel, null);
388 lambda.SetTransferParams(true, true, true);
389 GetInventory().ReplaceItemWithNew(InventoryMode.SERVER, lambda);
390 }
391 }
392#endif
393 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void ReplaceWheelLambda(EntityAI old_item, string new_item_type, PlayerBase player)
void UnlockFromParent()
Unlocks this item from its attachment slot of its parent.
Определения ItemBase.c:5755

Перекрестные ссылки GetReplacement(), ReplaceWheelLambda(), GameConstants::STATE_PRISTINE и UnlockFromParent().