Esempio n. 1
0
        public uint GetFirstVisibleModel()
        {
            CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId1);

            if (modelInfo != null && !modelInfo.IsTrigger)
            {
                return(ModelId1);
            }

            modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId2);
            if (modelInfo != null && !modelInfo.IsTrigger)
            {
                return(ModelId2);
            }

            modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId3);
            if (modelInfo != null && !modelInfo.IsTrigger)
            {
                return(ModelId3);
            }

            modelInfo = Global.ObjectMgr.GetCreatureModelInfo(ModelId4);
            if (modelInfo != null && !modelInfo.IsTrigger)
            {
                return(ModelId4);
            }

            return(17519);
        }
Esempio n. 2
0
        public CreatureModel GetFirstVisibleModel()
        {
            foreach (CreatureModel model in Models)
            {
                CreatureModelInfo modelInfo = Global.ObjectMgr.GetCreatureModelInfo(model.CreatureDisplayID);
                if (modelInfo != null && !modelInfo.IsTrigger)
                {
                    return(model);
                }
            }

            return(CreatureModel.DefaultVisibleModel);
        }