From: Luca P. <lpa...@us...> - 2005-11-13 18:19:46
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13201/src/server Modified Files: cachemanager.cpp questmanager.cpp Log Message: Substeps are not notified as completed. Index: cachemanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/cachemanager.cpp,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** cachemanager.cpp 13 Nov 2005 16:21:21 -0000 1.112 --- cachemanager.cpp 13 Nov 2005 18:19:38 -0000 1.113 *************** *** 686,689 **** --- 686,690 ---- ptr = new psQuest; ptr->Init(id,name); + ptr->SetTask(NULL); ptr->SetParentQuest(parentQuest); quests_by_id.Put(id, ptr); Index: questmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/questmanager.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** questmanager.cpp 13 Nov 2005 16:21:21 -0000 1.56 --- questmanager.cpp 13 Nov 2005 18:19:38 -0000 1.57 *************** *** 747,754 **** --- 747,761 ---- { bool ret = who->GetActor()->GetCharacterData()->CompleteQuest(quest); + + // if it's a substep don't send additional info + if (quest->GetParentQuest()) + return false; + if (ret) { psserver->SendSystemOK(who->GetClientNum(),"Quest Completed!"); psserver->SendSystemInfo(who->GetClientNum(),"You have completed the %s quest!", quest->GetName() ); + // TOFIX: we should clean all substeps of this quest from the character_quests db table. + } else { Debug3( LOG_QUESTS, "Cannot complete quest %s for player %d ", |