Beispiel #1
0
void MoonScriptCreatureAI::ForceWaypointMove(uint32 pWaypointId)
{
	if (GetCanEnterCombat())
		_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
	if (!GetCanMove())
		SetCanMove(true);

	StopMovement();
	_unit->GetAIInterface()->SetAIState(STATE_SCRIPTMOVE);
	SetMoveType(Move_WantedWP);
	SetWaypointToMove(pWaypointId);
}
Beispiel #2
0
void CCommonWnd::Move(int nOffsetX, int nOffsetY) 
{
	if(!GetCanMove())
		return;
	m_nLeft+=nOffsetX;
	m_nTop +=nOffsetY;

	m_nDisplayLeft +=nOffsetX;
	m_nDisplayTop +=nOffsetY;

	//move all his child
	CCommonWnd* pChild;
	pChild = GetChild();
	while(pChild)
	{
		pChild->Move(nOffsetX, nOffsetY);
		pChild = pChild->GetNext();
	}
}