int main()
{
	Human human1 = Human();
	Human human2 = Human("Athinodoros", "Fafoutis", 26);
	Human maxHuman = Max(human1, human2);
	cout << maxHuman.GetName() << " " << maxHuman.GetSurname();
	system("PAUSE");
    return 0;
}
Example #2
0
/*******************************************************************************************************
* HUMAN STATS - returns the vital statistics for the human player
*******************************************************************************************************/
void HumanStats(Human & HumanObj)
{
	std::cout << "\n   *------------------------------------------------------------*" << std::endl;
	std::cout << "   | Status for the human named * " << HumanObj.GetName() << " *" << std::endl;
	std::cout << "   *------------------------------------------------------------*" << std::endl;
	std::cout << "   |  - Health:       " << HumanObj.GetHealth() << std::endl;
	std::cout << "   |  - Strength:     " << HumanObj.GetStrength() << std::endl;
	std::cout << "   |  - Luck:         " << HumanObj.GetLuck() << std::endl;
	std::cout << "   |  - Intelligence: " << HumanObj.GetIntelligence() << std::endl;
	std::cout << "   *------------------------------------------------------------*" << std::endl;
}
Example #3
0
uint CGMyEquipHandler::Execute( CGMyEquip* pPacket, Player* pPlayer )
{
__ENTER_FUNCTION

	GamePlayer* pGamePlayer = (GamePlayer*)pPlayer ;
	Assert( pGamePlayer ) ;

	Human* pHuman = pGamePlayer->GetHuman() ;
	Assert( pHuman ) ;

	Scene* pScene = pHuman->getScene() ;
	Assert( pScene ) ;

	//检查线程执行资源是否正确
	Assert( MyGetCurrentThreadID()==pScene->m_ThreadID ) ;

	ObjID_t ObjID = pHuman->GetID() ;
	if( ObjID != pPacket->getObjID() )
	{
		Assert(FALSE) ;
		return PACKET_EXE_ERROR ;
	}

	GCMyEquip Msg ;
	Msg.setObjID( ObjID ) ;
	Msg.setName( pHuman->GetName() ) ;
	Msg.setDirectory( pHuman->getDir() ) ;
//其他信息设置

	pGamePlayer->SendPacket( &Msg ) ;

	g_pLog->FastSaveLog( LOG_FILE_1, "CGMyEquipHandler::ObjID=%d\r\n", ObjID ) ;


	return PACKET_EXE_CONTINUE ;

__LEAVE_FUNCTION

	return PACKET_EXE_ERROR ;
}