当前位置: 首页>>代码示例>>C++>>正文


C++ CGuild类代码示例

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


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

示例1: GetTenderGuildIndexByUser

// 참가 구성원 작성 윈도우 오픈...
void	CGuildCombat1to1Mng::SendMemberLineUpOpenWnd( CUser* pUser )
{
	if( m_nState != GC1TO1_OPEN )
	{
		pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_NOLINEUP );
		return;
	}
	
	int nIndex = GetTenderGuildIndexByUser( pUser );
	if( nIndex == NULL_ID )
	{
		pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_CANNOT_MAKEUP );
		return;
	}
	
	// 길드마스터 또는 킹핀급만 가능
	if( !IsGuildMaster( pUser ) )
	{
		CGuild* pGuild = pUser->GetGuild();
		if( pGuild )
		{
			CGuildMember* pGuildMember = pGuild->GetMember( pUser->m_idPlayer );
			if( pGuildMember->m_nMemberLv != GUD_KINGPIN )
			{
				pUser->AddDefinedText( TID_GAME_GUILDCOMBAT1TO1_NOLINEUPAUTH );
				return;
			}
		}
	}

	pUser->AddGC1to1MemberLineUpOpenWnd( m_vecTenderGuild[nIndex].vecMemberId );
}
开发者ID:iceberry,项目名称:flyffsf,代码行数:33,代码来源:GuildCombat1to1.cpp

示例2: MODULE_AST

