void contractDataFieldScalar(ArrayOutFields &       outputFields,
                             const ArrayInData &    inputData,
                             const ArrayInFields &  inputFields,
                             const bool             sumInto) {

  int numCells       = inputFields.dimension(0);
  int numFields      = inputFields.dimension(1);
  int numPoints      = inputFields.dimension(2);
  int numDataPoints  = inputData.dimension(1);

  if (sumInto) {
        if (numDataPoints != 1) { // nonconstant data
          for (int cl = 0; cl < numCells; cl++) {
            for (int lbf = 0; lbf < numFields; lbf++) {
              Scalar tmpVal(0);
              for (int qp = 0; qp < numPoints; qp++) {
                tmpVal += inputFields(cl, lbf, qp)*inputData(cl, qp);
              } // P-loop
              outputFields(cl, lbf) += tmpVal;
            } // F-loop
          } // C-loop
        }
        else { // constant data
          for (int cl = 0; cl < numCells; cl++) {
            for (int lbf = 0; lbf < numFields; lbf++) {
              Scalar tmpVal(0);
              for (int qp = 0; qp < numPoints; qp++) {
                tmpVal += inputFields(cl, lbf, qp)*inputData(cl, 0);
              } // P-loop
              outputFields(cl, lbf) += tmpVal;
            } // F-loop
          } // C-loop
        } // numDataPoints
      }
      else {
        if (numDataPoints != 1) { // nonconstant data
          for (int cl = 0; cl < numCells; cl++) {
            for (int lbf = 0; lbf < numFields; lbf++) {
              Scalar tmpVal(0);
              for (int qp = 0; qp < numPoints; qp++) {
                tmpVal += inputFields(cl, lbf, qp)*inputData(cl, qp);
              } // P-loop
              outputFields(cl, lbf) = tmpVal;
            } // F-loop
          } // C-loop
        }
        else { // constant data
          for (int cl = 0; cl < numCells; cl++) {
            for (int lbf = 0; lbf < numFields; lbf++) {
              Scalar tmpVal(0);
              for (int qp = 0; qp < numPoints; qp++) {
                tmpVal += inputFields(cl, lbf, qp)*inputData(cl, 0);
              } // P-loop
              outputFields(cl, lbf) = tmpVal;
            } // F-loop
          } // C-loop
        } // numDataPoints
      }

}
Пример #2
0
void CreateEvidencesArHMM( CDBN *pDBN, int nTimeSlices,
			  pEvidencesVector *myEvidencesForDBN )
{

    if( myEvidencesForDBN->size() )
    {
        assert( 0 );
    }
    /////////////////////////////////////////////////////////////////////////////
    // Create values for evidence in every slice from t=0 to t=nTimeSlice
    /////////////////////////////////////////////////////////////////////////////


    intVector obsNodes(1, 1);
    int slice;
    valueVecVector valuesPerSlice;

    for( slice = 0; slice < nTimeSlices; slice++ )
    {
	valueVector tmpVal(1);
	tmpVal[0].SetFlt((float )( rand()%10 ));
	valuesPerSlice.push_back( tmpVal );
    }


    for( slice = 0; slice < nTimeSlices; slice++ )
    {
	myEvidencesForDBN->push_back( CEvidence::Create( pDBN->GetModelDomain(),
	    obsNodes, valuesPerSlice[slice] ) );
    }
}
Пример #3
0
//------------------------------------------------------------------------------
// CUISiegeWarfareDoc::StartEffect
// Explain:  
// Date : 2005-11-18(오후 3:49:15), By Lee Ki-hwan
//------------------------------------------------------------------------------
void CUISiegeWarfareDoc::StartGuildMasterEffect( SLONG slCharIndex, CEntity* penEntity, SBYTE sbJoinFlagMerac, int nGuildIndex, LONG lGuildPosition )
{
	CTString strEffectName = "GuildMaster";
	
	if( !IsWar() ) return; // 전투중이 아니라면 씹자~
	if( m_mapEGGuildMaster.find( slCharIndex ) != m_mapEGGuildMaster.end() ) return; // 이미 존재 하는가?
	
	if( sbJoinFlagMerac == WCJF_NONE || 
		sbJoinFlagMerac <= -1 || 
		sbJoinFlagMerac == WCJF_DEFENSE_CHAR ||
		 sbJoinFlagMerac == WCJF_ATTACK_CHAR  ) return;

	if( slCharIndex == -1 ) return;
	if( penEntity == NULL ) return;
	if( nGuildIndex == -1 ) return;
	if( lGuildPosition != GUILD_MEMBER_BOSS ) return;

	// Start Effect
	CEffectGroup *pEG = StartEffectGroup( strEffectName
		, &penEntity->en_pmiModelInstance->m_tmSkaTagManager
		,_pTimer->GetLerpedCurrentTick());
	
	std::map<SLONG, CEffectGroup *>::value_type tmpVal( slCharIndex, pEG);
	m_mapEGGuildMaster.insert(tmpVal);
}
Пример #4
0
 void addDataItem( void )
 {
   // add element to (or modify element of) the collection
   queryStringMap::iterator pos = rMap.find(name);
   aString tmpVal(value);
   if( pos == rMap.end() )
   {
     rMap.insert(make_pair(name,tmpVal));
   }
   else
   {
     rMap[name] += "|";
     rMap[name] += tmpVal;
   }
 }
  	//Assume compEngine is COMP_CPP, sumInto = false
  	KOKKOS_MACRO_DEVICE_FUNCTION
  	void operator()(size_type ielem) const 
  	{
		for (int lbf = 0; lbf < numLeft; lbf++) {
        	for (int rbf = 0; rbf < numRight; rbf++) {
            	Scalar tmpVal(0);
              		for (int qp = 0; qp < numPoints; qp++) {
                		for (int iVec = 0; iVec < dim; iVec++) {
                  			tmpVal += left(ielem, lbf, qp, iVec)*right(ielem, rbf, qp, iVec);
		                } //D-loop
        		      } // P-loop
           	   output(ielem, lbf, rbf) = tmpVal;
	        } // R-loop
		} // L-loop
  	}
