public VanityPet(Player owner, uint creature) : base(EntityType.Pet) { OwnerGuid = owner.Guid; Creature = GameTableManager.Creature2.GetEntry(creature); Creature2DisplayGroup = GameTableManager.Creature2DisplayGroupEntry.Entries.SingleOrDefault(x => x.Creature2DisplayGroupId == Creature.Creature2DisplayGroupId); DisplayInfo = Creature2DisplayGroup.Creature2DisplayInfoId; SetProperty(Property.BaseHealth, 800.0f, 800.0f); SetStat(Stat.Health, 800u); SetStat(Stat.Level, 3u); SetStat(Stat.Sheathed, 0u); }
public Mount(Player owner, uint spell4Id, uint creatureId, uint vehicleId, uint itemDisplayId) : base(EntityType.Mount, creatureId, vehicleId, spell4Id) { OwnerGuid = owner.Guid; MountType = vehicleId == 411 ? PetType.HoverBoard : PetType.GroundMount; PilotDisplayInfo = GameTableManager.Instance.ItemDisplay.GetEntry(itemDisplayId); Rotation = owner.Rotation; Position = owner.Position; Creature2DisplayGroupEntryEntry displayGroupEntry = GameTableManager.Instance.Creature2DisplayGroupEntry.Entries .SingleOrDefault(x => x.Creature2DisplayGroupId == CreatureEntry.Creature2DisplayGroupId); DisplayInfo = displayGroupEntry?.Creature2DisplayInfoId ?? 0u; CreateFlags |= EntityCreateFlag.SpawnAnimation; }
private void HandleEffectDisguise(UnitEntity target, SpellTargetInfo.SpellTargetEffectInfo info) { if (!(target is Player player)) { return; } Creature2Entry creature2 = GameTableManager.Instance.Creature2.GetEntry(info.Entry.DataBits02); if (creature2 == null) { return; } Creature2DisplayGroupEntryEntry displayGroupEntry = GameTableManager.Instance.Creature2DisplayGroupEntry.Entries.FirstOrDefault(d => d.Creature2DisplayGroupId == creature2.Creature2DisplayGroupId); if (displayGroupEntry == null) { return; } player.SetDisplayInfo(displayGroupEntry.Creature2DisplayInfoId); }