NiNode* MyClass::TEST_0046E720(NiNode* armor, NiNode* npc,UINT32 unk2,UINT32 unk3,UINT32 unk4,UINT32 unk5) { char prefix[10]; sprintf_s(prefix, "%08x ", armor); RenameNode(npc, armor, prefix); auto armornpc = CastNiNode(armor->GetObjectByName("NPC")); if(armornpc) for(int i=0; i<armornpc->m_children.m_arrayBufLen; ++i) { if(armornpc->m_children[i]) CombineTree(m_root, armornpc); } else CombineTree(m_root, armor); auto armorInSkeleton = CALL_MEMBER_FN(this, UNKNOWN_0046E720)(armor, npc, unk2, unk3, unk4, unk5); if(armorInSkeleton) { ArmorAttachInfo info; info.skeleton = npc; info.id = (UINT32)armor; info.prefix = prefix; npc->IncRef(); lockArmor.lock(); armorInfos.insert(std::make_pair(armorInSkeleton, info)); ResourceManager::get()->RegisterCallback(armorInSkeleton, OnArmorRelease); CWorld::getSingleton()->ScanAndAdd(info.id, prefix, npc, armor); lockArmor.unlock(); } else ClearNode(npc, prefix); return armorInSkeleton; }
static void apply( Lockable& lockable, const chrono::time_point<Clock, Duration>& abs_time ) { return lockable.lock_upgrade_until(abs_time); }
static typename result_of::template unlock_and_lock_shared<Lockable>::type apply( Lockable& lockable ) { return lockable.unlock_and_lock_shared(); }
static typename result_of::template try_lock_shared_for<Lockable,Rep, Period>::type apply( Lockable& lockable, const chrono::duration<Rep, Period>& rel_time ) { return lockable.try_lock_shared_for(rel_time); }
static typename result_of::template relock_when<Lockable,Predicate>::type apply( Lockable& lockable, Predicate pred ) { return lockable.relock_when(pred); }
static void unlock(Lockable& l) { l.unlock(); }
static bool lock(Lockable& l) { return l.lock(); }