True,
but given that we are just destroying everything on the creature that should not be there, its not too risky.
We could always do a delay command between the destroy and the move and store.
To ensure that we have given enough time for the items to be destroyed.
Alternatively, if you have a trash cleanup system in place, like a bin system, you could always 'move' the items to an other inventory - moving items is instant.
Eg:
object oBin = BLAH
AssignCommand(oBin,TakeItem()); // this sort of thing
Its somewhat of a bad practice to do:
but worst case scenario :
you could just create a wrapper function to turn DestroyObject into a non-delay type method.
Eg:
void DestroySingleThreaded(object o)
{
DestroyObject(o,0.01);
while(o != OBJECT_INVALID)
{
}
}
I am sure there are more efficient ways of doing it, but you could call this method, in order to remove the threat of the delay causing items to slip through the cracks.