Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Kian on June 22, 2010, 03:45:23 pm

Title: [SHOWOFF] Infinite Happyness for hunter pets.
Post by: Kian on June 22, 2010, 03:45:23 pm
Hi guys, I found the Happiness State check when I checked the Arcemu code.

Search for this :

HappinessState Pet::GetHappinessState()
{
   //gets happiness state from happiness points
   uint32 pts = GetUInt32Value( UNIT_FIELD_POWER5 );
   if( pts < PET_HAPPINESS_UPDATE_VALUE )
      return UNHAPPY;
   else if( pts >= PET_HAPPINESS_UPDATE_VALUE << 1 )
      return HAPPY;
   else
      return CONTENT;

and change it to:

HappinessState Pet::GetHappinessState()
{
   //gets happiness state from happiness points
   uint32 pts = GetUInt32Value( UNIT_FIELD_POWER5 );
   if( pts < PET_HAPPINESS_UPDATE_VALUE )
      return HAPPY;
   else if( pts >= PET_HAPPINESS_UPDATE_VALUE << 1 )
      return HAPPY;
   else
      return HAPPY

Then your Hunter pet will be content forever.

Mfg Kian
Title: Re: [SHOWOFF] Infinite Happyness for hunter pets.
Post by: schlumpf on June 25, 2010, 12:40:29 am
Or do it even nicer and do:

HappinessState Pet::GetHappinessState()
{
- //gets happiness state from happiness points
- uint32 pts = GetUInt32Value( UNIT_FIELD_POWER5 );
- if( pts < PET_HAPPINESS_UPDATE_VALUE )
- return UNHAPPY;
- else if( pts >= PET_HAPPINESS_UPDATE_VALUE << 1 )
- return HAPPY;
- else
- return CONTENT;
+ return HAPPY;
}