本文整理汇总了C++中GetCurrentNode函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrentNode函数的具体用法?C++ GetCurrentNode怎么用?C++ GetCurrentNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCurrentNode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: AddPct
void FlightPathMovementGenerator::DoReset(Player* owner)
{
if (!owner)
return;
if (!owner->isAlive())
return;
float playerFlightSpeed = 32.0f;
// Add percentage from SPELL_AURA_MOD_TAXI_FLIGHT_SPEED.
Unit::AuraEffectList const& mIncreaseTaxiFlightSpeed = owner->GetAuraEffectsByType(SPELL_AURA_MOD_TAXI_FLIGHT_SPEED);
for (Unit::AuraEffectList::const_iterator i = mIncreaseTaxiFlightSpeed.begin(); i != mIncreaseTaxiFlightSpeed.end(); ++i)
AddPct(playerFlightSpeed, (*i)->GetAmount());
owner->getHostileRefManager().setOnlineOfflineState(false);
owner->AddUnitState(UNIT_STATE_IN_FLIGHT);
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(*owner);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x, (*i_path)[i].y, (*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetSmooth();
init.SetWalk(true);
init.SetVelocity(playerFlightSpeed);
init.Launch();
}
开发者ID:concept45,项目名称:Core,代码行数:33,代码来源:WaypointMovementGenerator.cpp
示例2: GetPath
void FlightPathMovementGenerator::ResendPathToOtherPlayers(Player& player)
{
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * (path.GetTotalLength(GetCurrentNode(),pathEndPoint)
- player.GetDistance(path[GetCurrentNode()].x, path[GetCurrentNode()].y, path[GetCurrentNode()].z)));
player.SendMonsterMoveByPath(path,
GetCurrentNode(),
pathEndPoint,
SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING),
traveltime,
true );
}
开发者ID:Phatcat,项目名称:mangos,代码行数:13,代码来源:WaypointMovementGenerator.cpp
示例3: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * path.GetTotalLength(GetCurrentNode(),pathEndPoint));
player.SendMonsterMoveByPath(path,GetCurrentNode(),pathEndPoint, SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING), traveltime );
}
开发者ID:Phatcat,项目名称:mangos,代码行数:14,代码来源:WaypointMovementGenerator.cpp
示例4: init
void FlightPathMovementGenerator::_Reset(Player & player)
{
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
开发者ID:Splash,项目名称:mangos,代码行数:14,代码来源:WaypointMovementGenerator.cpp
示例5: IECopyImage
/*
* IECopyImage - copy the current clipping rectangle to the clipboard
*
* 1) Copy the bitmap to the clipboard (so other apps can use it).
* 2) Make a copy of the XOR bitmap and the AND bitmaps so that if
* screen colors are involved, they will be preserved.
* Later, we check the owner of the clipboard to see if we really
* want to use the XOR/AND bitmaps or not.
*/
void IECopyImage( void )
{
short width;
short height;
img_node *node;
node = GetCurrentNode();
if( node == NULL ) {
return;
}
if( !fEnableCutCopy ) {
_wpi_setwrectvalues( &clipRect.rect, 0, 0, node->width, node->height );
width = node->width;
height = node->height;
} else {
width = _wpi_getwidthrect( clipRect.rect );
height = _wpi_getheightrect( clipRect.rect );
}
copyImageToClipboard( width, height, node );
if( !fEnableCutCopy ) {
PrintHintTextByID( WIE_ENTIREIMAGECOPIED, NULL );
} else {
PrintHintTextByID( WIE_AREACOPIED, NULL );
RedrawPrevClip( node->hwnd );
fEnableCutCopy = FALSE;
}
} /* IECopyImage */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:40,代码来源:clip.c
示例6: NS_ASSERTION
void
nsFilteredContentIterator::Prev()
{
if (mIsOutOfRange || !mCurrentIterator) {
NS_ASSERTION(mCurrentIterator, "Missing iterator!");
return;
}
// If we are switching directions then
// we need to switch how we process the nodes
if (mDirection != eBackward) {
nsresult rv = SwitchDirections(false);
if (NS_FAILED(rv)) {
return;
}
}
mCurrentIterator->Prev();
if (mCurrentIterator->IsDone()) {
return;
}
// If we can't get the current node then
// don't check to see if we can skip it
nsINode *currentNode = mCurrentIterator->GetCurrentNode();
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));
CheckAdvNode(node, mDidSkip, eBackward);
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:31,代码来源:nsFilteredContentIterator.cpp
示例7: GetCurrentNode
void EdgeMenuDialogBase::PickPreviousSibling()
{
bool continueSearch = true;
BrowserNode * previousNode = 0;
BrowserNode * originalNode = GetCurrentNode();
int originalDepth = originalNode->depth();
BrowserNode * currentNode = originalNode;
while (continueSearch)
{
QLOG_INFO() << "CurrentNode is: " << currentNode->get_name();
previousNode = dynamic_cast<BrowserNode *>(currentNode->itemBelow());
QLOG_INFO() << "Nodename is: " << previousNode->get_name() << " " << previousNode->depth();
if (!previousNode)
break;
QLOG_INFO() << "Previous Node is: "<< previousNode->get_name();
int previousDepth = previousNode->depth();
bool sameType = originalNode->get_stype() == previousNode->get_stype();
QLOG_INFO() << "PREVIOUS: " << "Origin level : " << originalDepth;
QLOG_INFO() << "PREVIOUS: " << "Current level : " << previousDepth;
bool sameLevel = originalDepth == previousDepth;
if (sameLevel && sameType)
continueSearch = false;
currentNode = previousNode;
}
if (previousNode == 0)
return;
SaveData();
FillGuiElements(previousNode);
}
开发者ID:gilbertoca,项目名称:douml,代码行数:35,代码来源:edgemenudialogbase.cpp
示例8: NS_ERROR
//------------------------------------------------------------
void
nsFilteredContentIterator::Last()
{
if (!mCurrentIterator) {
NS_ERROR("Missing iterator!");
return;
}
// If we are switching directions then
// we need to switch how we process the nodes
if (mDirection != eBackward) {
mCurrentIterator = mIterator;
mDirection = eBackward;
mIsOutOfRange = false;
}
mCurrentIterator->Last();
if (mCurrentIterator->IsDone()) {
return;
}
nsINode *currentNode = mCurrentIterator->GetCurrentNode();
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(currentNode));
bool didCross;
CheckAdvNode(node, didCross, eBackward);
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:30,代码来源:nsFilteredContentIterator.cpp
示例9: init
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.AddUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(32.0f);
init.Launch();
}
开发者ID:Shutok,项目名称:HeavensGate,代码行数:18,代码来源:WaypointMovementGenerator.cpp
示例10: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->CombatStopWithPets();
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice(_path[i]->LocX, _path[i]->LocY, _path[i]->LocZ);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
开发者ID:m-uu,项目名称:ElunaTrinityWotlk,代码行数:18,代码来源:FlightPathMovementGenerator.cpp
示例11: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->getHostileRefManager().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i < end; ++i)
{
G3D::Vector3 vertice(i_path[i]->x, i_path[i]->y, i_path[i]->z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:18,代码来源:WaypointMovementGenerator.cpp
示例12:
nsINode *
nsFilteredContentIterator::GetCurrentNode()
{
if (mIsOutOfRange || !mCurrentIterator) {
return nsnull;
}
return mCurrentIterator->GetCurrentNode();
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:9,代码来源:nsFilteredContentIterator.cpp
示例13: CutImage
/*
* CutImage - cuts the current clipping rectangle to the clipboard
*/
void CutImage( void )
{
WPI_PRES pres;
WPI_PRES mempres;
HDC memdc;
HBITMAP oldbitmap;
short width;
short height;
img_node *node;
WPI_RECTDIM left;
WPI_RECTDIM right;
WPI_RECTDIM top;
WPI_RECTDIM bottom;
node = GetCurrentNode();
if( node == NULL ) {
return;
}
if( !fEnableCutCopy ) {
_wpi_setwrectvalues( &clipRect.rect, 0, 0, node->width, node->height );
width = node->width;
height = node->height;
} else {
width = (short)_wpi_getwidthrect( clipRect.rect );
height = (short)_wpi_getheightrect( clipRect.rect );
}
copyImageToClipboard( width, height, node );
pres = _wpi_getpres( node->viewhwnd );
mempres = _wpi_createcompatiblepres( pres, Instance, &memdc );
_wpi_releasepres( node->viewhwnd, pres );
oldbitmap = _wpi_selectbitmap( mempres, node->hxorbitmap );
_wpi_getrectvalues( clipRect.rect, &left, &top, &right, &bottom );
_wpi_patblt( mempres, left, top, width, height, WHITENESS );
_wpi_getoldbitmap( mempres, oldbitmap );
oldbitmap = _wpi_selectbitmap( mempres, node->handbitmap );
_wpi_patblt( mempres, left, top, width, height, BLACKNESS );
_wpi_getoldbitmap( mempres, oldbitmap );
_wpi_deletecompatiblepres( mempres, memdc );
InvalidateRect( node->viewhwnd, NULL, FALSE );
RecordImage( node->hwnd );
if( !fEnableCutCopy ) {
PrintHintTextByID( WIE_ENTIREIMAGECUT, NULL );
} else {
PrintHintTextByID( WIE_AREACUT, NULL );
fEnableCutCopy = FALSE;
}
BlowupImage( node->hwnd, NULL );
} /* CutImage */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:59,代码来源:clip.c
示例14: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(), SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING));
}
开发者ID:Adalinator,项目名称:mangos,代码行数:11,代码来源:WaypointMovementGenerator.cpp
示例15: GetCurrentVolume
TGeoVolume* KVGeoNavigator::GetCurrentDetectorNameAndVolume(KVString& detector_name, Bool_t& multilayer)
{
// Returns the name of the current detector (if we are inside a detector)
// and whether it is a multilayer or simple detector.
// Returns 0x0 if we are not inside a detector volume.
//
// N.B. the returned volume corresponds to the *whole* detector (even if it has several layers).
// For a multilayer detector, GetCurrentVolume() returns the volume for the current layer.
//
// See ExtractDetectorNameFromPath(KVString&) for details on detector name formatting.
// Info("GetCurrentDetectorNameAndVolume","now i am in %s on node %s with path %s and matrix:",
// fCurrentVolume->GetName(),fCurrentNode->GetName(),fCurrentPath.Data());
// fCurrentMatrix.Print();
multilayer = kFALSE;
fCurrentDetectorNode = 0;
TString volNom = GetCurrentVolume()->GetName();
TGeoVolume* detector_volume = 0;
if (volNom.BeginsWith("DET_")) {
// simple detector
fCurrentDetectorNode = GetCurrentNode();
detector_volume = GetCurrentVolume();
} else {
// have we hit 1 layer of a multilayer detector?
TGeoVolume* mother_vol = GetCurrentNode()->GetMotherVolume();
if (mother_vol) {
TString mom = mother_vol->GetName();
if (mom.BeginsWith("DET_")) {
// it *is* a multilayer detector (youpi! :-)
if (fMotherNode) { // this is the node corresponding to the whole detector,
fCurrentDetectorNode = fMotherNode;
detector_volume = mother_vol;
multilayer = kTRUE;
}
}
}
}
if (detector_volume) ExtractDetectorNameFromPath(detector_name);
return detector_volume;
}
开发者ID:GiuseppePast,项目名称:kaliveda,代码行数:41,代码来源:KVGeoNavigator.cpp
示例16: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->getHostileRefManager().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice(i_path[i]->Loc.X, i_path[i]->Loc.Y, i_path[i]->Loc.Z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetSmooth();
init.SetUncompressed();
init.SetWalk(true);
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
开发者ID:Lyill,项目名称:TrinityCore,代码行数:21,代码来源:WaypointMovementGenerator.cpp
示例17: LoadPath
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostilRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(),MOVEMENTFLAG_WALK_MODE|MOVEMENTFLAG_ONTRANSPORT);
}
开发者ID:spiritos,项目名称:mangos,代码行数:12,代码来源:WaypointMovementGenerator.cpp
示例18: traveller
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.AddUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
// For preloading end grid
InitEndGridInfo();
player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd());
}
开发者ID:CamelPown,项目名称:TrueBl0OD,代码行数:12,代码来源:WaypointMovementGenerator.cpp
示例19: PlaceAndPaste
/*
* PlaceAndPaste - find out where the image is to be placed and then paste it there
*/
void PlaceAndPaste( void )
{
HBITMAP hbitmap;
WPI_POINT pointsize;
img_node *node;
WPI_POINT pt;
unsigned long format;
int bm_width;
int bm_height;
format = 0;
node = GetCurrentNode();
if( node == NULL ) {
return;
}
if( !_wpi_isclipboardformatavailable( Instance, CF_BITMAP, &format ) ) {
PrintHintTextByID( WIE_NOBITMAPINCLIPBOARD, NULL );
return;
}
pointsize = GetPointSize( node->hwnd );
if( fEnableCutCopy ) {
RedrawPrevClip( node->hwnd );
PasteImage( NULL, pointsize, node->hwnd );
fEnableCutCopy = FALSE;
return;
}
prevToolType = SetToolType( IMGED_PASTE );
pointCursor = _wpi_loadcursor( Instance, POINT_CUR );
prevCursor = _wpi_setcursor( pointCursor );
_wpi_openclipboard( Instance, HMainWindow );
hbitmap = _wpi_getclipboarddata( Instance, CF_BITMAP );
_wpi_getbitmapdim( hbitmap, &bm_width, &bm_height );
_wpi_closeclipboard( Instance );
dragWidth = (short)(bm_width * pointsize.x);
dragHeight = (short)(bm_height * pointsize.y);
WriteSetSizeText( WIE_CLIPBOARDBITMAPSIZE, bm_width, bm_height);
_wpi_getcursorpos( &pt );
_wpi_screentoclient( node->hwnd, &pt );
pt.x = pt.x / pointsize.x;
pt.y = pt.y / pointsize.y;
_wpi_setcapture( node->hwnd );
firstTime = true;
DragClipBitmap( node->hwnd, &pt, pointsize );
} /* PlaceAndPaste */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:54,代码来源:clip.c
示例20: LoadPath
void FlightPathMovementGenerator::Initialize(Player &player)
{
// Random handlers used for quests etc. - best would be to add FlightPathMovementGenerator::Initialize to sub-script class (Feanor)
if( player.m_taxi.GetTaxiDestination() == 158 || player.m_taxi.GetTaxiDestination() == 243 )
player.SetDisplayId(16587);
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(), SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING));
}
开发者ID:Lirok,项目名称:mangos,代码行数:16,代码来源:WaypointMovementGenerator.cpp
注:本文中的GetCurrentNode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论