Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_WeaponStatsManagerComponent.c
Go to the documentation of this file.
2{
3}
4
5class SCR_WeaponStatsManagerComponent: BaseWeaponStatsManagerComponent
6{
7
8 override void OnWeaponAttachedAttachment(IEntity entity, int iMuzzleIndex)
9 {
11 if (inventoryItem)
12 {
13 ItemAttributeCollection attribs = inventoryItem.GetAttributes();
14 // Is there a way to find all of them?
16 if (waa)
17 {
18 if (!waa.ApplyModifiers(this, iMuzzleIndex, entity))
19 {
20 Print("WARNING: One or more override stats failed to set", LogLevel.ERROR);
21 Print(string.Format("Entity: %1, Attachment Entity %2", GetOwner(), entity), LogLevel.ERROR);
22 }
23 }
24 }
25 }
26
27 override void OnWeaponDetachedAttachment(IEntity entity, int iMuzzleIndex)
28 {
30 if (inventoryItem)
31 {
32 ItemAttributeCollection attribs = inventoryItem.GetAttributes();
33 // Is there a way to find all of them?
35 if (waa)
36 {
37 waa.ClearModifiers(this, iMuzzleIndex, entity);
38 }
39 }
40 }
41}
proto external Managed FindComponent(typename typeName)
IEntity GetOwner()
Owner entity of the fuel tank.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
event void OnWeaponDetachedAttachment(IEntity entity, int iMuzzleIndex)
event void OnWeaponAttachedAttachment(IEntity entity, int iMuzzleIndex)