Rogue iterate

This commit is contained in:
jl777
2019-02-09 22:32:55 -11:00
parent 564a7aece8
commit f16510e7c2
2 changed files with 5 additions and 6 deletions

View File

@@ -1357,10 +1357,9 @@ void rogue_packitemstr(char *packitemstr,struct rogue_packitem *item)
static int32_t didinit;
if ( didinit == 0 )
{
init_names(); /* Set up names of scrolls */
init_colors(); /* Set up colors of potions */
init_stones(); /* Set up stone settings of rings */
init_materials(); /* Set up materials of wands */
struct rogue_state R;
memset(&R,0,sizeof(R));
rogueiterate(&R);
didinit = 1;
}
THING *obj = new_item();

View File

@@ -420,10 +420,10 @@ int32_t rogue_playerdata(struct CCcontract_info *cp,uint256 &origplayergame,CPub
if ( vopret.size() > 34 && script[0] == EVAL_ROGUE && (script[1] == 'H' || script[1] == 'Q' || script[1] == 'S') )
{
memcpy(&gametxid,script+2,sizeof(gametxid));
fprintf(stderr,"got vin.%s gametxid.%s\n",playertx.vin[1].prevout.hash.ToString().c_str(),gametxid.ToString().c_str());
fprintf(stderr,"got vin.%s gametxid.%s iterate.%d valid.%d\n",playertx.vin[1].prevout.hash.ToString().c_str(),gametxid.ToString().c_str(),rogue_iterateplayer(gametxid,playertx.vin[1].prevout.n,playertxid),rogue_isvalidgame(cp,gametx,buyin,maxplayers,gametxid));
// verify highlander is a valid gametxid, verify playertxid is linked to it
//if ( rogue_iterateplayer(highlander,playertx.vin[1].prevout.n,playertxid) == 0 )
//if ( playertx.vin[1].prevout.hash == highlander )
if ( playertx.vin[1].prevout.hash == gametxid )
{
//if ( GetTransaction(highlander,highlandertx,hashBlock,false) != 0 && (numvouts= highlandertx.vout.size()) > 0 )
{