All pastes #796743 Raw Edit

Untitled

public cpp v1 · immutable
#796743 ·published 2007-11-25 10:35 UTC
rendered paste body
bool ChatHandler::HandleActiveQuestsCommand(const char* args){    QuestStatusMap* qmap = m_session->GetPlayer()->getQuestStatusMap();    for(QuestStatusMap::iterator itr=qmap->begin(); itr!=qmap->end(); ++itr)    {        if(itr->second.m_status == QUEST_STATUS_INCOMPLETE)        {            std::ostringstream str;            str << "Quest id #" << itr->first;            QueryResult *result=WorldDatabase.PQuery("SELECT `Title` FROM `quest_template` WHERE `entry`='%u'", itr->first);            if(result)                str << " - " << result->Fetch()[0].GetCppString();            str << " is active.";            PSendSysMessage(str.str().c_str());        }    }    return true;}