Ejemplo n.º 1
0
ALERROR CEffectCreator::OnBindDesign (SDesignLoadCtx &Ctx)

//	OnBindDesign
//
//	Bind the design

	{
	try
		{
		ALERROR error;

		//	Load sounds

		if (error = m_Sound.Bind(Ctx))
			return error;

		//	Cache some events

		InitCachedEvents(evtCount, CACHED_EVENTS, m_CachedEvents);

		//	Load our descendants

		if (error = OnEffectBindDesign(Ctx))
			return error;

		return NOERROR;
		}
	catch (...)
		{
		::kernelDebugLogMessage("Crash in CEffectCreator::OnBindDesign. [m_sUNID = %s]", m_sUNID);
		throw;
		}
	}
Ejemplo n.º 2
0
ALERROR CEffectCreator::OnBindDesign (SDesignLoadCtx &Ctx)

//	OnBindDesign
//
//	Bind the design

	{
	ALERROR error;

	//	Load sounds

	if (m_dwSoundUNID)
		m_iSound = g_pUniverse->FindSound(m_dwSoundUNID);
	else
		m_iSound = -1;

	//	Load our descendants

	if (error = OnEffectBindDesign(Ctx))
		return error;

	return NOERROR;
	}