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

◆ SendRepairToClientDst()

void SendRepairToClientDst ( notnull InventoryLocation dst)
protected

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

2897 {
2898 #ifdef DIAG_DEVELOPER
2899 if (PluginInventoryDebug.Cast(GetPlugin(PluginInventoryDebug)).IsDesyncRepairEnable())
2900 {
2901 #endif
2902 array<EntityAI> itemsToRepair = new array<EntityAI>;
2903 switch(dst.GetType())
2904 {
2905 case InventoryLocationType.CARGO:
2906 InventoryLocation ilCargoItem = new InventoryLocation;
2907 CargoBase cargo = dst.GetParent().GetInventory().GetCargo();
2908 for(int i = cargo.GetItemCount() - 1; i >= 0 ; --i)
2909 {
2910 EntityAI itemInCargo = cargo.GetItem(i);
2911 itemInCargo.GetInventory().GetCurrentInventoryLocation(ilCargoItem);
2912 if (dst.CollidesWith(ilCargoItem))
2913 {
2914 itemsToRepair.Insert(itemInCargo);
2915 }
2916 }
2917 break;
2918 case InventoryLocationType.ATTACHMENT:
2919 EntityAI entityInAttachment = dst.GetParent().GetInventory().FindAttachment(dst.GetSlot());
2920
2921 if(entityInAttachment)
2922 {
2923 itemsToRepair.Insert(entityInAttachment);
2924 }
2925 break;
2926 case InventoryLocationType.HANDS:
2927 EntityAI entityInHands = GetEntityInHands();
2928 if(entityInHands)
2929 {
2930 itemsToRepair.Insert(entityInHands);
2931 }
2932
2933 break;
2934 default:
2935 break;
2936 }
2937
2938 if(itemsToRepair.Count() > 0)
2939 {
2941 }
2942 #ifdef DIAG_DEVELOPER
2943 }
2944 #endif
2945 }
DayZPlayer GetDayZPlayerOwner()
Определения DayZPlayerInventory.c:167
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:325
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
represents base for cargo storage for entities
Определения Cargo.c:7
static void SendServerInventoryCheck(array< EntityAI > items, DayZPlayer player)
Определения InventoryInputUserData.c:44
InventoryLocation.
Определения InventoryLocation.c:30
Result for an object found in CGame.IsBoxCollidingGeometryProxy.

Перекрестные ссылки GetDayZPlayerOwner(), CargoBase::GetItem(), CargoBase::GetItemCount(), GetPlugin() и InventoryInputUserData::SendServerInventoryCheck().

Используется в ValidateHandEvent(), ValidateSwap() и ValidateSyncMove().