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

◆ GetViewIndex()

int Entity::GetViewIndex ( )
inlineprotected

Returns item preview index !!!! IF OVERRIDING with more dynamic events call GetOnViewIndexChanged() in constructor on client !!!!

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 3730

3731 {
3732 if ( MemoryPointExists( "invView2" ) )
3733 {
3734 #ifdef PLATFORM_WINDOWS
3735 InventoryLocation il = new InventoryLocation();
3737 InventoryLocationType type = il.GetType();
3738 switch ( type )
3739 {
3740 case InventoryLocationType.CARGO:
3741 {
3742 return 0;
3743 }
3744 case InventoryLocationType.ATTACHMENT:
3745 {
3746 return 1;
3747 }
3748 case InventoryLocationType.HANDS:
3749 {
3750 return 0;
3751 }
3752 case InventoryLocationType.GROUND:
3753 {
3754 return 1;
3755 }
3756 case InventoryLocationType.PROXYCARGO:
3757 {
3758 return 0;
3759 }
3760 default:
3761 {
3762 return 0;
3763 }
3764 }
3765 #endif
3766
3767 #ifdef PLATFORM_CONSOLE
3768 return 1;
3769 #endif
3770 }
3771 return 0;
3772 }
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native GameInventory GetInventory()
proto native bool GetCurrentInventoryLocation(out notnull InventoryLocation loc)
returns information about current item location
proto native int GetType()
returns type of InventoryLocation

Перекрестные ссылки GetInventory() и InventoryLocation::GetType().