Пример #6
0
//------------------------------------------------------------------------------
// CUISiegeWarfareDoc::StartConsensusEffect
// WSS_DRATAN_SIEGEWARFARE 2007/10/14
//------------------------------------------------------------------------------
void CUISiegeWarfareDoc::StartConsensusEffect( SLONG slCharIndex, CEntity* penEntity )
{
	CTString strEffectName = "JEWEL";	
	
	if( m_mapEGConsensus.find( slCharIndex ) != m_mapEGConsensus.end() ) return; // 이미 존재 하는가?

	if( slCharIndex == -1 ) return;
	if( penEntity == NULL ) return;

	// Start Effect
	CEffectGroup *pEG = StartEffectGroup( strEffectName
		, &penEntity->en_pmiModelInstance->m_tmSkaTagManager
		,_pTimer->GetLerpedCurrentTick());
	
	std::map<SLONG, CEffectGroup *>::value_type tmpVal( slCharIndex, pEG);
	m_mapEGConsensus.insert(tmpVal);
}
void register_all_cocos2dx_extension_manual(JSContext* cx, JS::HandleObject global)
{
    JS::RootedObject ccObj(cx);
    JS::RootedObject jsbObj(cx);
    JS::RootedValue tmpVal(cx);
    JS::RootedObject tmpObj(cx);
    get_or_create_js_obj(cx, global, "cc", &ccObj);
    get_or_create_js_obj(cx, global, "jsb", &jsbObj);

    tmpObj.set(jsb_cocos2d_extension_AssetsManagerEx_prototype);
    JS_DefineFunction(cx, tmpObj, "retain", js_cocos2dx_retain, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS_DefineFunction(cx, tmpObj, "release", js_cocos2dx_release, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    tmpObj.set(jsb_cocos2d_extension_Manifest_prototype);
    JS_DefineFunction(cx, tmpObj, "retain", js_cocos2dx_retain, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS_DefineFunction(cx, tmpObj, "release", js_cocos2dx_release, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);

    JS_GetProperty(cx, ccObj, "EventListenerAssetsManager", &tmpVal);
    tmpObj.set(tmpVal.toObjectOrNull());
    JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_extension_EventListenerAssetsManagerEx_create, 2, JSPROP_READONLY | JSPROP_PERMANENT);
    tmpObj.set(jsb_cocos2d_extension_EventListenerAssetsManagerEx_prototype);
    JS_DefineFunction(cx, tmpObj, "init", js_cocos2dx_extension_EventListenerAssetsManagerEx_init, 2, JSPROP_ENUMERATE | JSPROP_PERMANENT);

    tmpObj.set(jsb_cocos2d_extension_ScrollView_prototype);
    JS_DefineFunction(cx, tmpObj, "setDelegate", js_cocos2dx_CCScrollView_setDelegate, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS::RootedObject tableview(cx, jsb_cocos2d_extension_TableView_prototype);
    JS_DefineFunction(cx, tableview, "setDelegate", js_cocos2dx_CCTableView_setDelegate, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS_DefineFunction(cx, tableview, "setDataSource", js_cocos2dx_CCTableView_setDataSource, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS_DefineFunction(cx, tableview, "_init", js_cocos2dx_CCTableView_init, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS::RootedObject control(cx, jsb_cocos2d_extension_Control_prototype);
    JS_DefineFunction(cx, control, "addTargetWithActionForControlEvents", js_cocos2dx_CCControl_addTargetWithActionForControlEvents, 3, JSPROP_ENUMERATE | JSPROP_PERMANENT);
    JS_DefineFunction(cx, control, "removeTargetWithActionForControlEvents", js_cocos2dx_CCControl_removeTargetWithActionForControlEvents, 3, JSPROP_ENUMERATE | JSPROP_PERMANENT);

    JS_GetProperty(cx, ccObj, "TableView", &tmpVal);
    tmpObj.set(tmpVal.toObjectOrNull());
    JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCTableView_create, 3, JSPROP_READONLY | JSPROP_PERMANENT);

    JS_DefineFunction(cx, jsbObj, "loadRemoteImg", js_load_remote_image, 2, JSPROP_READONLY | JSPROP_PERMANENT);
}
Пример #8
0
// dispatch all pending events to the various receivers.
static void PumpEvents()
{
	JSContext* cx = g_GUI->GetScriptInterface()->GetContext();
	JSAutoRequest rq(cx);

	PROFILE3("dispatch events");

	SDL_Event_ ev;
	while (in_poll_event(&ev))
	{
		PROFILE2("event");
		if (g_GUI)
		{
			JS::RootedValue tmpVal(cx);
			ScriptInterface::ToJSVal(cx, &tmpVal, ev);
			std::string data = g_GUI->GetScriptInterface()->StringifyJSON(&tmpVal);
			PROFILE2_ATTR("%s", data.c_str());
		}
		in_dispatch_event(&ev);
	}

	g_TouchInput.Frame();
}
Пример #9
0
void VRShadowEngine::setupLightChunk(Light         *pLight,
                                            LightTypeE     eType,
                                            RenderAction  *pAction,
                                            EngineDataPtr  pEngineData)
{
    if(eType == Directional)
    {
        DirectionalLight *pDLight =
            dynamic_cast<DirectionalLight *>(pLight);

        LightChunkUnrecPtr  pChunk  = pEngineData->getLightChunk();

        if(pChunk == NULL)
        {
            pChunk = LightChunk::createLocal();

            pEngineData->setLightChunk(pChunk);
        }

        Color4f tmpVal(0.0, 0.0, 0.0, 1.0);

        pChunk->setSpecular(tmpVal);

        tmpVal.setValuesRGBA(0.2f, 0.2f, 0.2f, 1.0f);

        pChunk->setDiffuse (tmpVal);

        tmpVal.setValuesRGBA(0.0, 0.0, 0.0, 1.0);

        pChunk->setAmbient (tmpVal);

        Vec4f dir(pDLight->getDirection());

        dir[3] = 0;

        pChunk->setPosition(dir);

        pChunk->setBeacon(pLight->getBeacon());
    }
    else if(eType == Point)
    {
        PointLight         *pPLight = dynamic_cast<PointLight *>(pLight);

        LightChunkUnrecPtr  pChunk  = pEngineData->getLightChunk();

        if(pChunk == NULL)
        {
            pChunk = LightChunk::createLocal();

            pEngineData->setLightChunk(pChunk);
        }

        Color4f tmpVal(0.0, 0.0, 0.0, 1.0);

        pChunk->setSpecular(tmpVal);

        tmpVal.setValuesRGBA(this->getShadowColor()[0],
                             this->getShadowColor()[1],
                             this->getShadowColor()[2],
                             this->getShadowColor()[3]);

        pChunk->setDiffuse (tmpVal);

        tmpVal.setValuesRGBA(0.0, 0.0, 0.0, 1.0);

        pChunk->setAmbient (tmpVal);

        Vec4f pos(pPLight->getPosition());

        pos[3] = 1;

        pChunk->setPosition(pos);

        pChunk->setBeacon(pLight->getBeacon());
    }
}
Пример #10
0
QString AttributeCount::_printJSON(QString lName, AttributeCountHash& data)
{
  QStringList attrKey = data.keys();

  // Skip empty layers
  if (attrKey.count() == 0)
  {
    return "";
  }

  attrKey.sort(); // Sort the attribute list to make it look better

  QString result;

  // Start the JSON
  result += QString("    \"%1\":{\n").arg(lName);

  for (int i=0; i < attrKey.count(); i++)
  {
    QStringList valKey = data[attrKey[i]].keys();

    int maxValues = valKey.count();
    valKey.sort();

    result += QString("      \"%1\":[\n").arg(attrKey[i]);

    for (int j=0; j < maxValues; j++)
    {
      QString tmpVal(valKey[j]);

      // Escape carrage returns
      tmpVal.replace("\n","\\n");

      // Escape linefeeds
      tmpVal.replace("\r","\\r");

      // Escape form feeds
      tmpVal.replace("\f","\\f");

      // Escape tabs
      tmpVal.replace("\t","\\t");

      // Escape vertical tabs
      tmpVal.replace("\v","\\v");

      // And double quotes
      tmpVal.replace("\"","\\\"");

      result += QString("        \"%1\"").arg(tmpVal);

      if (j != (maxValues - 1))
      {
        result += ",\n";
      }
      else
      {
        // No comma after bracket
        result += "\n";
      }

    } // End values

    if (i != (attrKey.count() - 1))
    {
      result += "        ],\n";
    }
    else
    {
      // No comma after bracket
      result += "        ]\n";
    }

  } // End attributes

  // We have no idea if this is the last layer so no comma on the end
  result += "      }";

  return result;

} // End printJSON
Пример #11
0
void RunHardwareDetection()
{
	TIMER(L"RunHardwareDetection");

	ScriptInterface scriptInterface("Engine", "HWDetect", g_ScriptRuntime);
	JSContext* cx = scriptInterface.GetContext();
	JSAutoRequest rq(cx);

	scriptInterface.RegisterFunction<void, bool, &SetDisableAudio>("SetDisableAudio");
	scriptInterface.RegisterFunction<void, bool, &SetDisableS3TC>("SetDisableS3TC");
	scriptInterface.RegisterFunction<void, bool, &SetDisableShadows>("SetDisableShadows");
	scriptInterface.RegisterFunction<void, bool, &SetDisableShadowPCF>("SetDisableShadowPCF");
	scriptInterface.RegisterFunction<void, bool, &SetDisableAllWater>("SetDisableAllWater");
	scriptInterface.RegisterFunction<void, bool, &SetDisableFancyWater>("SetDisableFancyWater");
	scriptInterface.RegisterFunction<void, bool, &SetEnableGLSL>("SetEnableGLSL");
	scriptInterface.RegisterFunction<void, std::string, &SetRenderPath>("SetRenderPath");

	// Load the detection script:

	const wchar_t* scriptName = L"hwdetect/hwdetect.js";
	CVFSFile file;
	if (file.Load(g_VFS, scriptName) != PSRETURN_OK)
	{
		LOGERROR("Failed to load hardware detection script");
		return;
	}

	std::string code = file.DecodeUTF8(); // assume it's UTF-8
	scriptInterface.LoadScript(scriptName, code);

	// Collect all the settings we'll pass to the script:
	// (We'll use this same data for the opt-in online reporting system, so it
	// includes some fields that aren't directly useful for the hwdetect script)

	JS::RootedValue settings(cx);
	scriptInterface.Eval("({})", &settings);

	scriptInterface.SetProperty(settings, "os_unix", OS_UNIX);
	scriptInterface.SetProperty(settings, "os_bsd", OS_BSD);
	scriptInterface.SetProperty(settings, "os_linux", OS_LINUX);
	scriptInterface.SetProperty(settings, "os_android", OS_ANDROID);
	scriptInterface.SetProperty(settings, "os_macosx", OS_MACOSX);
	scriptInterface.SetProperty(settings, "os_win", OS_WIN);

	scriptInterface.SetProperty(settings, "arch_ia32", ARCH_IA32);
	scriptInterface.SetProperty(settings, "arch_amd64", ARCH_AMD64);
	scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM);
	scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64);

#ifdef NDEBUG
	scriptInterface.SetProperty(settings, "build_debug", 0);
#else
	scriptInterface.SetProperty(settings, "build_debug", 1);
#endif
	scriptInterface.SetProperty(settings, "build_opengles", CONFIG2_GLES);

	scriptInterface.SetProperty(settings, "build_datetime", std::string(__DATE__ " " __TIME__));
	scriptInterface.SetProperty(settings, "build_revision", std::wstring(svn_revision));

	scriptInterface.SetProperty(settings, "build_msc", (int)MSC_VERSION);
	scriptInterface.SetProperty(settings, "build_icc", (int)ICC_VERSION);
	scriptInterface.SetProperty(settings, "build_gcc", (int)GCC_VERSION);
	scriptInterface.SetProperty(settings, "build_clang", (int)CLANG_VERSION);

	scriptInterface.SetProperty(settings, "gfx_card", gfx::CardName());
	scriptInterface.SetProperty(settings, "gfx_drv_ver", gfx::DriverInfo());

	scriptInterface.SetProperty(settings, "snd_card", std::wstring(snd_card));
	scriptInterface.SetProperty(settings, "snd_drv_ver", std::wstring(snd_drv_ver));

	ReportGLLimits(scriptInterface, settings);

	scriptInterface.SetProperty(settings, "video_xres", g_VideoMode.GetXRes());
	scriptInterface.SetProperty(settings, "video_yres", g_VideoMode.GetYRes());
	scriptInterface.SetProperty(settings, "video_bpp", g_VideoMode.GetBPP());

	scriptInterface.SetProperty(settings, "video_desktop_xres", g_VideoMode.GetDesktopXRes());
	scriptInterface.SetProperty(settings, "video_desktop_yres", g_VideoMode.GetDesktopYRes());
	scriptInterface.SetProperty(settings, "video_desktop_bpp", g_VideoMode.GetDesktopBPP());
	scriptInterface.SetProperty(settings, "video_desktop_freq", g_VideoMode.GetDesktopFreq());

	struct utsname un;
	uname(&un);
	scriptInterface.SetProperty(settings, "uname_sysname", std::string(un.sysname));
	scriptInterface.SetProperty(settings, "uname_release", std::string(un.release));
	scriptInterface.SetProperty(settings, "uname_version", std::string(un.version));
	scriptInterface.SetProperty(settings, "uname_machine", std::string(un.machine));

#if OS_LINUX
	{
		std::ifstream ifs("/etc/lsb-release");
		if (ifs.good())
		{
			std::string str((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
			scriptInterface.SetProperty(settings, "linux_release", str);
		}
	}
#endif

	scriptInterface.SetProperty(settings, "cpu_identifier", std::string(cpu_IdentifierString()));
	scriptInterface.SetProperty(settings, "cpu_frequency", os_cpu_ClockFrequency());
	scriptInterface.SetProperty(settings, "cpu_pagesize", (u32)os_cpu_PageSize());
	scriptInterface.SetProperty(settings, "cpu_largepagesize", (u32)os_cpu_LargePageSize());
	scriptInterface.SetProperty(settings, "cpu_numprocs", (u32)os_cpu_NumProcessors());
#if ARCH_X86_X64
	scriptInterface.SetProperty(settings, "cpu_numpackages", (u32)topology::NumPackages());
	scriptInterface.SetProperty(settings, "cpu_coresperpackage", (u32)topology::CoresPerPackage());
	scriptInterface.SetProperty(settings, "cpu_logicalpercore", (u32)topology::LogicalPerCore());
	scriptInterface.SetProperty(settings, "cpu_numcaches", (u32)topology::NumCaches());
#endif

	scriptInterface.SetProperty(settings, "numa_numnodes", (u32)numa_NumNodes());
	scriptInterface.SetProperty(settings, "numa_factor", numa_Factor());
	scriptInterface.SetProperty(settings, "numa_interleaved", numa_IsMemoryInterleaved());

	scriptInterface.SetProperty(settings, "ram_total", (u32)os_cpu_MemorySize());
	scriptInterface.SetProperty(settings, "ram_total_os", (u32)os_cpu_QueryMemorySize());
	scriptInterface.SetProperty(settings, "ram_free", (u32)os_cpu_MemoryAvailable());

#if ARCH_X86_X64
	scriptInterface.SetProperty(settings, "x86_frequency", x86_x64::ClockFrequency());

	scriptInterface.SetProperty(settings, "x86_vendor", (u32)x86_x64::Vendor());
	scriptInterface.SetProperty(settings, "x86_model", (u32)x86_x64::Model());
	scriptInterface.SetProperty(settings, "x86_family", (u32)x86_x64::Family());

	u32 caps0, caps1, caps2, caps3;
	x86_x64::GetCapBits(&caps0, &caps1, &caps2, &caps3);
	scriptInterface.SetProperty(settings, "x86_caps[0]", caps0);
	scriptInterface.SetProperty(settings, "x86_caps[1]", caps1);
	scriptInterface.SetProperty(settings, "x86_caps[2]", caps2);
	scriptInterface.SetProperty(settings, "x86_caps[3]", caps3);

	JS::RootedValue tmpVal(cx);
	ConvertCaches(scriptInterface, x86_x64::L1I, &tmpVal);
	scriptInterface.SetProperty(settings, "x86_icaches", tmpVal);
	ConvertCaches(scriptInterface, x86_x64::L1D, &tmpVal);
	scriptInterface.SetProperty(settings, "x86_dcaches", tmpVal);
	ConvertTLBs(scriptInterface, &tmpVal);
	scriptInterface.SetProperty(settings, "x86_tlbs", tmpVal);
#endif

	scriptInterface.SetProperty(settings, "timer_resolution", timer_Resolution());

	// Send the same data to the reporting system
	g_UserReporter.SubmitReport("hwdetect", 11, scriptInterface.StringifyJSON(&settings, false));

	// Run the detection script:
	JS::RootedValue global(cx, scriptInterface.GetGlobalObject());
	scriptInterface.CallFunctionVoid(global, "RunHardwareDetection", settings);
}
Пример #12
0
//------------------------------------------------------------------------------
// CUISiegeWarfareDoc::StartEffect
// Explain:  
// Date : 2005-07-13,Author: Lee Ki-hwan
//------------------------------------------------------------------------------
void CUISiegeWarfareDoc::StartEffect( SLONG slCharIndex, CEntity* penEntity, SBYTE sbJoinFlag, int nGuildIndex )
{
	CTString strEffectName;
	
	// 메라크
	if( IsWar() )
	{	
		if( m_mapEG.find( slCharIndex ) != m_mapEG.end() ) return; // 이미 존재 하는가?
		if( sbJoinFlag == WCJF_NONE || sbJoinFlag <= -1 ) return;
		if( slCharIndex == -1 ) return;
		if( penEntity == NULL ) return;
		
		// 용병인 경우에는... 길드 Index가 -1로 옵니다. 그래서 에러 체크 제거~
		//if( nGuildIndex == -1 ) return;
		
		switch( sbJoinFlag )
		{
			// 수성길드
		case WCJF_OWNER:
			strEffectName = "cpp_gb_defens";
			break;
			
			// 수성측길드
		case WCJF_DEFENSE_GUILD:
		case WCJF_DEFENSE_CHAR:
			strEffectName = "cpp_gb_blue";
			break;
			
			// 공성측 길드
		case WCJF_ATTACK_GUILD:
		case WCJF_ATTACK_CHAR:
			{
				strEffectName = "cpp_gb_red";
				if( nGuildIndex != -1 && nGuildIndex == _pNetwork->MyCharacterInfo.lGuildIndex )
				{
					strEffectName = "cpp_gb_guild";
					break;
				}

				if( IsBattle() ) // 수성전
				{
					for( int i =0 ; i < 3; i++ )
					{
						if( nGuildIndex == m_gdGuild[i].m_nGuildIndex )
						{
							strEffectName = "cpp_gb_attack";
							break;
						}
					}
				}
			}
			break;
			
		default :
			return;
		}
	}
	// WSS_DRATAN_SEIGEWARFARE 2007/08/30 --------------------------->>
	// 드라탄
	else if( CUIManager::getSingleton()->GetSiegeWarfareNew()->GetWarState())
	{
		if( m_mapEG.find( slCharIndex ) != m_mapEG.end() ) return; // 이미 존재 하는가?
		if( sbJoinFlag == WCJF_NONE || sbJoinFlag <= -1 ) return;
		if( slCharIndex == -1 ) return;
		if( penEntity == NULL ) return;
		
		switch( sbJoinFlag )
		{
			// 수성 길드
		case WCJF_OWNER:
		case WCJF_DEFENSE_GUILD: // WSS_DRATAN_SIEGEWARFARE 2007/10/1
		case WCJF_DEFENSE_CHAR:
			{
				if(_pNetwork->MyCharacterInfo.lGuildIndex == nGuildIndex) strEffectName = "DEFFEND_FORCE_OUR";	
				else strEffectName = "DEFFEND_FORCE_OTHER";
			}
			break;		
			
			// 공성 길드
		case WCJF_ATTACK_GUILD:
			{
				if(_pNetwork->MyCharacterInfo.lGuildIndex == nGuildIndex) strEffectName = "ATTACK_FORCE_OUR";
				else strEffectName = "ATTACK_FORCE_OTHER";				
			}
			break;
			
		default :
			return;
		}

	}
	// 기타
	else return;
	// --------------------------------------------------------------<<

	
	// Start Effect
	CEffectGroup *pEG = StartEffectGroup( strEffectName
		, &penEntity->en_pmiModelInstance->m_tmSkaTagManager
		,_pTimer->GetLerpedCurrentTick());
	
	std::map<SLONG, CEffectGroup *>::value_type tmpVal( slCharIndex, pEG);
	m_mapEG.insert(tmpVal);
}