mood skill writing

develop
Simon Jackson 2010-06-22 17:21:09 +01:00
parent 8d07001674
commit 3f0ab50b5d
2 changed files with 14 additions and 0 deletions

@ -388,6 +388,7 @@ namespace DFHack
bool WriteSex(const uint32_t index, const uint8_t sex);
bool WriteTraits(const uint32_t index, const t_soul &soul);
bool WriteMood(const uint32_t index, const uint16_t mood);
bool WriteMoodSkill(const uint32_t index, const uint16_t moodSkill);
private:
struct Private;

@ -506,6 +506,19 @@ bool Creatures::WriteMood(const uint32_t index, const uint16_t mood)
return true;
}
bool Creatures::WriteMoodSkill(const uint32_t index, const uint16_t moodSkill)
{
if(!d->Started)
{
return false;
}
uint32_t temp = d->p_cre->at (index);
Process * p = d->owner;
p->writeWord(temp + d->creatures.mood_skill_offset, moodSkill);
return true;
}
uint32_t Creatures::GetDwarfRaceIndex()
{
if(!d->Inited) return 0;