|
|
|
@ -112,11 +112,16 @@ mwmp::Target MechanicsHelper::getTarget(const MWWorld::Ptr& ptr)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::CellRef *ptrRef = &ptr.getCellRef();
|
|
|
|
|
|
|
|
|
|
target.isPlayer = false;
|
|
|
|
|
target.refId = ptrRef->getRefId();
|
|
|
|
|
target.refNumIndex = ptrRef->getRefNum().mIndex;
|
|
|
|
|
target.mpNum = ptrRef->getMpNum();
|
|
|
|
|
target.name = ptr.getClass().getName(ptr);
|
|
|
|
|
if (ptrRef)
|
|
|
|
|
{
|
|
|
|
|
target.isPlayer = false;
|
|
|
|
|
target.refId = ptrRef->getRefId();
|
|
|
|
|
target.refNumIndex = ptrRef->getRefNum().mIndex;
|
|
|
|
|
target.mpNum = ptrRef->getMpNum();
|
|
|
|
|
target.name = ptr.getClass().getName(ptr);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
clearTarget(target);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return target;
|
|
|
|
|