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

◆ CombineItemsClient()

override void InventoryItem::CombineItemsClient ( EntityAI entity2,
bool use_stack_max = true )
inlineprivate

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

868 {
869 /*
870 ref Param1<EntityAI> item = new Param1<EntityAI>(entity2);
871 RPCSingleParam(ERPCs.RPC_ITEM_COMBINE, item, GetGame().GetPlayer());
872 */
873 ItemBase item2 = ItemBase.Cast(entity2);
874
875 if (GetGame().IsClient())
876 {
877 if (ScriptInputUserData.CanStoreInputUserData())
878 {
879 ScriptInputUserData ctx = new ScriptInputUserData;
881 ctx.Write(-1);
882 ItemBase i1 = this; // @NOTE: workaround for correct serialization
883 ctx.Write(i1);
884 ctx.Write(item2);
885 ctx.Write(use_stack_max);
886 ctx.Write(-1);
887 ctx.Send();
888
889 if (IsCombineAll(item2, use_stack_max))
890 {
891 GetGame().GetPlayer().GetInventory().AddInventoryReservationEx(item2,null,GameInventory.c_InventoryReservationTimeoutShortMS);
892 }
893 }
894 }
895 else if (!GetGame().IsMultiplayer())
896 {
897 CombineItems(item2, use_stack_max);
898 }
899 }
const int INPUT_UDT_ITEM_MANIPULATION
Определения _constants.c:8
proto native DayZPlayer GetPlayer()
void CombineItems(ItemBase other_item, bool use_stack_max=true)
Определения ItemBase.c:2248
bool IsCombineAll(ItemBase other_item, bool use_stack_max=false)
Определения ItemBase.c:2204
void ItemBase()
Определения ItemBase.c:140
proto native void Send()
proto bool Write(void value_out)
proto native CGame GetGame()

Перекрестные ссылки GameInventory::c_InventoryReservationTimeoutShortMS, ScriptInputUserData::CanStoreInputUserData(), CombineItems(), GetGame(), CGame::GetPlayer(), INPUT_UDT_ITEM_MANIPULATION, IsCombineAll(), ItemBase(), ScriptInputUserData::Send() и Serializer::Write().