45 for (; i < newSize; i++)
48 if ( entity != NULL && entity.GetHierarchyRootPlayer() ==
_player )
56 for (i--; i >= newSize; i--)
63 _player.m_Hud.RefreshQuickbar(
true);
124 _player.m_Hud.RefreshQuickbar(
true);
134 _player.m_Hud.RefreshQuickbar(
true);
140 entity.GetInventory().GetCurrentInventoryLocation(loc);
143 return (entity && entity.GetHierarchyRootPlayer() ==
_player && parent.CanAssignAttachmentsToQuickbar() && entity.CanAssignToQuickbar());
184 if (!ctx.
Read(param))
199 if (!ctx.
Read(index))
203 if (!ctx.
Read(force))
213 if ( entity == NULL )
230 int slotsCount =
_player.GetQuickBarBonus();
231 int attCount =
_player.GetInventory().AttachmentCount();
233 for (
int i = 0; i < attCount; ++i)
235 slotsCount +=
_player.GetInventory().GetAttachmentFromIndex(i).GetQuickBarBonus();
252 _player.m_Hud.RefreshQuickbar(
true);
272 _player.m_Hud.RefreshQuickbar(
true);
287 _player.OnQuickBarContinuousUseEnd(index + 1);
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void _RemoveEntity(int index)
void QuickBarBase(PlayerBase player)
void OnSetEntityRequest(ParamsReadContext ctx)
Reaction on SetEntityShortcut from client.
class QuickBarItem m_aQuickbarEnts[MAX_QUICKBAR_SLOTS_COUNT]
EntityAI GetEntity(int index)
void _SetEntity(EntityAI entity, int index, bool force=false)
void OnSetEntityRPC(ParamsReadContext ctx)
Reaction on Rpc from server for set inicial state for quickbar.
void _SetEntityShortcut(EntityAI entity, int index, bool force=false)
void SetEntityShortcut(EntityAI entity, int index, bool force=false)
void OnSetEntityNoSync(EntityAI entity, int index, bool force=false)
const int MAX_QUICKBAR_SLOTS_COUNT
void CancelContinuousUse(int index)
bool CanAddAsShortcut(EntityAI entity)
void SetShotcutEnable(int index, bool value)
void UpdateShotcutVisibility(int index)
int FindEntityIndex(EntityAI entity)
static void SendQuickbarSetShortcut(DayZPlayer pPlayer, EntityAI item, int index, bool force=false)
proto native EntityAI GetParent()
returns parent of current inventory location
proto bool Write(void value_out)
proto bool Read(void value_in)
Serializer ParamsReadContext
proto native CGame GetGame()
static proto float Min(float x, float y)
Returns smaller of two given values.