DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SwapItemsInOrder()

void PlayerContainer::SwapItemsInOrder ( int slot1,
int slot2 )
inlineprotected

См. определение в файле PlayerContainer.c строка 986

987 {
988 EntityAI item1 = m_Player.GetInventory().FindAttachment( slot1 );
989 EntityAI item2 = m_Player.GetInventory().FindAttachment( slot2 );
990
991 if( item1 && item2 )
992 {
993 Container cont1 = m_ShowedItems.Get( item1 );
994 Container cont2 = m_ShowedItems.Get( item2 );
995 if( cont1 && cont2 )
996 {
997 int sort1 = cont1.GetRootWidget().GetSort();
998 int sort2 = cont2.GetRootWidget().GetSort();
999
1000 cont1.GetRootWidget().SetSort( sort2 );
1001 cont2.GetRootWidget().SetSort( sort1 );
1002
1003 m_Body.SwapItems( m_Body.Find( cont1 ), m_Body.Find( cont2 ) );
1004 }
1005 }
1006 RecomputeOpenedContainers();
1007 }
class LogManager EntityAI
const string Container
Определения CentralEconomy.c:6
PlayerBase m_Player
Определения PlayerContainer.c:7
ref map< EntityAI, ref Container > m_ShowedItems
Определения PlayerContainer.c:5

Перекрестные ссылки m_Player и m_ShowedItems.