void Trigger::tobuffer(Buffer& buffer) const
{
int i, num;
buffer.write(&state, 14);
buffer.fill(0, sizeof(long));
description.write(buffer, sizeof(long));
buffer.writes(name, sizeof(long));
//effects
num = effects.size();
buffer.write(&num, sizeof(long));
for (i = 0; i < num; i++)
effects[i].tobuffer(buffer);
for (i = 0; i < num; i++)
buffer.write(&i, sizeof(long));
//conditions
num = conds.size();
buffer.write(&num, sizeof(long));
for (i = 0; i < num; i++)
conds[i].tobuffer(buffer);
//condition order
for (i = 0; i < num; i++)
buffer.write(&i, sizeof(long));
}
Mohl by se na to někdo podívat a poradit jak to opravit?