All pastes #567833 Raw Edit

Alessio

public cpp v1 · immutable
·published 2007-06-15 04:10 UTC
rendered paste body
bool ChatHandler::HandleNpcExport(const char * args, WorldSession * m_session){	Creature* target = m_session->GetPlayer()->GetMapMgr()->GetCreature(m_session->GetPlayer()->GetSelection());	if (!target)		return false;		std::stringstream name;	if (*args)	{		name << "NPC_" << args << ".sql";	}	else	{		name << "NPC_" << target->GetEntry() << ".sql";	}	target->SaveToFile(name);	BlueSystemMessage(m_session, "Creature/npc saved to: %s", name.str().c_str());	return true;}