• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetIntParam函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetIntParam函数的典型用法代码示例。如果您正苦于以下问题:C++ GetIntParam函数的具体用法?C++ GetIntParam怎么用?C++ GetIntParam使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetIntParam函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TransforCamera

double CScript::TransforCamera(const char* cmd, char* retStr)
{
	int nRet = 0;
	//变化方式
	long lTransforMode = static_cast<long>(GetIntParam(cmd, 0));
	if( lTransforMode != ERROR_CODE && lTransforMode != INVILID_VALUE )
	{
		long lParam1 = static_cast<long>(GetIntParam(cmd, 1));
		long lParam2 = static_cast<long>(GetIntParam(cmd, 2));
		long lParam3 = static_cast<long>(GetIntParam(cmd, 3));
		if( lParam1 != ERROR_CODE && lParam1 != INVILID_VALUE && 
			lParam2 != ERROR_CODE && lParam2 != INVILID_VALUE &&
			lParam3 != ERROR_CODE && lParam3 != INVILID_VALUE)
		{
			CPlayer* pPlayer = dynamic_cast<CPlayer*>(p_SrcShape);
			if( pPlayer )
			{
				CMessage msg(MSG_S2C_OTHER_TRANSFORCAMERA);
				msg.Add(lTransforMode);
				msg.Add(lParam1);
				msg.Add(lParam2);
				msg.Add(lParam3);
				msg.SendToPlayer(pPlayer->GetExID());
				nRet = 1;
			}
		}
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:29,代码来源:ClientViewFun.cpp


示例2: GetStringParam

double CScript::SetDelTimeByGuid(const char* cmd, char* retStr)
{
	if(!p_SrcShape) return -1.0f;

	char* szGUID = GetStringParam(cmd, 0); 
	int type=GetIntParam(cmd,1);
	int iDelTime= GetIntParam(cmd,2);

	if (szGUID==NULL || 
		type== ERROR_CODE || type== INVILID_VALUE)
	{
		M_FREE( szGUID, sizeof(char)*MAX_VAR_LEN );
		return 0;
	}
	if (iDelTime== ERROR_CODE || iDelTime== INVILID_VALUE)
	{
		iDelTime=0;
	}


	CGUID monsterGUID = GetVariableList()->GetGuidValue(szGUID);
	CServerRegion* pRegion=dynamic_cast<CServerRegion*>(p_SrcShape->GetFather());
	if (pRegion!= NULL)
	{
		CMoveShape* pMoveShape= dynamic_cast<CMoveShape*>(pRegion->FindChildObject(type,monsterGUID));
		if (pMoveShape!= NULL)
		{
			pMoveShape->AddDelEvent(iDelTime);
		}
	}
	M_FREE( szGUID, sizeof(char)*MAX_VAR_LEN );
	return 0;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:33,代码来源:MoveShapeFun.cpp


示例3: HourDiff

double CScript::HourDiff(const char* CmdStr, char* retStr)
{
    double lTime1=GetIntParam(CmdStr, 0);
    double lTime2=GetIntParam(CmdStr, 1);
    tm Time1;
    tm Time2;
    time_t	tTime1;
    time_t	tTime2;

    //从参数提取第一个时间
    Time1.tm_year=((long)lTime1)>>3>>6>>5>>5>>4;
    Time1.tm_mon=(((long)lTime1)>>3>>6>>5>>5)&15;
    Time1.tm_mday=(((long)lTime1)>>3>>6>>5)&31;
    Time1.tm_hour=(((long)lTime1)>>3>>6)&31;
    Time1.tm_min=(((long)lTime1)>>3)&63;
    tTime1=mktime(&Time1);

    if(lTime2==ERROR_CODE)
    {
        //如果没有第二参数,则取当前时间
        time(&tTime2);
    }
    else
    {
        //如果有第二时间,则转换为time_t
        Time2.tm_year=((long)lTime2)>>3>>6>>5>>5>>4;
        Time2.tm_mon=(((long)lTime2)>>3>>6>>5>>5)&15;
        Time2.tm_mday=(((long)lTime2)>>3>>6>>5)&31;
        Time2.tm_hour=(((long)lTime2)>>3>>6)&31;
        Time2.tm_min=(((long)lTime2)>>3)&63;
        tTime2=mktime(&Time2);
    }
    return (int)difftime(tTime2,tTime1)/3600;	//一小时3600秒
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:34,代码来源:BaseFun.cpp


示例4: GetStringParam

double CScript::SendWorldCredit(const char* CmdStr, char* retStr)
{
	char* strName = GetStringParam(CmdStr,0);  
	DWORD lCredit = GetIntParam(CmdStr,1);
	DWORD lWorldCredit = GetIntParam(CmdStr,2);

	CMessage msg(MSG_S2C_LOTTERY_MaxTodayPoint);
	msg.Add( (long)lCredit );	
	msg.Add( (char*)strName );	
	msg.SendToPlayer(((CPlayer*)p_SrcShape)->GetExID());	// 发送到客户端

	CMessage msgEx(MSG_S2C_LOTTERY_WorldPoint);
	msgEx.Add( (long)lWorldCredit );	
	msgEx.SendToPlayer(((CPlayer*)p_SrcShape)->GetExID());

	CMessage msgToWSCredit(MSG_S2W_LOTTERY_CHANGEWORLDCREDIT);
	msgToWSCredit.Add((long)lWorldCredit);
	msgToWSCredit.Send();

	CMessage msgToWSName(MSG_S2W_LOTTERY_CHANGEPRECEDE);
	msgToWSName.Add((long)lCredit);
	msgToWSName.Add((char*)strName);
	msgToWSName.Send();
	return 0;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:25,代码来源:LotteryFun.cpp


示例5: GetStringParam

double CScript::PlayVideo(const char* CmdStr, char* retStr)
{
	double ret = 0;	
	char* strFileName = GetStringParam(CmdStr,0);
	long  lLoop = GetIntParam(CmdStr,1);
	long  lX	= GetIntParam(CmdStr,2);
	long  lY	= GetIntParam(CmdStr,3);
	long  lWidth = GetIntParam(CmdStr,4);
	long  lHeight = GetIntParam(CmdStr,5);
	if (p_SrcShape!=NULL && strFileName!=NULL   && lLoop!=ERROR_CODE && lLoop!=INVILID_VALUE 
		&& lX!=ERROR_CODE && lX!=INVILID_VALUE 
		&& lY!=ERROR_CODE && lY!=INVILID_VALUE
		&& lWidth!=ERROR_CODE && lWidth!=INVILID_VALUE
		&& lHeight!=ERROR_CODE && lHeight!=INVILID_VALUE)
	{
		CMessage msg(MSG_S2C_OTHER_PLAY_VIDEO);
		msg.Add(strFileName);
		msg.Add(lLoop);
		msg.Add(lX);
		msg.Add(lY);
		msg.Add(lWidth);
		msg.Add(lHeight);
		msg.SendToPlayer(p_SrcShape->GetExID());
		ret = 1;
	}

	M_FREE( strFileName, sizeof(char)*MAX_VAR_LEN );
	return ret;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:29,代码来源:ClientViewFun.cpp


示例6: AddSkillToShortCutBar

double CScript::AddSkillToShortCutBar(const char* cmd, char* retStr)
{
	long nRet = 0;
	DWORD dwSkillID = static_cast<DWORD>(GetIntParam(cmd, 0));
	if( dwSkillID != ERROR_CODE && dwSkillID != INVILID_VALUE )
	{
		long  nBarNo = static_cast<long>(GetIntParam(cmd, 1));
		if( nBarNo != ERROR_CODE && nBarNo != INVILID_VALUE)
		{
			CPlayer* pPlayer = dynamic_cast<CPlayer*>(p_SrcShape);
			if( pPlayer && pPlayer->CheckSkill(dwSkillID) )
			{
				dwSkillID = dwSkillID|0x80000000;
				pPlayer->SetHotKey(nBarNo,dwSkillID);

				CMessage msg(MSG_S2C_SETHOTKEY);
				msg.Add((char)HOTKEY_SET_SUCCEED);
				msg.Add((BYTE)nBarNo);
				msg.Add(dwSkillID);
				msg.SendToPlayer(pPlayer->GetExID());

				nRet = 1;
			}
		}
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:27,代码来源:ClientViewFun.cpp


示例7: GetIntParam

double CScript::ShowString(const char* cmd, char* retStr)
{
	CPlayer *pPlayer = dynamic_cast<CPlayer*>(p_SrcShape);
	if(NULL == pPlayer) return -1;

	LONG lScreenPosX = GetIntParam(cmd, 0);
	LONG lScreenPosY = GetIntParam(cmd, 1);

	char* pString = GetStringParam( cmd, 2 );
	if(NULL == pString) return -1;

	LONG lIsShow = GetIntParam(cmd, 3);
	CMessage msg(MSG_S2C_OTHER_SHOW_STRING);
	msg.Add(lIsShow);
	if(0 != lIsShow)
	{
		msg.Add(lScreenPosX);
		msg.Add(lScreenPosY);
		msg.Add(pString);
	}
	msg.SendToPlayer(pPlayer->GetExID(), false);

	M_FREE( pString, sizeof(char)*MAX_VAR_LEN );
	return 1;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:25,代码来源:ClientViewFun.cpp


示例8: RegisterTimer

//为当前对象注册一个定时器
double CScript::RegisterTimer(const char* cmd, char* retStr)
{
	int nRet = 0;
	long lfuturetime = static_cast<long>(GetIntParam(cmd, 0));
	if(lfuturetime != ERROR_CODE && lfuturetime != INVILID_VALUE)
	{
		long lInterTime = static_cast<long>(GetIntParam(cmd, 1));
		if(lInterTime != ERROR_CODE && lInterTime != INVILID_VALUE)
		{
			char* pszScriptName=GetStringParam(cmd,2);
			if( pszScriptName )
			{
				long lUserData = static_cast<long>(GetIntParam(cmd, 3));
				if(lUserData != ERROR_CODE && lUserData != INVILID_VALUE)
				{
					CMoveShape* pMoveShape = dynamic_cast<CMoveShape*>(p_SrcShape);
					if( pMoveShape )
					{
						//添加提示
						nRet = pMoveShape->RegisterScriptTimer(lfuturetime,lInterTime,
							pszScriptName,lUserData);
					}
				}
				M_FREE( pszScriptName, sizeof(char)*MAX_VAR_LEN );
			}
		}
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:30,代码来源:MoveShapeFun.cpp


示例9: PlayMotion

//播放表情
double CScript::PlayMotion(const char* cmd, char* retStr)
{
	int nRet = 0;
	long lMotionNum  = static_cast<long>(GetIntParam(cmd, 0));
	if(lMotionNum != ERROR_CODE && lMotionNum != INVILID_VALUE)
	{
		long lAround = static_cast<long>(GetIntParam(cmd, 1));
		if(lAround != ERROR_CODE && lAround != INVILID_VALUE)
		{
			if( p_SrcShape )
			{			
				CMessage msg( MSG_S2C_SHAPE_EMOTION );
				msg.Add( p_SrcShape->GetType() );
				msg.Add( p_SrcShape->GetExID() );
				msg.Add( lMotionNum );
				//发送给周围玩家
				if(lAround)
				{
					msg.SendToAround(p_SrcShape);
				}
				else if(p_SrcShape->GetType() == TYPE_PLAYER)
				{
					msg.SendToPlayer(p_SrcShape->GetExID());
				}
			}
		}
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:30,代码来源:MoveShapeFun.cpp


示例10: InterfaceHint

//界面帮助提示
double CScript::InterfaceHint(const char* cmd, char* retStr)
{
	int nRet = 0;
	char* pszScriptName=GetStringParam(cmd,0);
	if( pszScriptName )
	{
		long lFutureDelTime = static_cast<long>(GetIntParam(cmd, 1));
		if( lFutureDelTime != ERROR_CODE && lFutureDelTime != INVILID_VALUE )
		{
			char* pszInterfaceName=GetStringParam(cmd,2);
			if( pszInterfaceName )
			{
				long lX = static_cast<long>(GetIntParam(cmd, 3));
				long lY = static_cast<long>(GetIntParam(cmd, 4));
				long lWidth = static_cast<long>(GetIntParam(cmd, 5));
				long lHeight = static_cast<long>(GetIntParam(cmd, 6));
				if(lX != ERROR_CODE && lX != INVILID_VALUE &&
					lY != ERROR_CODE && lY != INVILID_VALUE &&
					lWidth != ERROR_CODE && lWidth != INVILID_VALUE &&
					lHeight != ERROR_CODE && lHeight != INVILID_VALUE)
				{
					CPlayer* pPlayer = dynamic_cast<CPlayer*>(p_SrcShape);
					if( pPlayer )
					{
						//添加提示
						nRet = pPlayer->AddInterfaceHint(pszScriptName,lFutureDelTime,pszInterfaceName,lX,lY,lWidth,lHeight);
					}
				}
				M_FREE( pszInterfaceName, sizeof(char)*MAX_VAR_LEN );
			}
		}
		M_FREE( pszScriptName, sizeof(char)*MAX_VAR_LEN );
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:36,代码来源:ClientViewFun.cpp


示例11: Read_Rmdir_Config

int Read_Rmdir_Config( config_file_t config, void *module_config, char *msg_out, int for_reload )
{
    int            rc;
    bool           bval;
    rmdir_config_t *conf = ( rmdir_config_t * ) module_config;

    static const char * rmdir_allowed[] =
    {
        "runtime_interval", "nb_threads_rmdir", "rmdir_queue_size", NULL
    };

    /* get RMDIR_PARAM block */

    config_item_t  param_block = rh_config_FindItemByName( config, RMDIR_PARAM_BLOCK );
    if ( param_block == NULL )
      {
          /* no error, because no parameter is mandatory */
          return 0;
      }

    /* check this is a block... */
    if ( rh_config_ItemType( param_block ) != CONFIG_ITEM_BLOCK )
      {
          strcpy( msg_out, "A block is expected for '" RMDIR_PARAM_BLOCK "' item" );
          return EINVAL;
      }

    /* parse parameters */
    rc = GetDurationParam(param_block, RMDIR_PARAM_BLOCK, "runtime_interval",
                          INT_PARAM_POSITIVE | INT_PARAM_NOT_NULL,
                          &conf->runtime_interval, NULL, NULL, msg_out);
    if ((rc != 0) && (rc != ENOENT))
        return rc;

    rc = GetIntParam( param_block, RMDIR_PARAM_BLOCK, "nb_threads_rmdir",
                      INT_PARAM_POSITIVE | INT_PARAM_NOT_NULL, ( int * ) &conf->nb_threads_rmdir,
                      NULL, NULL, msg_out );
    if ( ( rc != 0 ) && ( rc != ENOENT ) )
        return rc;

    rc = GetIntParam( param_block, RMDIR_PARAM_BLOCK, "rmdir_queue_size",
                      INT_PARAM_POSITIVE | INT_PARAM_NOT_NULL, ( int * ) &conf->rmdir_queue_size,
                      NULL, NULL, msg_out );
    if ( ( rc != 0 ) && ( rc != ENOENT ) )
        return rc;

    rc = GetBoolParam(param_block, RMDIR_PARAM_BLOCK, "simulation_mode",
                      0, &bval, NULL, NULL, msg_out);
    if (rc != ENOENT)
    {
        DisplayLog( LVL_EVENT, "RmdirConfig",
            "WARNING: deprecated parameter 'simulation_mode'. Use '--dry-run' option instead.");
    }

    CheckUnknownParameters( param_block, RMDIR_PARAM_BLOCK, rmdir_allowed );

    return 0;

}
开发者ID:seagate-ssg,项目名称:robinhood,代码行数:59,代码来源:rmdir_config.c


示例12: GetIntParam

double CScript::Rgb(const char* CmdStr, char* retStr)
{
    LONG	nRed	= GetIntParam( CmdStr, 0 );
    LONG	nGreen	= GetIntParam( CmdStr, 1 );
    LONG	nBlue	= GetIntParam( CmdStr, 2 );
    DWORD	dwColor	= 0xff000000 | ( (nRed & 0xff) << 16 ) | ( (nGreen & 0xff) << 8 ) | ( nBlue & 0xff );
    return	dwColor;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:8,代码来源:BaseFun.cpp


示例13: GetIntParam

double CScript::ChangeAttr(const char* CmdStr, char* retStr)
{
	OBJECT_TYPE type;
	CGUID id;
	double value  = 0;
	double ret = INVILID_VALUE;

	int param = GetIntParam(CmdStr, 0);
	if(param != ERROR_CODE && param != INVILID_VALUE)
	{
		type = (OBJECT_TYPE)param;

		char* pIdName = GetStringParam(CmdStr, 1);
		if(NULL == pIdName) return ret;
		id = GetVariableList()->GetGuidValue(pIdName);
		if(id == NULL_GUID)
			id = GetGeneralVariableList()->GetGuidValue(pIdName);
		if(id == NULL_GUID)
			id = ((CPlayer*)p_SrcShape)->GetVariableList()->GetGuidValue(pIdName);

		CMoveShape* shape = GetGame()->FindShape(type, id);

		char* name = GetStringParam(CmdStr, 2);
		if(name)
		{
			value = GetIntParam(CmdStr, 3);
			if(value != ERROR_CODE && value != INVILID_VALUE)
			{

				if(NULL == shape) // 默认id=0时,直接调用SrcShape的SetAttr接口
				{
					CShape* cShape = GetSrcShape();
					if(cShape)
					{
						((CMoveShape*)cShape)->ChangeAttribute(string(name), value);
						((CMoveShape*)cShape)->UpdateAttribute();
						ret = 1;
					}
				}
				else
				{
					shape->ChangeAttribute(string(name), value);
					shape->UpdateAttribute();
					ret = 1;
				}
			}
		}

		M_FREE( pIdName, sizeof(char)*MAX_VAR_LEN );
		M_FREE( name, sizeof(char)*MAX_VAR_LEN );
	}
	else // 参数是字符串
	{
		AddErrorLogText(CStringReading::LoadString(IDS_GS_FUNCTION, STR_GS_FUNCTION_CHANGEATTRFIRSTVARISSTRING));
	}

	return ret;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:58,代码来源:MoveShapeFun.cpp


示例14: GetDoor

double CScript::GetDoor(const char* cmd, char* retStr)
{
    char *strTemp=GetStringParam(cmd,0);
    if (strTemp)
    {
        long id=GetIntParam(cmd,1);
        double dRegion=GetIntParam(cmd,2);
        if (id!=ERROR_CODE)
        {
            CServerRegion* pRegion=NULL;
            if (dRegion!=ERROR_CODE)
            {
                pRegion = GameManager::GetInstance()->GetRgnManager()->FindRgnByTemplateID(RGN_NORMAL, dRegion);
                if(pRegion == NULL)
                    pRegion = GameManager::GetInstance()->GetRgnManager()->FindRgnByTemplateID(RGN_PERSONAL, dRegion);
                if(pRegion == NULL)
                    pRegion = GameManager::GetInstance()->GetRgnManager()->FindRgnByTemplateID(RGN_PERSONAL_HOUSE, dRegion);
                if(pRegion == NULL)
                    pRegion = GameManager::GetInstance()->GetRgnManager()->FindRgnByTemplateID(RGN_TEAM, dRegion);
            }
            else
            {
                CPlayer *pPlayer=dynamic_cast<CPlayer*>(p_SrcShape);
                if(pPlayer)
                    pRegion=dynamic_cast<CServerRegion*>(pPlayer->GetFather());
            }
            if (pRegion)
            {
                if (strcmp("State",strTemp)==0)
                {
                    M_FREE( strTemp, sizeof(char)*MAX_VAR_LEN );
                    return pRegion->GetDoorState(id);
                }
                else if (strcmp("Switch",strTemp)==0)
                {
                    M_FREE( strTemp, sizeof(char)*MAX_VAR_LEN );
                    return pRegion->GetDoorDestroySwitch(id);
                }
                else if (strcmp("Hp",strTemp)==0)
                {
                    M_FREE( strTemp, sizeof(char)*MAX_VAR_LEN );
                    return pRegion->GetDoorHP(id);
                }
                else if (strcmp("MaxHp",strTemp)==0)
                {
                    M_FREE( strTemp, sizeof(char)*MAX_VAR_LEN );
                    return pRegion->GetDoorMaxHP(id);
                }
            }
        }
        M_FREE( strTemp, sizeof(char)*MAX_VAR_LEN );
    }
    return 0;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:54,代码来源:OtherShape.cpp


示例15: GetPow

double CScript::GetPow(const char* CmdStr, char* retSt)
{
    double lX=GetIntParam(CmdStr, 0);
    if(ERROR_CODE == lX)
        return -1.0f;

    double lY=GetIntParam(CmdStr, 1);
    if(ERROR_CODE == lY)
        return -1.0f;

    double llRet = std::pow(lX, lY);
    return llRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:13,代码来源:BaseFun.cpp


示例16: GetSerialPort

void RaceAnalyzerComm::readAccelConfig(AccelConfig *config){
	CComm *serialPort = GetSerialPort();
	if (NULL==serialPort) throw CommException(CommException::OPEN_PORT_FAILED);

	for (int i = 0; i < CONFIG_ACCEL_CHANNELS; i++){
		AccelConfig &accelConfig = (config[i]);
		wxString cmd = wxString::Format("getAccelCfg %d",i);
		wxString rsp = SendCommand(serialPort,cmd);
		populateChannelConfig(accelConfig.channelConfig,rsp);
		accelConfig.mode = (accel_mode_t)GetIntParam(rsp,"mode");
		accelConfig.channel = (accel_channel_t)GetIntParam(rsp,"channel");
		accelConfig.zeroValue = GetIntParam(rsp,"zeroValue");
	}
}
开发者ID:autosportlabs,项目名称:RaceAnalyzer,代码行数:14,代码来源:comm.cpp


示例17: RoundNum

double CScript::RoundNum(const char* cmd, char* retStr)
{
    double lValue =GetIntParam(cmd, 0);
    if(lValue == ERROR_CODE)
        return 0;
    return Round(lValue);
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:7,代码来源:BaseFun.cpp


示例18: GetFather

//------//返回执行者周围一定范围内的同类怪物数量
double	CScript::GetSameMonsterNumByAround(const char* cmd, char* retStr)
{
	CMonster* pMonster= dynamic_cast<CMonster*>(p_SrcShape);
	if (pMonster == NULL)	return -1;

	CServerRegion* pRegion = dynamic_cast<CServerRegion*>( pMonster -> GetFather() );
	if( pRegion == NULL ) return -1;

	double range= GetIntParam(cmd,0);
	if (range==INVILID_VALUE && range==ERROR_CODE )
	{
		return -1;
	}

	vector<CShape*> vOut;
	pRegion -> FindAroundObject( pMonster, TYPE_MONSTER, vOut );
	int iSameTypeNum=0;
	for (int a=0; a<vOut.size(); a++)
	{
		if (pMonster->Distance(vOut[a]) > range) continue;
		if (pMonster->GetIndex()!= ((CMonster*)vOut[a])->GetIndex()) continue;

		iSameTypeNum++;
	}
	return iSameTypeNum;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:27,代码来源:MoveShapeFun.cpp


示例19: BufferBinding

	BufferName BufferBinding(GLuint index) const
	{
		return BufferName(GetIntParam(
			GL_TRANSFORM_FEEDBACK_BUFFER_BINDING,
			index
		));
	}
开发者ID:Extrunder,项目名称:oglplus,代码行数:7,代码来源:transform_feedback.hpp


示例20: AddGoodToShortCutBar

double CScript::AddGoodToShortCutBar(const char* cmd, char* retStr)
{
	int nRet = 0;

	char* name=GetStringParam(cmd,0);
	if( name )
	{
		CPlayer* pPlayer = dynamic_cast<CPlayer*>(p_SrcShape);
		if(pPlayer)
		{
			CGoods * pGoods = pPlayer->FindGoodInPack(name);
			//如果检测有该物品
			if(pGoods)
			{
				long  nBarNo = static_cast<long>(GetIntParam(cmd, 1));
				if( nBarNo != ERROR_CODE && nBarNo != INVILID_VALUE)
				{
					pPlayer->SetHotKey(nBarNo, pGoods->GetBasePropertiesIndex());

					CMessage msg(MSG_S2C_SETHOTKEY);
					msg.Add((char)HOTKEY_SET_SUCCEED);
					msg.Add((BYTE)nBarNo);
					msg.Add(pGoods->GetBasePropertiesIndex());
					msg.SendToPlayer(pPlayer->GetExID());	
					nRet = 1;
				}
			}
		}
		M_FREE( name, sizeof(char)*MAX_VAR_LEN );
	}
	return nRet;
}
开发者ID:ueverything,项目名称:mmo-resourse,代码行数:32,代码来源:ClientViewFun.cpp



注:本文中的GetIntParam函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetIntValue函数代码示例发布时间:2022-05-30
下一篇:
C++ GetIntFromConfig函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap