示例#1
0
        public override void OnStart()
        {
            if (!Manager.ObjectManager.IsInGame)
            {
                return;
            }

            WoWLocalPlayer lp = Manager.LocalPlayer;

            if (CHANGE_DISPLAYID)
            {
                DefaultDisplayID = lp.GetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_NATIVEDISPLAYID);
                lp.SetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_DISPLAYID, MORPH_DISPLAYID);
                Print("Changing display ID from {0} to {1}", DefaultDisplayID, MORPH_DISPLAYID);
            }

            if (CHANGE_SCALE)
            {
                DefaultScale = lp.GetDescriptor <float>(WoWObjectFields.OBJECT_FIELD_SCALE_X);
                lp.SetDescriptor <float>(WoWObjectFields.OBJECT_FIELD_SCALE_X, MORPH_SCALE);
                Print("Changing scale from {0:1} to {1:1}", DefaultScale, MORPH_SCALE);
            }

            // TODO: Implement CGUnit_C__UpdateModel VMT
        }
示例#2
0
        public override void OnTerminate()
        {
            WoWLocalPlayer lp = Manager.LocalPlayer;

            if (CHANGE_DISPLAYID)
            {
                lp.SetDescriptor <uint>(WoWUnitFields.UNIT_FIELD_DISPLAYID, DefaultDisplayID);
            }
            if (CHANGE_SCALE)
            {
                lp.SetDescriptor <float>(WoWObjectFields.OBJECT_FIELD_SCALE_X, DefaultScale);
            }

            // TODO: Implement CGUnit_C__UpdateModel VMT
        }