public static bool TryCreateChest(this ActorCommonData acd, bool CheckForRacks = false) { if (!CheckForRacks) { if ((acd.IsValidGizmoChest()) && acd.x004_Name.ToLower().IndexOf("chest") != -1) { return(true); } } else { if (acd.IsValidGizmoChest()) { return(true); } } /* else if (acd.x180_GizmoType == GizmoType.Switch) * { * switch (acd.x090_ActorSnoId) * { * case 0x0005900F: // x1_Global_Chest_CursedChest * case 0x00059229: // x1_Global_Chest_CursedChest_B * return true; * } * }*/ return(false); }
public static bool TryCreateResplendent(this ActorCommonData acd) { if ((acd.x004_Name.ToLower().IndexOf("chest") != -1) && (acd.x004_Name.ToLower().IndexOf("rare") != -1)) { if (acd.IsValidGizmoChest()) { return(true); } } return(false); }
public bool IsValid() { int ActorId = Actor.x000_Id; if (ActorId == -1 || ActorId != ACDID) //|| Actor.Address != Id) { return(false); } if (IsMonster) { return(Actor.x188_Hitpoints != 0); } if (IsItem) { return((int)Actor.x114_ItemLocation == -1); } else { if (Type == MapItemElement.AT_Chests || Type == MapItemElement.AT_ResplendentChest) { if (Type == MapItemElement.AT_Chests) { return(Actor.IsValidGizmoChest()); } else { return(Actor.TryCreateResplendent()); } } else if (Type == MapItemElement.AT_Shrines || Type == MapItemElement.AT_PowerPylons) { return(Actor.GetAttribute(Enigma.D3.Enums.AttributeId.GizmoHasBeenOperated) != 1); } else if (Type == MapItemElement.AT_PoolOfReflection) { return(Actor.GetAttribute(Enigma.D3.Enums.AttributeId.GizmoHasBeenOperated) != 1); } } return(true); }