IItem

Interface to implement a new Item class

C++
struct IItem : public IGameObjectExtension {
  enum eItemBackAttachment {
    eIBA_Primary = 0,
    eIBA_Secondary,
    eIBA_Unknown
  };
  enum eItemHand {
    eIH_Right = 0,
    eIH_Left,
    eIH_Last
  };
};
File

IItem.h

IItem::eItemBackAttachment Enumeration
C++
enum eItemBackAttachment {
  eIBA_Primary = 0,
  eIBA_Secondary,
  eIBA_Unknown
};
File

IItem.h

IItem::eItemHand Enumeration
C++
enum eItemHand {
  eIH_Right = 0,
  eIH_Left,
  eIH_Last
};
File

IItem.h

Members
Members
Description
eIH_Right = 0
indicates the right hand of the actor
eIH_Left
indicates the left hand of the actor
IItem::AttachAccessory Method
C++
virtual void AttachAccessory(IEntityClass* pClass, bool attach, bool noanim, bool force = false, bool firstTimeAttached = false, bool initialLoadoutSetup = false) = 0;
IItem::AttachToBack Method
C++
virtual bool AttachToBack(bool attach) = 0;
IItem::AttachToHand Method
C++
virtual bool AttachToHand(bool attach, bool checkAttachment = false) = 0;
IItem::CanDeselect Method
C++
virtual bool CanDeselect() const = 0;
IItem::CanDrop Method
C++
virtual bool CanDrop() const = 0;
IItem::CanSelect Method
C++
virtual bool CanSelect() const = 0;
IItem::CanUse Method
C++
virtual bool CanUse(EntityId userId) const = 0;
IItem::CheckAmmoRestrictions Method
C++
virtual bool CheckAmmoRestrictions(IInventory * pInventory) = 0;
IItem::DetachAllAccessories Method
C++
virtual void DetachAllAccessories() = 0;
IItem::Drop Method
C++
virtual void Drop(float impulseScale = 1.0f, bool selectNext = true, bool byDeath = false) = 0;
IItem::EnableUpdate Method
C++
virtual void EnableUpdate(bool enable, int slot = -1) = 0;
IItem::FilterView Method
C++
virtual bool FilterView(struct SViewParams & viewParams) = 0;
IItem::ForcePendingActions Method
C++
virtual void ForcePendingActions(uint8 blockedActions = 0) = 0;
Description

ACTIONS

IItem::GetAttachedAccessoriesString Method
C++
virtual const string GetAttachedAccessoriesString(const char* separator = ",") = 0;
IItem::GetDisplayName Method
C++
virtual const char * GetDisplayName() const = 0;
IItem::GetIWeapon Method ()
C++
virtual IWeapon * GetIWeapon() = 0;
virtual const IWeapon * GetIWeapon() const = 0;
Description

INTERFACES

IItem::GetMountedAngleLimits Method
C++
virtual Vec3 GetMountedAngleLimits() const = 0;
IItem::GetMountedDir Method
C++
virtual Vec3 GetMountedDir() const = 0;
Description

gets the original (not current) direction vector of a mounted weapon

IItem::GetOwnerId Method

Retrieves the owner id

C++
virtual EntityId GetOwnerId() const = 0;
IItem::GetSubContextID Method
C++
virtual int GetSubContextID() = 0;
IItem::GetType Method
C++
virtual const char* GetType() const = 0;
IItem::GivesAmmo Method
C++
virtual bool GivesAmmo() = 0;
IItem::HideItem Method
C++
virtual void HideItem(bool hide) = 0;
IItem::IsAccessory Method
C++
virtual bool IsAccessory() = 0;
Returns

true if the item is an accessory

IItem::IsBusy Method
C++
virtual bool IsBusy() const = 0;
IItem::IsModifying Method
C++
virtual bool IsModifying() const = 0;
Description

SETTINGS

IItem::IsSelected Method
C++
virtual bool IsSelected() const = 0;
IItem::IsUsed Method
C++
virtual bool IsUsed() const = 0;
IItem::MountAtEntity Method
C++
virtual void MountAtEntity(EntityId entityId, const Vec3 & pos, const Ang3 & angles) = 0;
IItem::OnAction Method
C++
virtual void OnAction(EntityId actorId, const ActionId& actionId, int activationMode, float value) = 0;
Description

EVENTS

IItem::OnAttach Method
C++
virtual void OnAttach(bool attach) = 0;
IItem::OnHit Method
C++
virtual void OnHit(float damage, int hitType) = 0;
IItem::OnParentSelect Method
C++
virtual void OnParentSelect(bool select) = 0;
IItem::OnPickedUp Method
C++
virtual void OnPickedUp(EntityId actorId, bool destroyed) = 0;
IItem::Physicalize Method
C++
virtual void Physicalize(bool enable, bool rigid) = 0;
IItem::PickUp Method
C++
virtual void PickUp(EntityId picker, bool sound, bool select = true, bool keepHistory = true, const char * setup = NULL) = 0;
IItem::PreResetParams Method
C++
virtual void PreResetParams() = 0;
IItem::RemoveAllAccessories Method
C++
virtual void RemoveAllAccessories() = 0;
IItem::RemoveOwnerAttachedAccessories Method
C++
virtual void RemoveOwnerAttachedAccessories() = 0;
IItem::RequireUpdate Method
C++
virtual void RequireUpdate(int slot) = 0;
IItem::Reset Method
C++
virtual void Reset() = 0;
IItem::ResetParams Method
C++
virtual bool ResetParams() = 0;
IItem::Select Method
C++
virtual void Select(bool select) = 0;
Description

HOLDING

IItem::SerializeLTL Method
C++
virtual void SerializeLTL(TSerialize ser) = 0;
Description

used to serialize item attachment when loading next level

IItem::SetBusy Method
C++
virtual void SetBusy(bool busy) = 0;
IItem::SetCurrentActionController Method
C++
virtual void SetCurrentActionController(class IActionController* pActionController) = 0;
IItem::SetHand Method
C++
virtual void SetHand(int hand) = 0;
IItem::SetOwnerId Method
C++
virtual void SetOwnerId(EntityId ownerId) = 0;
IItem::SetSubContextID Method
C++
virtual void SetSubContextID(int tagContext) = 0;
IItem::StartUse Method
C++
virtual void StartUse(EntityId userId) = 0;
IItem::StopUse Method
C++
virtual void StopUse(EntityId userId) = 0;
IItem::UpdateCurrentActionController Method
C++
virtual void UpdateCurrentActionController() = 0;
IItem::UpdateFPView Method
C++
virtual void UpdateFPView(float frameTime) = 0;
IItem::Use Method
C++
virtual void Use(EntityId userId) = 0;