node *LVARparam( node *arg_node, info *arg_info) { char *var_name; DBUG_ENTER("LVARparam"); VAR_DECL( PARAM_ID( arg_node)) = arg_node; var_name = VAR_NAME( PARAM_ID( arg_node)); /* check for duplicated variable declaration */ if(hashmap_contains(arg_info->local, var_name)) { CTIerror(":%d: error: '%s' has already been defined in this context", NODE_LINE(arg_node), var_name); CTIerror(":%d: error: location of earlier definition", NODE_LINE((node *)hashmap_get(arg_info->local, var_name))); DBUG_RETURN(arg_node); } /* add local variabele declaration to hashmap */ hashmap_add(arg_info->local, var_name, arg_node); DBUG_RETURN(arg_node); }
void WorldAccount::AddRoleSet(class PacketUserData* pPkt) { ParamPool* pPool = GetRoleSet( pPkt->nIndex ); if(!pPool) { if(!m_pRecentRoleSet) { int64 nRecentDID = PARAM_GET_VALUE( m_pRecentRoleSet, avatardid, int64(0)); if( nRecentDID == pPkt->nAvatarDID) { SetRoleSet( pPkt->nIndex, m_pRecentRoleSet); m_pRecentRoleSet = NULL; return; } } pPool = CreateRoleSet( pPkt->nIndex, PARAM_ID( pPkt->m_nParamType), PARAM_DATA_ID( pPkt->m_nParamType)); if(!pPool) return; } pPkt->UpdateParamPool( pPool ); if(pPkt->nAvatarDID != -1) pPool->SetValue( "avatardid", pPkt->nAvatarDID); }