public C_WoWGameObject(WoWGameObject obj) : base(obj) { RefWoWGameObject = obj; switch (SubType) { case WoWObjectTypes.OreVein: ShouldLoot = TargetManager.CheckLootFlag(TargetManager.LootFlags.Ore); IgnoresRemoval = Player.InsideGarrison; InteractRange = 6f; LineofSightWaitTimer = new WaitTimer(new TimeSpan(0, 0, 0, 2, 500)); LineofSightWaitTimer.Stop(); break; case WoWObjectTypes.Herb: ShouldLoot = TargetManager.CheckLootFlag(TargetManager.LootFlags.Herbs); IgnoresRemoval = Player.InsideGarrison; InteractRange = 5f; break; case WoWObjectTypes.GarrisonCommandTable: case WoWObjectTypes.GarrisonCache: IgnoresRemoval = true; return; case WoWObjectTypes.GarrisonShipment: InteractRange = 5.8f; IgnoresRemoval = true; return; case WoWObjectTypes.GarrisonFinalizePlot: break; case WoWObjectTypes.Mailbox: InteractRange = 6f; IgnoresRemoval = true; return; case WoWObjectTypes.Timber: ShouldLoot = TargetManager.CheckLootFlag(TargetManager.LootFlags.Lumber); InteractRange = 5f; break; case WoWObjectTypes.Unknown: RequiresUpdate = false; break; } if (!ObjectCacheManager.LootIds.Contains(Entry)) { return; } ShouldLoot = true; RequiresUpdate = true; }
public override bool Update() { if (!base.Update()) { return(false); } Flags = RefWoWUnit.Flags; Location = RefWoWUnit.Location; IsDead = RefWoWUnit.IsDead; UpdateHitPoints(); if (ObjectCacheManager.IsQuesting || IsQuestNpc) { CanInteract = RefWoWUnit.CanInteract; QuestGiverStatus = RefWoWUnit.QuestGiverStatus; } if (IsDead) { if (ShouldLoot) { Lootable = RefWoWUnit.Lootable; } if (TargetManager.CheckLootFlag(TargetManager.LootFlags.Skinning)) { Skinnable = RefWoWUnit.Skinnable; } } else { TargetGuid = RefWoWUnit.CurrentTargetGuid; if (ShouldKill) { InCombat = RefWoWUnit.Combat; CanSelect = RefWoWUnit.CanSelect; IsEvadeRunningBack = RefWoWUnit.IsEvadeRunningBack; Attackable = RefWoWUnit.Attackable; TaggedByMe = RefWoWUnit.TaggedByMe; IsTagged = RefWoWUnit.IsTagged; } } return(true); }
public C_WoWUnit(WoWUnit obj) : base(obj) { RefWoWUnit = obj; TargetGuid = obj.CurrentTargetGuid; switch (SubType) { case WoWObjectTypes.GarrisonCommandTable: InteractRange = 4.55f; IgnoresRemoval = true; return; case WoWObjectTypes.GarrisonWorkOrderNpc: InteractRange = 5.4f; IgnoresRemoval = true; return; case WoWObjectTypes.PrimalTrader: IgnoresRemoval = true; return; case WoWObjectTypes.Vendor: IgnoresRemoval = Player.InsideGarrison; return; case WoWObjectTypes.Trap: Location.Normalize(); return; } if (ObjectCacheManager.QuestNpcIds.Contains(Entry)) { InteractRange = 5.4f; IsQuestNpc = true; } if (TargetManager.CheckLootFlag(TargetManager.LootFlags.Units) || ObjectCacheManager.LootIds.Contains(Entry)) { ShouldLoot = true; } if (ObjectCacheManager.CombatIds.Contains(Entry)) { ShouldKill = true; } }