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

◆ CombineItemsClient()

override void CombineItemsClient ( EntityAI entity2,
bool use_stack_max = true )
private

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

787 {
788 /*
789 ref Param1<EntityAI> item = new Param1<EntityAI>(entity2);
790 RPCSingleParam(ERPCs.RPC_ITEM_COMBINE, item, g_Game.GetPlayer());
791 */
792 ItemBase item2 = ItemBase.Cast(entity2);
793
794 if (g_Game.IsClient())
795 {
797 {
800 ctx.Write(-1);
801 ItemBase i1 = this; // @NOTE: workaround for correct serialization
802 ctx.Write(i1);
803 ctx.Write(item2);
804 ctx.Write(use_stack_max);
805 ctx.Write(-1);
806 ctx.Send();
807
808 if (IsCombineAll(item2, use_stack_max))
809 {
810 g_Game.GetPlayer().GetInventory().AddInventoryReservationEx(item2,null,GameInventory.c_InventoryReservationTimeoutShortMS);
811 }
812 }
813 }
814 else if (!g_Game.IsMultiplayer())
815 {
816 CombineItems(item2, use_stack_max);
817 }
818 }
const int INPUT_UDT_ITEM_MANIPULATION
DayZGame g_Game
Определения DayZGame.c:4074
bool IsCombineAll(ItemBase other_item, bool use_stack_max=false)
Определения ItemBase.c:2199
void CombineItems(ItemBase other_item, bool use_stack_max=true)
Определения ItemBase.c:2243
const int c_InventoryReservationTimeoutShortMS
script counterpart to engine's class Inventory
proto native void Send()
proto static native bool CanStoreInputUserData()
Returns true when the channel is free, AND the InputBuffer is NOT full (same as '!...
Определения gameplay.c:121
proto bool Write(void value_out)

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