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


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

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


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

示例1: number


//.........这里部分代码省略.........
			{
				/*
				 * 0x4051 Dead(S:Name*)
				 * Returns only true if the creature with the specified script name
				 * has its death variable set to 1. Not every form of death sets this,
				 * but most do. So it's an almost complete test for death.
				 * The creature must have existed for this to be true.
				 * Note that SPRITE_IS_DEAD variables are not set if the creature is
				 * killed by a neutral creature.
				 */
				/*Script* actorScript = fScripts[trig->string1];
				if (actorScript != NULL) {
					// TODO: More NULL checking
					const char* deathVariable = actorScript->Target()->CRE()->DeathVariable();
					returnValue = fVariables[deathVariable] == 1;
				}*/
				break;
			}
			case 0x52:
			{
				/* OPENED(O:OBJECT*) (82 0x52) */
				object_node* objectNode = FindObjectNode(trig);
				if (objectNode == NULL)
					break;
				// TODO: We assume this is a door, but also
				// containers can be opened/closed
				Door* door = dynamic_cast<Door*>(fTarget.Target());
				if (door == NULL)
					break;
				if (!door->Opened())
					break;

				Object* object = core->GetObject(
						door->CurrentScriptRoundResults()->fOpenedBy.c_str());
				if (object != NULL)
					returnValue = object->MatchNode(objectNode);

				break;
			}
			case 0x4063:
			{
				/*INWEAPONRANGE(O:OBJECT*) (16483 0x4063) */
				int range = 40;
				// TODO: Check weapon range
				Object* object = FindObject(trig);
				if (object != NULL)
					returnValue = core->Distance(object, fTarget.Target()) <= range;

				break;
			}

#if 0
			case 0x4068:
			{
				/* TimeGT(I:Time*Time)
				 * Returns true only if the current time is greater than
				 * that specified. Hours are offset by 30 minutes,
				 * e.g. TimeGT(1) is true between 01:30 and 02:29.
				 */
				break;
			}

			case 0x4069:
			{
				//TIMELT(I:TIME*TIME) (16489 0x4069)
				break;
开发者ID:,项目名称:,代码行数:67,代码来源:


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