Beispiel #1
0
        private void PrepareItemAcquire()
        {
            NWCreature self = (NWCreature)fSelf;
            Item       item = self.FindItem();

            if (item != null)
            {
                ItemAcquireGoal iGoal = (ItemAcquireGoal)FindGoalByKind(GoalKind.gk_ItemAcquire);
                if (iGoal == null || !iGoal.Position.Equals(item.Location))
                {
                    iGoal          = ((ItemAcquireGoal)CreateGoal(GoalKind.gk_ItemAcquire));
                    iGoal.Position = item.Location;
                    iGoal.Duration = 25;
                }
            }
        }