本文整理汇总了C++中GuildMember::getGuildID方法的典型用法代码示例。如果您正苦于以下问题:C++ GuildMember::getGuildID方法的具体用法?C++ GuildMember::getGuildID怎么用?C++ GuildMember::getGuildID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuildMember
的用法示例。
在下文中一共展示了GuildMember::getGuildID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
void CGSelectGuildMemberHandler::execute (CGSelectGuildMember* pPacket , Player* pPlayer)
throw(Error)
{
__BEGIN_TRY __BEGIN_DEBUG_EX
#ifdef __GAME_SERVER__
Assert(pPacket != NULL);
Assert(pPlayer != NULL);
SYSTEM_ASSERT(SYSTEM_GUILD);
GamePlayer* pGamePlayer = dynamic_cast<GamePlayer*>(pPlayer);
Assert(pGamePlayer != NULL);
PlayerCreature* pPlayerCreature = dynamic_cast<PlayerCreature*>(pGamePlayer->getCreature());
Assert(pPlayerCreature != NULL);
// 선택한 길드를 가져온다.
Guild* pGuild = g_pGuildManager->getGuild(pPlayerCreature->getGuildID());
//try { Assert(pGuild != NULL); } catch (Throwable& ) { return; }
if (pGuild==NULL) return;
// 선택한 길드 멤버를 가져온다.
GuildMember* pGuildMember = pGuild->getMember(pPacket->getName());
//try { Assert(pGuildMember != NULL); } catch (Throwable& ) { return; }
if (pGuildMember==NULL) return;
GCShowGuildMemberInfo gcShowGuildMemberInfo;
gcShowGuildMemberInfo.setGuildID(pGuildMember->getGuildID());
gcShowGuildMemberInfo.setName(pGuildMember->getName());
gcShowGuildMemberInfo.setGuildMemberRank(pGuildMember->getRank());
gcShowGuildMemberInfo.setGuildMemberIntro(pGuildMember->getIntro());
pPlayer->sendPacket(&gcShowGuildMemberInfo);
#endif // __GAME_SERVER__
__END_DEBUG_EX __END_CATCH
}
示例2: execute
//----------------------------------------------------------------------
//
// SGAddGuildMemberOKHandler::execute()
//
//----------------------------------------------------------------------
void SGAddGuildMemberOKHandler::execute (SGAddGuildMemberOK* pPacket )
throw(ProtocolException , Error )
{
__BEGIN_TRY __BEGIN_DEBUG_EX
#ifdef __GAME_SERVER__
// 길드 멤버 object 를 만든다.
GuildMember* pGuildMember = new GuildMember();
pGuildMember->setGuildID(pPacket->getGuildID());
pGuildMember->setName(pPacket->getName());
pGuildMember->setRank(pPacket->getGuildMemberRank());
// 길드에 추가한다.
Guild* pGuild = g_pGuildManager->getGuild(pGuildMember->getGuildID());
pGuild->addMember(pGuildMember);
// 멤버에게 메세지를 보낸다.
__ENTER_CRITICAL_SECTION((*g_pPCFinder))
Creature* pCreature = g_pPCFinder->getCreature_LOCKED(pGuildMember->getName());
if (pCreature != NULL && pCreature->isPC() )
{
Player* pPlayer = pCreature->getPlayer();
Assert(pPlayer != NULL);
if (pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_MASTER ||
pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_SUBMASTER ) // 길드마스터나 서브마스터일 경우
{
PlayerCreature* pPlayerCreature = dynamic_cast<PlayerCreature*>(pCreature);
Assert(pPlayerCreature != NULL);
Gold_t Fee;
if (pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_MASTER )
Fee = REQUIRE_SLAYER_MASTER_GOLD;
else if (pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_SUBMASTER )
Fee = REQUIRE_SLAYER_SUBMASTER_GOLD;
else
Fee = 0;
Gold_t CurMoney = pPlayerCreature->getGold();
if (CurMoney < Fee )
{
// 큰일났군
CurMoney = 0;
}
else
CurMoney -= Fee;
pPlayerCreature->setGoldEx(CurMoney);
if (Fee != 0 )
{
GCModifyInformation gcModifyInformation;
gcModifyInformation.addLongData(MODIFY_GOLD, CurMoney);
// 바뀐정보를 클라이언트에 보내준다.
pPlayer->sendPacket(&gcModifyInformation);
}
// 길드 가입 메시지를 보여준다.
GCSystemMessage gcSystemMessage;
if (pGuild->getRace() == Guild::GUILD_RACE_SLAYER )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_TEAM_JOIN_ACCEPTED ));
else if (pGuild->getRace() == Guild::GUILD_RACE_VAMPIRE )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CLAN_JOIN_ACCEPTED ));
else if (pGuild->getRace() == Guild::GUILD_RACE_OUSTERS )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CLAN_JOIN_ACCEPTED ));
pPlayer->sendPacket(&gcSystemMessage);
}
else if (pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_WAIT )
{
// 길드 가입 신청 메시지를 보낸다.
GCSystemMessage gcSystemMessage;
if (pGuild->getRace() == Guild::GUILD_RACE_SLAYER )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_TEAM_JOIN_TRY ));
else if (pGuild->getRace() == Guild::GUILD_RACE_VAMPIRE )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CLAN_JOIN_TRY ));
else if (pGuild->getRace() == Guild::GUILD_RACE_OUSTERS )
gcSystemMessage.setMessage(g_pStringPool->getString(STRID_CLAN_JOIN_TRY ));
pPlayer->sendPacket(&gcSystemMessage);
}
}
else
{
// 접속이 안되어 있다.
// 마스터나 서브마스터일 경우
// DB 에서 돈을 까도록 한다.
if ((pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_MASTER ||
pGuildMember->getRank() == GuildMember::GUILDMEMBER_RANK_SUBMASTER ) // 길드마스터나 서브마스터일 경우
&& pPacket->getServerGroupID() == g_pConfig->getPropertyInt("ServerID" ) ) // 이 게임 서버에서 추가한 길드원인가?
{
//.........这里部分代码省略.........