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

◆ Do() [3/3]

override void PrepareAnimal::Do ( ItemBase ingredients[],
PlayerBase player,
array< ItemBase > results,
float specialty_weight )
inlineprivate

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

38 {
39 ItemBase deadRabbit = ingredients[0];
40 ItemBase resultBones = results[0];
41
42 int legCount = Math.RandomIntInclusive(2,4);
43 for (int i=0; i < legCount; ++i)
44 {
45 ItemBase result = ItemBase.Cast(player.SpawnEntityOnGroundRaycastDispersed("RabbitLegMeat"));
46 MiscGameplayFunctions.TransferItemProperties(deadRabbit, result);
47 result.SetQuantityNormalized(Math.RandomFloatInclusive(0.8,1));
48 }
49
50 MiscGameplayFunctions.TransferItemProperties(deadRabbit, resultBones);
51 resultBones.SetQuantity(Math.RandomIntInclusive(2,5));
52
53 SetBloodyHands(ingredients, player);
54 }
class GP5GasMask extends MaskBase ItemBase
void SetBloodyHands(PlayerBase player, bool show)
Определения PluginLifespan.c:449
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Определения PileOfWoodenPlanks.c:88

Перекрестные ссылки Math::RandomFloatInclusive(), Math::RandomIntInclusive(), SetBloodyHands() и ItemBase::SetQuantity().