//----------------------------------------------------------------------------
void CGuildMemberModule::sendMessageToGuildMembers( const std::string &  msg, const TVectorParamCheck & params )const
{
	MODULE_AST( _GuildMemberCore );
	CGuild * guild = MODULE_CAST<CGuild*>( _GuildMemberCore->getGuild() );
	MODULE_AST( guild );
	guild->sendMessageToGuildMembers( msg,params );
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:8,代码来源:guild_member_module.cpp

示例3: isGuildProxy

bool CGuildMemberModule::isGuildProxy()
{
	CGuild * guild = EGS_PD_CAST<CGuild*>( _GuildMemberCore->getGuild() );
	EGS_PD_AST( guild );

	return guild->isProxy();
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:7,代码来源:guild_member_module.cpp

示例4: SuggestEndDeny

void CGuildWarManager::SuggestEndDeny( void* pMsg )
{
	MSG_DWORD* pmsg = (MSG_DWORD*)pMsg;

	CPlayer* pPlayer = (CPlayer*)g_pUserTable->FindUser( pmsg->dwObjectID );
	if( pPlayer == NULL )	return;	
	DWORD dwGuildIdx1 = pPlayer->GetGuildIdx();
	DWORD dwGuildIdx2 = pmsg->dwData;
	if( dwGuildIdx1 == 0 || dwGuildIdx2 == 0 )	return;
	if( pPlayer->GetGuildMemberRank() != GUILD_MASTER )	return;

	CGuild* pGuild = GUILDMGR->GetGuild( dwGuildIdx2 );
	if( pGuild == NULL )	return;

	pPlayer = (CPlayer*)g_pUserTable->FindUser( pGuild->GetMasterIdx() );
	if( pPlayer )
	{
		MSG_DWORD Msg;
		Msg.Category = MP_GUILD_WAR;
		Msg.Protocol = MP_GUILD_WAR_SUGGESTEND_DENY;
		Msg.dwData = dwGuildIdx1;

		pPlayer->SendMsg( (MSGBASE*)&Msg, sizeof(Msg) );
	}
	else
	{
		MSG_DWORD2 Notify;
		Notify.Category = MP_GUILD_WAR;
		Notify.Protocol = MP_GUILD_WAR_SUGGESTEND_DENY_NOTIFY_TOMAP;
		Notify.dwData1 = pGuild->GetMasterIdx();
		Notify.dwData2 = dwGuildIdx1;

		g_Network.Send2AgentServer( (char*)&Notify, sizeof(Notify) );
	}
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:35,代码来源:GuildFieldWarMgr.cpp

示例5: mirrorCell

//----------------------------------------------------------------------------
void CBuildingPhysicalGuild::dumpBuilding(NLMISC::CLog & log) const
{
	log.displayNL("<BUILDING_DUMP> CBuildingPhysicalGuild");
	log.displayNL("Name: %s, alias: %s", _Name.c_str(), CPrimitivesParser::aliasToString( _Alias ).c_str());

	for (uint i = 0; i < _UsersInside.size(); i++)
	{
		const TDataSetRow rowId = _UsersInside[i];
		CCharacter * c = PlayerManager.getChar( rowId );
		if ( !c )
		{
			log.displayNL("\tError: cannot find character with row id: %s", rowId.toString().c_str());
			continue;
		}

		const string charName = c->getName().toUtf8();
		const string charEId = c->getId().toString();

		CMirrorPropValueRO<TYPE_CELL> mirrorCell(TheDataset, rowId, DSPropertyCELL);
		const sint32 cell = mirrorCell;

		IRoomInstance * room = CBuildingManager::getInstance()->getRoomInstanceFromCell( cell );
		if ( !room )
		{
			log.displayNL("\tError: character %s %s is in cell %d but no room was found", charName.c_str(), charEId.c_str(), cell);
			continue;
		}

		CRoomInstanceGuild * guildRoom = dynamic_cast<CRoomInstanceGuild *>(room);
		if ( !guildRoom )
		{
			log.displayNL("\tError: character %s %s is in cell %d but room is not a guild room but a %s",
				charName.c_str(), charEId.c_str(), cell, room->getRoomDescription().c_str()
				);
			continue;
		}

		const uint32 guildId = c->getGuildId();
		string guildName;
		CGuild * guild = CGuildManager::getInstance()->getGuildFromId( guildId );
		if (guild)
			guildName = guild->getName().toUtf8();

		log.displayNL("\tCharacter %s %s [guild name='%s' id=%u] is in cell %d, room desc: %s",
			charName.c_str(), charEId.c_str(), guildName.c_str(), guildId, cell, room->getRoomDescription().c_str()
			);
	}

	for (uint i = 0; i < _Guilds.size(); i++)
	{
		const uint32 guildId = _Guilds[i];
		string guildName;
		CGuild * guild = CGuildManager::getInstance()->getGuildFromId( guildId );
		if (guild)
			guildName = guild->getName().toUtf8();

		log.displayNL("\t> Guild registered in building at index %u: %s", i, guildName.c_str());
	}
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:60,代码来源:building_physical.cpp

示例6:

// 길드마스터 인가?
BOOL	CGuildCombat1to1Mng::IsGuildMaster( CUser* pUser )
{
	CGuild* pGuild = pUser->GetGuild();
	if( pGuild && pGuild->IsMaster( pUser->m_idPlayer ) )
		return TRUE;

	return FALSE;
}
开发者ID:iceberry,项目名称:flyffsf,代码行数:9,代码来源:GuildCombat1to1.cpp

示例7: RegenNPC

// BUILDING_NPC
void CObject::RegenNPC()
{
	if (!m_pProto)
		return;

	if (!m_pProto->dwNPCVnum)
		return;

	if (!m_pkLand)
		return;

	DWORD dwGuildID = m_pkLand->GetOwner();
	CGuild* pGuild = CGuildManager::instance().FindGuild(dwGuildID);

	if (!pGuild)
		return;

	int x = m_pProto->lNPCX;
	int y = m_pProto->lNPCY;
	int newX, newY;

	float rot = m_data.zRot * 2.0f * M_PI / 360.0f;

	newX = (int)(( x * cosf(rot)) + ( y * sinf(rot)));
	newY = (int)(( y * cosf(rot)) - ( x * sinf(rot)));

	m_chNPC = CHARACTER_MANAGER::instance().SpawnMob(m_pProto->dwNPCVnum,
			GetMapIndex(),
			GetX() + newX,
			GetY() + newY,
			GetZ(),
			false,
			(int)m_data.zRot);


	if (!m_chNPC)
	{
		sys_err("Cannot create guild npc");
		return;
	}

	m_chNPC->SetGuild(pGuild);

	// 힘의 신전일 경우 길드 레벨을 길마에게 저장해놓는다
	if ( m_pProto->dwVnum == 14061 || m_pProto->dwVnum == 14062 || m_pProto->dwVnum == 14063 )
	{
		quest::PC* pPC = quest::CQuestManager::instance().GetPC(pGuild->GetMasterPID());

		if ( pPC != NULL )
		{
			pPC->SetFlag("alter_of_power.build_level", pGuild->GetLevel());
		}
	}
}
开发者ID:adi97ida,项目名称:Server,代码行数:55,代码来源:building.cpp

示例8: updateOutpostGuildDBOUTPOST_PROPERTIES

//----------------------------------------------------------------------------
void COutpostGuildDBUpdater::updateOutpostGuildDBOUTPOST_PROPERTIES()
{
	CGuild* owner = CGuildManager::getInstance()->getGuildFromId(_Outpost->_OwnerGuildId);
	CGuild* attacker = CGuildManager::getInstance()->getGuildFromId(_Outpost->_AttackerGuildId);
//	uint32 const OWNED					= (_Side == OUTPOSTENUMS::OutpostOwner)?1:0;
//	uint32 const SHEET					= _Outpost->_Sheet.asInt();
//	uint32 const LEVEL					= _Outpost->getStaticForm()?_Outpost->getStaticForm()->Level:0;
	ucstring const GUILD_NAME				= owner?owner->getName():ucstring();
	uint64 const GUILD_ICON				= owner?owner->getIcon():0;
//	uint32 const TRIBE					= _Outpost->isBelongingToAGuild()?0:1;
	ucstring const GUILD_NAME_ATT			= attacker?attacker->getName():ucstring();
//	uint32 const STATUS					= _Outpost->computeStatusForClient();
//	uint32 const DISPLAY_CRASH			= _Outpost->_CrashHappened?1:0;
	uint32 const WARCOST				= _Outpost->_Form->ChallengeCost;
	uint32 const ROUND_LVL_THRESHOLD	= _Outpost->_CurrentOutpostLevel;
	uint32 const ROUND_LVL_MAX_ATT		= _Outpost->_FightData._MaxAttackLevel;
	uint32 const ROUND_LVL_MAX_DEF		= _Outpost->_FightData._MaxDefenseLevel;
	uint32 const ROUND_LVL_CUR			= _Outpost->_FightData._CurrentCombatLevel;
	uint32 const ROUND_ID_CUR			= _Outpost->_FightData._CurrentCombatRound;
	uint32 const ROUND_ID_MAX			= _Outpost->computeRoundCount();
	uint32 const TIME_RANGE_DEF_WANTED	= _Outpost->_DefenseHour;
	uint32 const TIME_RANGE_DEF			= _Outpost->computeTimeRangeDefForClient();
	uint32 const TIME_RANGE_ATT			= _Outpost->computeTimeRangeAttForClient();
	uint32 const TIME_RANGE_LENGTH		= _Outpost->computeTimeRangeLengthForClient();
	uint32 const SQUAD_CAPITAL			= (_Side == OUTPOSTENUMS::OutpostOwner) ? _Outpost->_OwnerExpenseLimit : _Outpost->_AttackerExpenseLimit;
	
	setOWNED(_Side == OUTPOSTENUMS::OutpostOwner);
	
	setSHEET(_Outpost->_Sheet);
	setLEVEL(_Outpost->getStaticForm()?_Outpost->getStaticForm()->Level:0);
	setGUILD__NAME(GUILD_NAME);
	setGUILD__ICON(GUILD_ICON);
	setGUILD__TRIBE(!_Outpost->isBelongingToAGuild());
	setGUILD__NAME_ATT(GUILD_NAME_ATT);
	setSTATUS(_Outpost->computeStatusForClient());
	setDISPLAY_CRASH(_Outpost->_CrashHappened);
	setWARCOST(WARCOST);
	
	setROUND_LVL_THRESHOLD(uint8(ROUND_LVL_THRESHOLD));
	setROUND_LVL_MAX_ATT(uint8(ROUND_LVL_MAX_ATT));
	setROUND_LVL_MAX_DEF(uint8(ROUND_LVL_MAX_DEF));
	setROUND_LVL_CUR(uint8(ROUND_LVL_CUR));
	setROUND_ID_CUR(uint8(ROUND_ID_CUR));
	setROUND_ID_MAX(uint8(ROUND_ID_MAX));
	
	setTIME_RANGE_DEF_WANTED(uint8(TIME_RANGE_DEF_WANTED));
	setTIME_RANGE_DEF(TIME_RANGE_DEF);
	setTIME_RANGE_ATT(TIME_RANGE_ATT);
	setTIME_RANGE_LENGTH(TIME_RANGE_LENGTH);

	setSQUAD_CAPITAL(SQUAD_CAPITAL);
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:53,代码来源:outpost_guild_db_updater.cpp

示例9: DWORD

void CGuildWarManager::SurrenderNotifyToMap( void* pMsg )
{
	const MSG_GUILD_WAR_RESULT*	pmsg				= ( MSG_GUILD_WAR_RESULT* )pMsg;
	const DWORD					winnnerGuildIndex	= pmsg->mWinner.mGuildIndex;
	const DWORD					loserGuildIndex		= pmsg->mLoser.mGuildIndex;

	MSG_DWORD4					message;
	{
		message.Category = MP_GUILD_WAR;
		message.Protocol = MP_GUILD_WAR_SURRENDER;
	}

	// 승리 길드에게 메시지 전달
	{
		CGuild* guild	= GUILDMGR->GetGuild( winnnerGuildIndex );

		if( guild )
		{
			const MSG_GUILD_WAR_RESULT::Data& data = pmsg->mWinner;

			message.dwData1 = 1;	// 1 = win
			message.dwData2 = loserGuildIndex;
			message.dwData3	= data.mScoreValue;
			message.dwData4	= DWORD( data.mScoreVariation );

			guild->SendMsgToAll( &message, sizeof( message ) );
		}
	}

	// 패배 길드에게 전달
	{
		CGuild* guild	= GUILDMGR->GetGuild( loserGuildIndex );

		if( guild )
		{
			const MSG_GUILD_WAR_RESULT::Data& data = pmsg->mLoser;

			message.dwData1 = 0;	// 0 = surrender, 
			message.dwData2 = winnnerGuildIndex;
			message.dwData3	= data.mScoreValue;
			message.dwData4	= DWORD( data.mScoreVariation );

			guild->SendMsgToAll( &message, sizeof( message ) );
		}
	}

	UnregistGuildWar( winnnerGuildIndex, loserGuildIndex );
//	PenaltyForEndNotifyToMap( 1, loserGuildIndex );

	UpdateGuildWarRecord( FALSE, 0, loserGuildIndex );
	UpdateGuildWarRecord( FALSE, 1, winnnerGuildIndex );
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:52,代码来源:GuildFieldWarMgr.cpp

示例10: Reset

void CGuildList::Reset(void)
{
    for(CGuild *i = this->Unk0; i; i = this->Unk0)
    {
        this->Unk0 = i->nextguild();
        i->DeleteAllChild();

        if(i)
            delete i;
    }

    this->Unk4 = 0;
}
开发者ID:Christian-Roggia,项目名称:open-last-chaos,代码行数:13,代码来源:Guild.cpp

示例11:

CGuildMember *CGuildList::findmember(int a2)
{
    CGuildMember *v4; // [sp+14h] [bp-4h]@1

    v4 = 0;
    for(CGuild *i = this->Unk0; i; i = i->nextguild())
    {
        v4 = i->findmember(a2, 1);

        if(v4)
            return v4;
    }

    return v4;
}
开发者ID:Christian-Roggia,项目名称:open-last-chaos,代码行数:15,代码来源:Guild.cpp

示例12: IsGuildWar

void CGuildWarManager::SuggestEnd( void* pMsg )
{
	// 편의상 종전을 요청한 측을 아군, 요청받은 측을 적군이라 칭하자

	const MSG_DWORD3*	pmsg			= (MSG_DWORD3*)pMsg;
	CGuild*				friendlyGuild	= GUILDMGR->GetGuildFromMasterIdx( pmsg->dwData1 );
	CGuild*				enemyGuild		= GUILDMGR->GetGuildFromMasterIdx( pmsg->dwData2 );

	if( !	friendlyGuild	||
		!	enemyGuild		||
		!	IsGuildWar( friendlyGuild->GetIdx(), enemyGuild->GetIdx() ) )
	{
		return;
	}

	// 동맹인데 마스터 길드가 아닐 경우 해킹 또는 클라이언트 검사 실패
	{
		CGuildUnion* friendlyAlliance	= GUILDUNIONMGR->GetUnion( friendlyGuild->GetUnionIndex() );
		CGuildUnion* enemyAlliance		= GUILDUNIONMGR->GetUnion( enemyGuild->GetUnionIndex() );

		if( ( friendlyAlliance	&& friendlyAlliance->GetMasterGuild()	!= friendlyGuild	)	||
			( enemyAlliance		&& enemyAlliance->GetMasterGuild()		!= enemyGuild		)	)
		{
			return;
		}
	}

	// 요청 측에 대기하라고 알린다
	{
		CObject* friendlyPlayer	= g_pUserTable->FindUser( pmsg->dwData1 );

		if( friendlyPlayer )
		{
			MSG_BYTE message;
			message.Category	= MP_GUILD_WAR;
			message.Protocol	= MP_GUILD_WAR_WAIT;
			message.bData		= MP_GUILD_WAR_SUGGESTEND;

			friendlyPlayer->SendMsg( &message, sizeof( message ) );
		}
	}
	
	// 제안 받은 측에 메시지 보내자
	{
		CObject* enemyPlayer	= g_pUserTable->FindUser( pmsg->dwData2 );

		if( enemyPlayer )
		{
			MSG_DWORD message;
			message.Category	= MP_GUILD_WAR;
			message.Protocol	= MP_GUILD_WAR_SUGGESTEND;
			message.dwData		= friendlyGuild->GetIdx();

			enemyPlayer->SendMsg( &message, sizeof( message ) );
		}
	}
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:57,代码来源:GuildFieldWarMgr.cpp

示例13: nlwarning

//----------------------------------------------------------------------------
void COutpostManager::doOutpostGuildDBUpdates()
{
	for (uint i = 0; i < _OutpostsWaitingGuildDBUpdate.size(); i++)
	{
		TAIAlias outpostAlias = _OutpostsWaitingGuildDBUpdate[i].first;
		COutpostGuildDBUpdater::TDBPropSet dbPropSet = _OutpostsWaitingGuildDBUpdate[i].second;

		CHashMap<uint, NLMISC::CSmartPtr<COutpost> >::iterator it = _OutpostsByAlias.find(outpostAlias);
		if (it == _OutpostsByAlias.end())
			continue;

		NLMISC::CSmartPtr<COutpost> & outpost = (*it).second;

		// check data consistency
		if (outpost->isBelongingToAGuild() && outpost->getOwnerGuild() == outpost->getAttackerGuild())
		{
			nlwarning("Owner and attacker are the same guild (%u) for the outpost '%s'",
				outpost->getOwnerGuild(),
				outpost->getName().c_str()
				);
			DEBUG_STOP;
		}

		CGuild * ownerGuild = CGuildManager::getInstance()->getGuildFromId(outpost->getOwnerGuild());
		if (ownerGuild != NULL)
		{
			COutpostGuildDBUpdaterPtr dbUpdater = ownerGuild->getOutpostGuildDBUpdater(outpost);
			if (dbUpdater != NULL)
				dbUpdater->updateOutpostGuildDB(dbPropSet);
		}

		CGuild * attackerGuild = CGuildManager::getInstance()->getGuildFromId(outpost->getAttackerGuild());
		if (attackerGuild != NULL)
		{
			COutpostGuildDBUpdaterPtr dbUpdater = attackerGuild->getOutpostGuildDBUpdater(outpost);
			if (dbUpdater != NULL)
				dbUpdater->updateOutpostGuildDB(dbPropSet);
		}
	}

	_OutpostsWaitingGuildDBUpdate.clear();
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:43,代码来源:outpost_manager.cpp

示例14: _test_func

void _test_func( std::vector< string >& arg )
{
    BOOL bAuthority = FALSE;
    CGuild* pGuild = g_pPlayer->GetGuild( );
    if( pGuild )
        bAuthority = pGuild->IsAuthority( g_pPlayer->m_idPlayer, PF_GUILDHOUSE_UPKEEP );

    if( !bAuthority )		//유지비 권한이 없으면
    {
        g_WndMng.PutString( GETTEXT( TID_GAME_GUILDHOUSE_TAX_LEVEL ) );
        return;
    }

    if( !g_WndMng.m_pWndUpkeep )
    {
        g_WndMng.m_pWndUpkeep = new CWndGHUpkeep;
        g_WndMng.m_pWndUpkeep->Initialize(&g_WndMng, APP_CONFIRM_BUY_);

    }
}
开发者ID:KerwinMa,项目名称:AerothFlyffSource,代码行数:20,代码来源:ConsoleFunc.cpp

示例15: operator

void FBuildLuaGuildWarList::operator() (DWORD g1, DWORD g2)
{
    CGuild* g = CGuildManager::instance().FindGuild(g1);

    if (!g)
        return;

    if (g->GetGuildWarType(g2) == GUILD_WAR_TYPE_FIELD)
        return;

    if (g->GetGuildWarState(g2) != GUILD_WAR_ON_WAR)
        return;

    lua_newtable(L);
    lua_pushnumber(L, g1);
    lua_rawseti(L, -2, 1);
    lua_pushnumber(L, g2);
    lua_rawseti(L, -2, 2);
    lua_rawseti(L, -2, m_count++);
}
开发者ID:,项目名称:,代码行数:20,代码来源:


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