Forum > Serverside Modding
[SHOWOFF] Infinite Happyness for hunter pets.
(1/1)
Kian:
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
schlumpf:
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; }
Navigation
[0] Message Index
|