void Functions::getTag(Aurora::NWScript::FunctionContext &ctx) { ctx.getReturn().getString().clear(); Aurora::NWScript::Object *object = getParamObject(ctx, 0); if (object) ctx.getReturn() = object->getTag(); }
void Functions::getTag(Aurora::NWScript::FunctionContext &ctx) { ctx.getReturn().getString().clear(); Aurora::NWScript::Object *object = getParamObject(ctx, 0); // PCs don't have a tag, and the scripts depend on that if (object == _game->getModule().getPC()) object = 0; if (object) ctx.getReturn() = object->getTag(); }
void Functions::setLocalFloat(Aurora::NWScript::FunctionContext &ctx) { Aurora::NWScript::Object *object = getParamObject(ctx, 0); if (object) object->setVariable(ctx.getParams()[1].getString(), ctx.getParams()[2].getFloat()); }
void Functions::getLocalObject(Aurora::NWScript::FunctionContext &ctx) { Aurora::NWScript::Object *object = getParamObject(ctx, 0); if (object) ctx.getReturn() = object->getVariable(ctx.getParams()[1].getString(), kTypeObject).getObject(); }
void Functions::setLocalItemProperty(Aurora::NWScript::FunctionContext &ctx) { Aurora::NWScript::Object *object = getParamObject(ctx, 0); if (object) object->setVariable(ctx.getParams()[1].getString(), ctx.getParams()[2].getEngineType()); }
void Functions::getLocalItemProperty(Aurora::NWScript::FunctionContext &ctx) { Aurora::NWScript::Object *object = getParamObject(ctx, 0); if (object) ctx.getReturn() = object->getVariable(ctx.getParams()[1].getString(), kTypeEngineType).getEngineType(); }