37 {
39 {
41 string child_name = "";
42 int count;
43 array<string> resources = new array<string>;
44
46 {
48 count =
g_Game.ConfigGetChildrenCount (
path );
49 for (int i = 0; i < count; i++)
50 {
51 g_Game.ConfigGetChildName (
path, i, child_name );
52
53 if (
g_Game.ConfigGetInt(
path +
" " + child_name +
" value" ) )
54 {
55 resources.Insert( child_name );
56 }
57 }
58
59
60 string itemType = resources.Get(0);
61 int itemCount =
g_Game.ConfigGetInt(
path +
" " + itemType +
" value" );
62
63 UnboxLambda lambda =
new UnboxLambda(action_data.
m_MainItem, itemType, action_data.
m_Player, itemCount);
64 action_data.
m_Player.ServerReplaceItemInHandsWithNew(lambda);
65 }
66 }
67 }