本文整理汇总了C++中PlayerInfo::updateInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerInfo::updateInfo方法的具体用法?C++ PlayerInfo::updateInfo怎么用?C++ PlayerInfo::updateInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerInfo
的用法示例。
在下文中一共展示了PlayerInfo::updateInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleRecieve
bool AllianceApplylistCommand::handleRecieve(cocos2d::CCDictionary *dict)
{
if (dict->valueForKey("cmd")->compare(AL_APPLY_LIST) != 0)
return false;
CCDictionary *params=_dict(dict->objectForKey("params"));
if (!params) {
return false;
}
const CCString *pStr = params->valueForKey("errorCode");
if (pStr->compare("")!=0) {
CCCommonUtils::flyText(_lang(pStr->getCString()));
callFail(NetResult::create());
}else{
map<std::string, PlayerInfo*>::iterator it;
AllianceManager::getInstance()->applyUserList.clear();
CCArray* arr = (CCArray*)params->objectForKey("list");
int num = arr->count();
for (int i=0; i<num; i++) {
CCDictionary* dicPlayer = (CCDictionary*)arr->objectAtIndex(i);
PlayerInfo* player = new PlayerInfo();
player->updateInfo(dicPlayer);
AllianceManager::getInstance()->applyUserList[player->uid] = player;
if(player->uid==GlobalData::shared()->playerInfo.uid){
if(dicPlayer->objectForKey("relinquishEndTime")){
GlobalData::shared()->playerInfo.relinquishEndTime = dicPlayer->valueForKey("relinquishEndTime")->doubleValue();
}
if(dicPlayer->objectForKey("officer")){
GlobalData::shared()->playerInfo.officer = dicPlayer->valueForKey("officer")->getCString();
}
}
}
callSuccess(NetResult::create(Error_OK, params));
}
return true;
}