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


C++ Door::getDoorId方法代码示例

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


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

示例1: updateHouse

void HouseTile::updateHouse(Item* item)
{
    if (item->getTile() == this)
    {
        Door* door = item->getDoor();

        if (door && door->getDoorId() != 0)
        {
            house->addDoor(door);
        }

        //[ added for beds system
        if (!door)
        {
            BedItem* bed = item->getBed();

            if (bed)
            {
                // next, add it to the house
                house->addBed(bed);
            }
        }

        //]
    }
}
开发者ID:edubart,项目名称:otserv,代码行数:26,代码来源:housetile.cpp

示例2: updateHouse

void HouseTile::updateHouse(Item* item)
{
	if(item->getTile() != this)
		return;

	Door* door = item->getDoor();
	if(door && door->getDoorId())
		house->addDoor(door);
	else if(BedItem* bed = item->getBed())
		house->addBed(bed);
}
开发者ID:Alexy234,项目名称:poketibia,代码行数:11,代码来源:housetile.cpp

示例3: updateHouse

void HouseTile::updateHouse(Item* item)
{
    if(item->getTile() == this)
    {
        Door* door = item->getDoor();
        if(door && door->getDoorId() != 0)
            house->addDoor(door);

        if(!door)
        {
            BedItem* bed = item->getBed();
            if(bed)
                house->addBed(bed);
        }
    }
}
开发者ID:Zerua,项目名称:TFS-1.0,代码行数:16,代码来源:housetile.cpp

示例4: loadMap


//.........这里部分代码省略.........
							setLastErrorString(ss.str());
							return false;
							break;
						}
					}

					NODE nodeItem = f.getChildNode(nodeTile, type);
					while(nodeItem){
						if(type == OTBM_ITEM){

							PropStream propStream;
							f.getProps(nodeItem, propStream);
							
							Item* item = Item::CreateItem(propStream);
							if(!item){
								std::stringstream ss;
								ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Failed to create item.";
								setLastErrorString(ss.str());
								return false;
							}

							if(item->unserializeItemNode(f, nodeItem, propStream)){
								if(isHouseTile && !item->isNotMoveable()){
									std::cout << "Warning: [OTBM loader] Moveable item in house id = " << house->getHouseId() << " Item type = " << item->getID() << std::endl;
									delete item;
								}
								else{
									tile->__internalAddThing(item);
									item->__startDecaying();

									// TESTING
									if(isHouseTile){
										Door* door = item->getDoor();
										if(door && door->getDoorId() != 0){
											house->addDoor(door);
										}
									}
									//
								}
							}
							else{
                                std::stringstream ss;
								ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Failed to load item " << item->getID() << ".";
								setLastErrorString(ss.str());
								delete item;
								return false;
							}
						}
						else{
							std::stringstream ss;
							ss << "[x:" << px << ", y:" << py << ", z:" << pz << "] " << "Unknown node type.";
							setLastErrorString(ss.str());
						}

						nodeItem = f.getNextNode(nodeItem, type);
					}
					
					map->setTile(px, py, pz, tile);
				}
				else{
					setLastErrorString("Unknown tile node.");
					return false;
				}

				nodeTile = f.getNextNode(nodeTile, type);
			}
开发者ID:gianflogao,项目名称:divinity-ots,代码行数:67,代码来源:iomapotbm.cpp


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