public void AddCreatureEntity(creature creature) { var guid = new ObjectGUID((ulong)creature.guid, TypeID.TYPEID_UNIT); var creatureEntity = new CreatureEntity(guid, creature, vanillaWorld); CreatureEntities.Add(creatureEntity); creatureEntity.Setup(); }
public CreatureInfo(ObjectGUID objectGUID, creature creature, creature_template template) : base(objectGUID) { DisplayID = NativeDisplayID = creature.modelid; Health = (int)creature.curhealth; MaxHealth = (int)template.MaxLevelHealth; Level = template.MaxLevel; NPCFlags = (int)template.NpcFlags; DynamicFlags = (int)template.DynamicFlags; UnitFlag = (int)template.UnitFlags; FactionTemplate = (uint)template.FactionAlliance; Entry = template.Entry; //Used to set the creature name. CombatReach = 30f; }