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

◆ HandleDropCartridge()

static bool HandleDropCartridge ( DayZPlayer player,
float damage,
string cartTypeName,
string magTypeName )
static

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

276 {
277 vector pos = player.GetPosition();
278 EntityAI entityGround = player.SpawnEntityOnGroundPos(magTypeName, pos);
279 if (entityGround && entityGround.IsInherited(Magazine))
280 {
281 Magazine magazineGround;
282 if (Class.CastTo(magazineGround, entityGround))
283 {
284 magazineGround.ServerSetAmmoCount(0);
285 magazineGround.SetHealth("", "", (1 - damage) * magazineGround.GetMaxHealth());
286 if (magazineGround.ServerStoreCartridge(damage, cartTypeName))
287 return true;
288 }
289 }
290
291 return false;
292 }
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения Building.c:6
Определения EnConvert.c:106
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo().

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