Esempio n. 1
0
int32 ModuleManager::Activate(uint32 itemID, std::string effectName, uint32 targetID, uint32 repeat)
{
    SysLog::Debug("Activate","Needs to be implemented");
    //return 1;

    GenericModule * mod = m_Modules->GetModule(itemID);
    if( mod != NULL )
    {
		if(effectName == "online")
		{
			//ModuleCommand cmd = _translateEffectName(effectName);		// GET RID of this function, effectName should be passed into the module's calls
			mod->online();

			// We should check for "online" here or something else, then either call the mod->Online() or mod->Activate()
			//if(cmd == ONLINE)
		    //    mod->Online();     // this currently fails since m_selectedEffect and m_defaultEffect in the ModuleEffect class are undefined
			//there needs to be more cases here i just don't know what they're called yet
		}
		else
		{
			SystemEntity * targetEntity = this->m_Ship->GetOperator()->GetDestiny()->GetCurrentBubble()->GetEntity(targetID);
			mod->activate(targetEntity);
			m_pLog->Log("ModuleManager::Activate()", "Module '%s' Activating...", mod->getItem()->itemName().c_str());
		}
    }

    return 1;
}
Esempio n. 2
0
void ModuleManager::Online(uint32 itemID)
{
    GenericModule * mod = m_Modules->GetModule(itemID);
    if( mod != NULL )
	{
        mod->online();
		m_pLog->Log("ModuleManager::Online()", "Module '%s' going Online", mod->getItem()->itemName().c_str());
	}
}