Maybe i'made some mistakes in other parts of the code, but here's my method:
public void ReturnTaskById(int taskID)
{
//erase task from group
Combatant combatant = ORK.Game.Combatants.Get(taskID);
combatant.Group.Remove(combatant,true,true,true,true);
//add task to de RealID list of pending tasks
pBacklogIDs.Add(taskID);
pBacklogIDs.Sort();
}
But, when i iterate pBacklogIDs list (list of RealIDs) and the group the combatant belonged (sprintBacklogTasks, which is used later in the following code), tasks hasn't been erased at all. I've tried placing some debug.log() through the code and i'm sure it stops in the remove step, because it stops printing just after this step. It's like it raises and excepcion...
I've also read the thread @RustedGames recommended, but sadly i didn't understand how that works...
The method ReturnTaskById is supposed to be the contrary of this one;
public void AddTaskById(int taskID)
{
bool taskexists = pBacklogIDs.Remove(taskID);
if (taskexists) {
Combatant task = ORK.Access.Combatant.CreateInstance(taskID, sprintBacklogTasks, true, true);
}
}
Could the firs method work? The first surely does