PetMuun and Mount in SafeZone

Started by Dorin, May 29, 2023, 10:55 PM

Dorin

PetMuun and Mount in SafeZone

Quotecustompet.cpp

add this if you don't get an error when compiling
#include "User.h"
#include "Object.h"
#include "Import.h"


Here's a video of how it will look



Procure por esta linha
int cCustomPet::GetInfoPetType(int ItemIndex) // OK
{
  lpViewObj MuunMount = &*(ObjectPreview*)(oUserPreviewStruct);


  std::map<int, CUSTOM_PET_INFO>::iterator it = this->m_CustomPetInfo.find(ItemIndex);


  if(it != this->m_CustomPetInfo.end())
  {
              if (MuunMount->InSafeZone)
          {
      return 8;
          }
          else
          {
      return it->second.PetType;
          }
  }
  return -1;
}




Faça o mesmo aqui

float cCustomPet::GetScaleView(int ItemIndex)
{
    lpViewObj MuunMount = &*(ObjectPreview*)(oUserPreviewStruct);
   
    std::map<int, CUSTOM_PET_INFO>::iterator it = this->m_CustomPetInfo.find(ItemIndex);
   
    float viewpet = 0;
   
    if(it != this->m_CustomPetInfo.end())
    {
        viewpet = it->second.Scale_View - 0.5;


        if (MuunMount->InSafeZone)
        {
            return viewpet;
        }
        else
        {
            return it->second.Scale_View;
        }
    }


    return -1;
}
  •  

Dorin

#1

Quotecustompet.cpp

#include "User.h"
#include "Object.h"
#include "Import.h"

int cCustomPet::GetInfoPetType(int ItemIndex) // OK
{
  lpViewObj MuunMount = &*(ObjectPreview*)(oUserPreviewStruct);

  std::map<int, CUSTOM_PET_INFO>::iterator it = this->m_CustomPetInfo.find(ItemIndex);

  if(it != this->m_CustomPetInfo.end())
  {
              if (MuunMount->InSafeZone)
          {
      return 8;
          }
          else
          {
      return it->second.PetType;
          }
  }
  return -1;
}

float cCustomPet::GetScaleView(int ItemIndex)
{
lpViewObj MuunMount = &*(ObjectPreview*)(oUserPreviewStruct);
std::map<int, CUSTOM_PET_INFO>::iterator it = this->m_CustomPetInfo.find(ItemIndex);
float viewpet = 0;
if(it != this->m_CustomPetInfo.end())
{
viewpet = it->second.Scale_View - 0.5;
if (MuunMount->InSafeZone)
{
return viewpet;
}
else
{
return it->second.Scale_View;
}
}
return -1;
}
  •  

Powered by SMFPacks Ads Manager Mod