132 {
133 BarbedWireActionData actionDataBW = BarbedWireActionData.Cast(action_data);
135
136
137 BarbedWire wire = BarbedWire.Cast(base_building.FindAttachmentBySlotName(actionDataBW.m_SlotName));
138 wire.SetMountedState(true);
139
140 if (wire.GetDeploySoundset() != string.Empty)
141 wire.StartItemSoundServer(SoundConstants.ITEM_DEPLOY);
142
143
144 string zone = "invalid";
145 array<string> zones = new array<string>;
146 zones.Copy(base_building.GetEntityDamageZoneMap().GetKeyArray());
147
148 string tmp = "";
149 string test = "";
150 for (int i = 0; i < zones.Count(); i++)
151 {
152 tmp = zones.Get(i);
153 test = tmp;
155
156 if (test == actionDataBW.m_SlotName)
157 {
158 zone = tmp;
159 break;
160 }
161 }
162
163 base_building.SetHealth01(zone,"Health",wire.GetHealth01("","Health"));
164 }
proto int ToLower()
Changes string to lowercase. Returns length.