예제 #1
0
 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();
 }
예제 #2
0
        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;
        }