For making spells, My suggestion would be Indexing, because you are iterating over instances so you need a much faster iteration.
For systems, use Hashtables, though for only complex systems such as that has registration. Indexing for majority.
Why use Indexing?
- It has 0 function calls(excluding some value calls, e.g. GetUnitPropWindow, GetWidgetLife, etc.)
- Because of the case above, it has a much better speed.
Why use Hashtables?
- It has 2D array
- It has an index size of 2147483648 keys.(Total of 2147483648^2)
- It allows you not to iterate over indexes just to find a certain value.
- It is large.
Why not use Indexing?
- Not for value retrieval, like retrieving a certain index checking for the type check.
- Annoys you to create lot of variable arrays
Why not use Hashtables?
- They are slow.
- You can only have 255 hashtables.
So which will you choose? It is up to you