[9861] Backporting some code chnages from 400 branch.

(based on 400's commit 0f37423)
(based on 400's commit 636cfef)
(based on 400's commit 0bbe3a7)
(based on 400's commit ce86b56)
(based on 400's commit b74c6a8)
This commit is contained in:
tomrus88 2010-05-10 23:27:05 +04:00 committed by VladimirMangos
parent a0d9ffcc5f
commit ff2cda6af1
18 changed files with 68 additions and 43 deletions

View file

@ -12160,14 +12160,14 @@ uint32 Unit::GetCreatePowers( Powers power ) const
// POWER_FOCUS and POWER_HAPPINESS only have hunter pet
switch(power)
{
case POWER_MANA: return GetCreateMana();
case POWER_RAGE: return 1000;
case POWER_FOCUS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 100);
case POWER_ENERGY: return 100;
case POWER_HAPPINESS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 1050000);
case POWER_HEALTH: return 0;
case POWER_MANA: return GetCreateMana();
case POWER_RAGE: return 1000;
case POWER_FOCUS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 100);
case POWER_ENERGY: return 100;
case POWER_HAPPINESS: return (GetTypeId()==TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 1050000);
case POWER_RUNIC_POWER: return 1000;
case POWER_RUNE: return 0;
case POWER_HEALTH: return 0;
case POWER_RUNE: return 0;
}
return 0;