Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
replaceitemwithnewlambda.c
Go to the documentation of this file.
1
4
class
ReplaceItemWithNewLambda
:
ReplaceItemWithNewLambdaBase
5
{
6
PlayerBase
m_Player
;
7
int
m_IndexQB
;
8
9
void
ReplaceItemWithNewLambda
(
EntityAI
old_item,
string
new_item_type,
PlayerBase
player)
10
{
11
m_Player
= player;
12
m_IndexQB
= -1;
13
14
if
(
m_Player
)
15
m_IndexQB
=
m_Player
.FindQuickBarEntityIndex(old_item);
16
}
17
23
override
void
CopyOldPropertiesToNew
(notnull
EntityAI
old_item,
EntityAI
new_item)
24
{
25
super.CopyOldPropertiesToNew(old_item, new_item);
26
27
if
(
m_Player
&&
m_IndexQB
!= -1)
28
{
29
m_Player
.SetQuickBarEntityShortcut(new_item,
m_IndexQB
,
true
);
30
}
31
}
32
33
override
void
OnSuccess
(
EntityAI
new_item)
34
{
35
super.OnSuccess(new_item);
36
37
if
(
m_Player
&&
m_IndexQB
!= -1)
38
{
39
m_Player
.SetQuickBarEntityShortcut(new_item,
m_IndexQB
,
true
);
40
}
41
}
42
};
43
EntityAI
Definition
inventoryitem.c:2
PlayerBase
Definition
playerbaseclient.c:2
ReplaceItemWithNewLambdaBase
base class for transformation operations (creating one item from another)
Definition
replaceitemwithnewlambdabase.c:5
ReplaceItemWithNewLambda
adds automatic QuickBar handling
Definition
miscgameplayfunctions.c:2
ReplaceItemWithNewLambda::CopyOldPropertiesToNew
override void CopyOldPropertiesToNew(notnull EntityAI old_item, EntityAI new_item)
Definition
replaceitemwithnewlambda.c:23
ReplaceItemWithNewLambda::OnSuccess
override void OnSuccess(EntityAI new_item)
Definition
replaceitemwithnewlambda.c:33
ReplaceItemWithNewLambda::m_IndexQB
int m_IndexQB
Definition
replaceitemwithnewlambda.c:7
ReplaceItemWithNewLambda::m_Player
PlayerBase m_Player
Definition
replaceitemwithnewlambda.c:6
ReplaceItemWithNewLambda::ReplaceItemWithNewLambda
void ReplaceItemWithNewLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Definition
replaceitemwithnewlambda.c:9
Games
Dayz
scripts
4_world
systems
inventory
replaceitemwithnewlambda.c
Generated by
1.17.0