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

◆ EffectRegister()

static int SEffectManager::EffectRegister ( Effect effect)
inlinestaticprotected

Registers Effect in SEffectManager.

Заметки
Already handled in SEffectManager Create/Play methods
This will make SEffectManager hold a strong ref for the Effect
Аргументы
effectEffect The Effect to register
Возвращает
int The Effect ID

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

323 {
324 if (effect.IsRegistered())
325 {
326 ErrorEx(string.Format("Attempted to register Effect '%1' which was already registered.", effect.GetDebugName()), ErrorExSeverity.INFO);
327 return effect.GetID();
328 }
329
330 int id;
331
332 if (!m_IsCleanup)
333 {
334 id = GetFreeEffectID();
335 m_EffectsMap.Insert(id, effect);
336 effect.Event_OnRegistered(id);
337 }
338 else
339 ErrorEx("Attempted to register Effect while SEffectManager is cleaning up, request ignored.", ErrorExSeverity.WARNING);
340
341 return id;
342 }
static int GetFreeEffectID()
Helper function for EffectRegister to decide an Effect ID.
Определения EffectManager.c:400
static ref map< int, ref Effect > m_EffectsMap
Static map of all registered effects <id, Effect>
Определения EffectManager.c:8
static bool m_IsCleanup
Bool to check whether Cleanup is happening, which means that the maps should no longer be accessed.
Определения EffectManager.c:16
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки Effect(), ErrorEx, GetFreeEffectID(), m_EffectsMap и m_IsCleanup.

Используется в CreateSound(), PlayInWorld() и PlayOnObject().