[Client] Make creature disguises update correctly

0.6.3
David Cernat 7 years ago
parent 9bd79ba498
commit acb1335d78

@ -159,6 +159,8 @@ void DedicatedPlayer::setBaseInfo()
reloadPtr(); reloadPtr();
} }
// Only set equipment if the player isn't disguised as a creature
if (ptr.getTypeName() == typeid(ESM::NPC).name())
setEquipment(); setEquipment();
previousRace = npc.mRace; previousRace = npc.mRace;
@ -192,19 +194,22 @@ void DedicatedPlayer::setShapeshift()
if (creatureRecordId.empty()) if (creatureRecordId.empty())
{ {
creature.mId = "Dedicated Player"; creature.mId = "Dedicated Player";
creatureRecordId = RecordHelper::createCreatureRecord(creature); creature.mId = creatureRecordId = RecordHelper::createCreatureRecord(creature);
LOG_APPEND(Log::LOG_INFO, "- Creating new creature record %s", creatureRecordId.c_str()); LOG_APPEND(Log::LOG_INFO, "- Creating new creature record %s", creatureRecordId.c_str());
} }
else
{
creature.mId = creatureRecordId; creature.mId = creatureRecordId;
RecordHelper::updateCreatureRecord(creature);
}
if (!reference) if (!reference)
{ {
LOG_APPEND(Log::LOG_INFO, "- Creating reference for %s", creature.mId.c_str());
createReference(creature.mId); createReference(creature.mId);
} }
else else
{ {
RecordHelper::updateCreatureRecord(creature);
reloadPtr(); reloadPtr();
} }
} }

Loading…
Cancel
Save