From: Andrew C. <ac...@us...> - 2003-12-01 03:22:37
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1:/tmp/cvs-serv1836/src/server Modified Files: progressionmanager.cpp Log Message: Added 'wallet' location to <item> script. Used to give money. Index: progressionmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/progressionmanager.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** progressionmanager.cpp 19 Nov 2003 20:48:35 -0000 1.41 --- progressionmanager.cpp 1 Dec 2003 03:22:31 -0000 1.42 *************** *** 889,893 **** location = node->GetAttributeValue("location"); stackCount = node->GetAttributeValueAsInt("count"); ! if (location != "" && location != "inventory") { CPrintf("Error:ProgressionEvent(%s) ItemOp Location %s not legal\n",eventName, location.GetData()); --- 889,893 ---- location = node->GetAttributeValue("location"); stackCount = node->GetAttributeValueAsInt("count"); ! if (location != "" && location != "inventory" && location != "wallet") { CPrintf("Error:ProgressionEvent(%s) ItemOp Location %s not legal\n",eventName, location.GetData()); *************** *** 906,910 **** float Run(gemActor * actor, gemObject *target, ProgressionManager *mgr) ! { if (!target) { --- 906,910 ---- float Run(gemActor * actor, gemObject *target, ProgressionManager *mgr) ! { if (!target) { *************** *** 920,923 **** --- 920,943 ---- } + //This is for a player that is given some money + if ( location == "wallet" ) + { + psMoney money; + + if ( name == "trias" ) + money.SetTrias( stackCount ); + if ( name == "hexas" ) + money.SetHexas( stackCount ); + if ( name == "octas" ) + money.SetOctas( stackCount ); + if ( name == "circles" ) + money.SetCircles( stackCount ); + + psMoney charMoney = character->GetMoney(); + charMoney = charMoney + money; + character->SetMoney( charMoney ); + return 0.0f; + } + // Get the ItemStats based on the name provided. psItemStats *itemstats=psserver->cachemanager.GetBasicItemStatsByName(name.GetData()); |