void RPC_S2C_GetDeadObjItem(uLink.BitStream stream, uLink.NetworkMessageInfo info) { int netId = stream.Read <int>(); int index = stream.Read <int>(); int itemId = stream.Read <int>(); AiNetwork ai = AiNetwork.Get <AiNetwork>(netId); if (null == ai || null == ai.Runner) { return; } ItemDropPeEntity dropEntity = ai.Runner.GetComponent <ItemDropPeEntity>(); if (null == dropEntity) { return; } ItemSample item = dropEntity.Get(index); if (null == item || item.protoId != itemId) { return; } dropEntity.RemoveDroppableItem(item); if (null != GameUI.Instance.mItemGet) { GameUI.Instance.mItemGet.Reflash(); } }
void RPC_S2C_GetDeadObjAllItems(uLink.BitStream stream, uLink.NetworkMessageInfo info) { int netId = stream.Read <int>(); AiNetwork ai = AiNetwork.Get <AiNetwork>(netId); if (null == ai || null == ai.Runner) { return; } ItemDropPeEntity dropEntity = ai.Runner.GetComponent <ItemDropPeEntity>(); if (null == dropEntity) { return; } dropEntity.RemoveDroppableItemAll(); if (null != GameUI.Instance.mItemGet) { GameUI.Instance.mItemGet.Reflash(); } }