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

◆ GetWeightSpecialized()

float InventoryItem::GetWeightSpecialized ( bool forceRecalc = false)
inlineprotected

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

3412 {
3413 if (IsSplitable()) //quantity determines size of the stack
3414 {
3415 #ifdef DEVELOPER
3416 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3417 {
3418 WeightDebugData data1 = WeightDebug.GetWeightDebug(this);
3419 data1.SetCalcDetails("TIB1: " + GetConfigWeightModifiedDebugText() +" * " + GetQuantity()+"(quantity)");
3420 }
3421 #endif
3422
3423 return GetQuantity() * GetConfigWeightModified();
3424 }
3425 else if (HasEnergyManager())// items with energy manager
3426 {
3427 #ifdef DEVELOPER
3428 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3429 {
3430 WeightDebugData data2 = WeightDebug.GetWeightDebug(this);
3431 data2.SetCalcDetails("TIB2: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetCompEM().GetEnergy()+"(energy) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit)");
3432 }
3433 #endif
3434 return super.GetWeightSpecialized(forceRecalc) + (GetCompEM().GetEnergy() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3435 }
3436 else//everything else
3437 {
3438 #ifdef DEVELOPER
3439 if (WeightDebug.m_VerbosityFlags & WeightDebugType.RECALC_FORCED)
3440 {
3441 WeightDebugData data3 = WeightDebug.GetWeightDebug(this);
3442 data3.SetCalcDetails("TIB3: "+super.GetWeightSpecialized(forceRecalc)+"(contents weight) + " + GetConfigWeightModifiedDebugText() +" + " + GetQuantity()+"(quantity) * " + ConfigGetFloat("weightPerQuantityUnit") +"(weightPerQuantityUnit))");
3443 }
3444 #endif
3445 return super.GetWeightSpecialized(forceRecalc) + (GetQuantity() * ConfigGetFloat("weightPerQuantityUnit")) + GetConfigWeightModified());
3446 }
3447 }
override float GetQuantity()
Определения ItemBase.c:3386
override bool IsSplitable()
Определения ItemBase.c:1575
float GetEnergy()
Определения ItemBase.c:3510
void SetCalcDetails(string details)
Определения Debug.c:816

Перекрестные ссылки GetEnergy(), GetQuantity(), IsSplitable() и WeightDebugData::SetCalcDetails().