From: Andrew C. <ac...@us...> - 2003-01-29 11:12:58
|
Update of /cvsroot/planeshift/planeshift/src/common/psprop/npc In directory sc8-pr-cvs1:/tmp/cvs-serv19444/src/common/psprop/npc Modified Files: dictionary.cpp dictionary.h Log Message: Fixed for find the right trigger using factions. Index: dictionary.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/psprop/npc/dictionary.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dictionary.cpp 21 Jan 2003 07:08:22 -0000 1.7 --- dictionary.cpp 29 Jan 2003 11:12:51 -0000 1.8 *************** *** 218,224 **** key.trigger = trigger; key.priorresponseID = priorresponse; trig = triggers.Find(&key); ! if (!trig) { --- 218,226 ---- key.trigger = trigger; key.priorresponseID = priorresponse; + key.max_attitude = faction; + key.min_attitude = faction; trig = triggers.Find(&key); ! if (!trig) { *************** *** 290,296 **** newresp->it = (*rs)[0]["pronoun_it"]; newresp->them = (*rs)[0]["pronoun_them"]; - responses.Add(newresp,TRUE); // TRUE means tree owns data ! rs->Release(); } --- 292,298 ---- newresp->it = (*rs)[0]["pronoun_it"]; newresp->them = (*rs)[0]["pronoun_them"]; ! responses.Add(newresp,TRUE); // TRUE means tree owns data ! rs->Release(); } Index: dictionary.h =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/psprop/npc/dictionary.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dictionary.h 21 Jan 2003 07:08:22 -0000 1.8 --- dictionary.h 29 Jan 2003 11:12:52 -0000 1.9 *************** *** 86,90 **** int min_attitude; int max_attitude; - int compare_attitude; // key value used only when searching int responseID; --- 86,89 ---- *************** *** 94,100 **** trigger==other.trigger && priorresponseID==other.priorresponseID && ! compare_attitude>=other.min_attitude && ! compare_attitude<=other.max_attitude) ! ; }; --- 93,100 ---- trigger==other.trigger && priorresponseID==other.priorresponseID && ! other.min_attitude>=min_attitude && ! other.max_attitude<=max_attitude); ! ! }; |