bool ChatHandler::HandleQuestRemoveCommand(const char * args, WorldSession * m_session) { if(!*args) return false; Player *plr = getSelectedChar(m_session, true); if(!plr) { plr = m_session->GetPlayer(); SystemMessage(m_session, "Auto-targeting self."); } string recout = ""; uint32 quest_id = atol(args); if(quest_id== 0) { quest_id = GetQuestIDFromLink(args); if(quest_id== 0) return false; } Quest * qst = QuestStorage.LookupEntry(quest_id); if(qst) { recout = RemoveQuestFromPlayer(plr, qst); sGMLog.writefromsession( m_session, "removed quest %u [%s] from player %s%", qst->id, qst->title, plr->GetName() ); } else recout = "Invalid quest selected, unable to remove.\n\n"; SystemMessage(m_session, recout.c_str()); return true; }
bool ChatHandler::HandleQuestRemoveCommand(const char * args, WorldSession * m_session) { if(!*args) return false; Player *plr = getSelectedChar(m_session, true); if(!plr) { plr = m_session->GetPlayer(); SystemMessage(m_session, "Auto-targeting self."); } string recout = ""; uint32 quest_id = atol(args); Quest * qst = QuestStorage.LookupEntry(quest_id); if(qst) recout = RemoveQuestFromPlayer(plr, qst); else recout = "Invalid quest selected, unable to remove.\n\n"; SystemMessage(m_session, recout.c_str()); return true; }