Traversing an EquipDescVector
Locked
FLHook Development
-
Here’s some code for traversing the entries of an EquipDescVector if anyone needs it:
EquipDescVector edv; pub::GetLoadout(edv, iLoadoutID); EquipDesc *ed = edv.start; while(ed != edv.end) { //do stuff with ed here ed = (EquipDesc*)((char*)ed + sizeof(EquipDesc)); } ```EquipDescVector struct:
struct IMPORT EquipDescVector
{
EquipDescVector(struct EquipDescVector const &);
EquipDescVector(class EquipDescList const &);
EquipDescVector(void);
~EquipDescVector(void);
struct EquipDescVector & operator=(struct EquipDescVector const &);
int add_equipment_item(struct EquipDesc const &,bool);
void append(struct EquipDescVector const &);
struct EquipDesc * traverse_equipment_type(unsigned int,struct EquipDesc const *);public:
uint iDunno;
EquipDesc *start;
EquipDesc *end;
};