Compile fix.

This commit is contained in:
tomrus88 2010-01-09 21:47:16 +03:00
parent aa668bc66f
commit a8b04f09e0
3 changed files with 22 additions and 19 deletions

View file

@ -136,7 +136,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
}
PetType pet_type = PetType(fields[18].GetUInt8());
if(pet_type==HUNTER_PET)
if(pet_type == HUNTER_PET)
{
CreatureInfo const* creatureInfo = ObjectMgr::GetCreatureTemplate(petentry);
if(!creatureInfo || !creatureInfo->isTameable(owner->CanTameExoticPets()))
@ -210,7 +210,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
case HUNTER_PET:
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
SetSheath(SHEATH_STATE_MELEE);
SetByteValue(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_RENAME_NOT_ALLOWED : UNIT_RENAME_ALLOWED);
SetByteFlag(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_CAN_BE_ABANDONED : UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED);
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
// this enables popup window (pet abandon, cancel)
@ -409,8 +409,8 @@ void Pet::SavePetToDB(PetSaveMode mode)
<< uint32(m_charmInfo->GetReactState()) << ", "
<< uint32(mode) << ", '"
<< name.c_str() << "', "
<< uint32((GetByteValue(UNIT_FIELD_BYTES_2, 2) == UNIT_RENAME_ALLOWED)?0:1) << ", "
<< (curhealth<1?1:curhealth) << ", "
<< uint32(HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ? 0 : 1) << ", "
<< (curhealth < 1 ? 1 : curhealth) << ", "
<< curmana << ", "
<< GetPower(POWER_HAPPINESS) << ", '";
@ -784,7 +784,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
{
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
SetSheath(SHEATH_STATE_MELEE);
SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED);
SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED);
SetUInt32Value(UNIT_MOD_CAST_SPEED, creature->GetUInt32Value(UNIT_MOD_CAST_SPEED));
}
return true;