All pastes #289211 Raw Edit

Miscellany

public text v1 · immutable
#289211 ·published 2006-12-22 23:25 UTC
rendered paste body
bool CWorldServer::pakGiveQuest ( CWorldClient* thisclient, CPacket* P )
{    
    unsigned int action = GETBYTE((*P),0);
    unsigned int questpart = GETBYTE((*P),1);
    unsigned long int questid = GETDWORD((*P),2);
    if( thisclient->questdebug )
        std::cout << "QuestID: " << questid << std::endl;
    bool qflag = false;
    switch (action)
    {
        case 0x02:
            qflag = DELQuest( thisclient, questid );                
            action = 0x03;            
        break;        
        case 0x03:
            qflag = ADDQuest( thisclient, questid );
            action = 0x05;             
        break;
        default:
            Log(2, MSG_WARNING, "Quest unknown action: %i", action );
    }
    if( qflag == true )
    {
        BEGINPACKET( pak, 0x730);
        ADDBYTE    (pak, action);
        ADDBYTE    (pak, questpart);  
        ADDDWORD   (pak, questid );  
    	thisclient->SendPacket( &pak );    
    }
    return true;
}