Dirty bit for creature equipment pickup on labor setting

develop
Petr Mrázek 2010-04-12 18:19:53 +02:00
parent 9f7e1263a0
commit da0602dbb1
3 changed files with 7 additions and 0 deletions

@ -83,6 +83,7 @@ Creatures::Creatures(APIPrivate* _d)
creatures.default_soul_offset = minfo->getOffset("creature_default_soul");
creatures.physical_offset = minfo->getOffset("creature_physical");
creatures.mood_offset = minfo->getOffset("creature_mood");
creatures.pickup_equipment_bit = minfo->getOffset("creature_pickup_equipment_bit");
// soul offsets
creatures.soul_skills_vector_offset = minfo->getOffset("soul_skills_vector");
creatures.soul_mental_offset = minfo->getOffset("soul_mental");
@ -294,6 +295,10 @@ bool Creatures::WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LA
if(!d->Started) return false;
uint32_t temp = * (uint32_t *) d->p_cre->at (index);
g_pProcess->write(temp + d->creatures.labors_offset, NUM_CREATURE_LABORS, labors);
uint32_t pickup_equip;
g_pProcess->readDWord(temp + d->creatures.pickup_equipment_bit, pickup_equip);
pickup_equip |= 1u;
g_pProcess->writeDWord(temp + d->creatures.pickup_equipment_bit, pickup_equip);
return true;
}

@ -49,6 +49,7 @@ typedef struct
uint32_t artifact_name_offset;
uint32_t physical_offset;
uint32_t mood_offset;
uint32_t pickup_equipment_bit;
uint32_t soul_vector_offset;
uint32_t default_soul_offset;
// soul offsets

@ -1132,6 +1132,7 @@ map_data_1b60_offset 0x1B9c
<Offset name="creature_id">0x114</Offset>
<Offset name="creature_side">0X120</Offset> <!-- what? -->
<Offset name="creature_soulskill_vector">0X1F4</Offset>
<Offset name="creature_pickup_equipment_bit">0X21C</Offset>
<Offset name="creature_mood">0x238</Offset>
<Offset name="creature_physical">0x464</Offset>