protected override Composite CreateBehavior()
{
return new PrioritySelector
(
new Decorator(ret => FunkyGame.GameIsInvalid,
new Action(ret => m_IsDone = true)),
new Decorator(ret => !intWait,
new Sequence
(
new Sleep(2000),
new Action(ret => intWait=true)
)
),
new Decorator(ret => !UIElements.StashWindow.IsVisible,
new Action(ret => m_IsDone=true)),
new Decorator(ret => !UIElements.InventoryWindow.IsVisible,
new Action(ret => UIManager.ToggleInventoryMenu())),
//Update Item List
new Decorator(ret => !updatedItemList,
new Action(ret => UpdateMovingItemList())),
new Decorator(ret => Itemsource==ItemSource.Stash && !bUpdatedStashMap,
new Action(ret => UpdateBackpackSlots())),
new Decorator(ret => Itemsource==ItemSource.Backpack && !bUpdatedStashMap,
new Action(ret => UpdateStashSlots())),
new Decorator(ret => MovingItemList.Count==0,
new Sequence
(
new Sleep(2000),
new Action(ret => m_IsDone = true)
)
),
new Decorator(ret => MovingItemList.Count>0,
new Action(ret => MoveItems()))
);
}