1163 {
1164 super.OnItemLocationChanged(old_owner, new_owner);
1165
1168
1169 if (!relatedPlayer && playerNew)
1170 relatedPlayer = playerNew;
1171
1172 if (relatedPlayer && relatedPlayer.GetPerformedActionID() != -1)
1173 {
1175 if (actionMgr)
1176 {
1177 ActionBase currentAction = actionMgr.GetRunningAction();
1178 if (currentAction)
1179 currentAction.OnItemLocationChanged(this);
1180 }
1181 }
1182
1183 Man ownerPlayerOld = null;
1184 Man ownerPlayerNew = null;
1185
1186 if (old_owner)
1187 {
1188 if (old_owner.
IsMan())
1189 {
1190 ownerPlayerOld = Man.Cast(old_owner);
1191 }
1192 else
1193 {
1194 ownerPlayerOld = Man.Cast(old_owner.GetHierarchyRootPlayer());
1195 }
1196 }
1197 else
1198 {
1199 if (new_owner && IsElectricAppliance() && GetCompEM() && GetCompEM().IsPlugged())
1200 {
1202
1203 if (!action || !playerNew || playerNew.GetPerformedActionID() != action.GetID())
1204 {
1205 GetCompEM().UnplugThis();
1206 }
1207 }
1208 }
1209
1210 if (new_owner)
1211 {
1212 if (new_owner.
IsMan())
1213 {
1214 ownerPlayerNew = Man.Cast(new_owner);
1215 }
1216 else
1217 {
1218 ownerPlayerNew = Man.Cast(new_owner.GetHierarchyRootPlayer());
1219 }
1220 }
1221
1222 if (ownerPlayerOld != ownerPlayerNew)
1223 {
1224 if (ownerPlayerOld)
1225 {
1228 for (int i = 0; i < subItemsExit.Count(); i++)
1229 {
1232 }
1233 }
1234
1235 if (ownerPlayerNew)
1236 {
1239 for (int j = 0; j < subItemsEnter.Count(); j++)
1240 {
1243 }
1244 }
1245 }
1246 else if (ownerPlayerNew != null)
1247 {
1249 if (
PlayerBase.CastTo(nplayer, ownerPlayerNew))
1250 {
1253 for (int k = 0; k < subItemsUpdate.Count(); k++)
1254 {
1256 itemUpdate.UpdateQuickbarShortcutVisibility(nplayer);
1257 }
1258 }
1259 }
1260
1261 if (old_owner)
1262 old_owner.OnChildItemRemoved(this);
1263 if (new_owner)
1264 new_owner.OnChildItemReceived(this);
1265 }
void ActionManagerBase(PlayerBase player)
override void OnInventoryEnter(Man player)
override void OnInventoryExit(Man player)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
InventoryTraversalType
tree traversal type, for more see http://en.wikipedia.org/wiki/Tree_traversal