本文整理汇总了C++中CvLeague类的典型用法代码示例。如果您正苦于以下问题:C++ CvLeague类的具体用法?C++ CvLeague怎么用?C++ CvLeague使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CvLeague类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CvAssertMsg
//------------------------------------------------------------------------------
void CvDllNetMessageHandler::ResponseLeagueEditName(LeagueTypes eLeague, PlayerTypes ePlayer, const char* szCustomName)
{
CvAssertMsg(eLeague != NO_LEAGUE, "eLeague invalid");
CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetLeague(eLeague);
pLeague->DoChangeCustomName(ePlayer, szCustomName);
}
示例2: GetInstance
//------------------------------------------------------------------------------
//table GetRepealProposalsOnHold();
int CvLuaLeague::lGetRepealProposalsOnHold(lua_State* L)
{
CvLeague* pLeague = GetInstance(L);
lua_createtable(L, 0, 0);
int iIndex = 1;
RepealProposalList v = pLeague->GetRepealProposalsOnHold();
for(RepealProposalList::iterator it = v.begin(); it != v.end(); ++it)
{
lua_createtable(L, 0, 0);
const int t = lua_gettop(L);
lProposalTableHelper(L, t, (*it));
lua_pushinteger(L, (*it).GetTargetResolutionID());
lua_setfield(L, t, "TargetResolutionID");
lua_pushinteger(L, (*it).GetRepealDecision()->GetDecision());
lua_setfield(L, t, "RepealDecision");
lua_rawseti(L, -2, iIndex++);
}
return 1;
}