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

Закрытые статические члены

static int GenerateBloodType ()
 
static bool MatchBloodCompatibility (int bloodtypetarget, int bloodtype)
 
static string GetBloodTypeName (int bloodtype, out string type, out bool positive)
 

Закрытые статические данные

static const int NUM_OF_BLOOD_TYPES = 8
 

Подробное описание

Методы

◆ GenerateBloodType()

static int GenerateBloodType ( )
inlinestaticprivate
8 {
10 int probability[NUM_OF_BLOOD_TYPES] = {42,10,25,5,9,3,2,2};
11
12 int probability_sum = 0;
13
14 for(int i = 0; i < NUM_OF_BLOOD_TYPES; i++)
15 {
17 }
18
19 //TIMERDEPRECATED - randomized blodtype for new character
21
22 int tmp = 0;
23 int index;
24
25 for(i = 0; i < NUM_OF_BLOOD_TYPES; i++)
26 {
27 tmp += probability[i];
28
30 {
31 index = i;
32 break;
33 }
34 }
35
36 return types[index];
37 }
static const int NUM_OF_BLOOD_TYPES
Definition BloodType.c:3
Definition EnMath.c:7
Definition EntityAI.c:95
const int LIQUID_BLOOD_AB_P
Definition constants.c:514
const int LIQUID_BLOOD_0_P
Definition constants.c:508
const int LIQUID_BLOOD_B_P
Definition constants.c:512
const int LIQUID_BLOOD_A_N
Definition constants.c:511
const int LIQUID_BLOOD_0_N
Definition constants.c:509
const int LIQUID_BLOOD_B_N
Definition constants.c:513
const int LIQUID_BLOOD_A_P
Definition constants.c:510
const int LIQUID_BLOOD_AB_N
Definition constants.c:515
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

Перекрестные ссылки LIQUID_BLOOD_0_N, LIQUID_BLOOD_0_P, LIQUID_BLOOD_A_N, LIQUID_BLOOD_A_P, LIQUID_BLOOD_AB_N, LIQUID_BLOOD_AB_P, LIQUID_BLOOD_B_N, LIQUID_BLOOD_B_P, NUM_OF_BLOOD_TYPES и Math::RandomInt().

Используется в PlayerStatsPCO_Base::Init().

◆ GetBloodTypeName()

static string GetBloodTypeName ( int bloodtype,
out string type,
out bool positive )
inlinestaticprivate
90 {
91 string bloodTypeName;
92 switch ( bloodtype )
93 {
94 case LIQUID_BLOOD_0_P:
95 bloodTypeName = "0+";
96 type = "0";
97 positive = true;
98 break;
99
100 case LIQUID_BLOOD_0_N:
101 bloodTypeName = "0-";
102 type = "0";
103 positive = false;
104 break;
105
106 case LIQUID_BLOOD_A_P:
107 bloodTypeName = "A+";
108 type = "A";
109 positive = true;
110 break;
111
112 case LIQUID_BLOOD_A_N:
113 bloodTypeName = "A-";
114 type = "A";
115 positive = false;
116 break;
117
118 case LIQUID_BLOOD_B_P:
119 bloodTypeName = "B+";
120 type = "B";
121 positive = true;
122 break;
123
124 case LIQUID_BLOOD_B_N:
125 bloodTypeName = "B-";
126 type = "B";
127 positive = false;
128 break;
129
131 bloodTypeName = "AB+";
132 type = "AB";
133 positive = true;
134 break;
135
137 bloodTypeName = "AB-";
138 type = "AB";
139 positive = false;
140 break;
141
142 default:
143 bloodTypeName = "";
144 break;
145 }
146
147 return bloodTypeName;
148 }

Перекрестные ссылки LIQUID_BLOOD_0_N, LIQUID_BLOOD_0_P, LIQUID_BLOOD_A_N, LIQUID_BLOOD_A_P, LIQUID_BLOOD_AB_N, LIQUID_BLOOD_AB_P, LIQUID_BLOOD_B_N и LIQUID_BLOOD_B_P.

Используется в RecipeBase::Do(), ActionTestBloodTarget::OnFinishProgressClient(), Hud::UpdateBloodName(), UIScriptedMenu::UpdateItemInfoLiquidType() и HudDebugWinBase::UpdateValues().

◆ MatchBloodCompatibility()

static bool MatchBloodCompatibility ( int bloodtypetarget,
int bloodtype )
inlinestaticprivate
40 {
41 bool result = false;
42 switch ( bloodtype )
43 {
44 case LIQUID_BLOOD_0_P:
46 break;
47
50 break;
51
54 break;
55
56 case LIQUID_BLOOD_A_N:
58 break;
59
60 case LIQUID_BLOOD_B_P:
62 break;
63
66 break;
67
70 break;
71
74 break;
75
76 default:
77 Debug.Log("Incorrect blood type");
78 break;
79 }
80 if ( result )
81 {
82 return true;
83 }
84 else
85 {
86 return false;
87 }
88 }
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:136

Перекрестные ссылки LIQUID_BLOOD_0_N, LIQUID_BLOOD_0_P, LIQUID_BLOOD_A_N, LIQUID_BLOOD_A_P, LIQUID_BLOOD_AB_N, LIQUID_BLOOD_AB_P, LIQUID_BLOOD_B_N, LIQUID_BLOOD_B_P и Debug::Log().

Используется в CAContinuousQuantityBloodTransfer::CalcAndSetQuantity(), ActionGiveBloodSelf::OnEndServer() и ActionGiveBloodTarget::OnEndServer().

Поля

◆ NUM_OF_BLOOD_TYPES

const int NUM_OF_BLOOD_TYPES = 8
staticprivate

Используется в GenerateBloodType().


Объявления и описания членов класса находятся в файле: