mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
Compile fix.
This commit is contained in:
parent
aa668bc66f
commit
a8b04f09e0
3 changed files with 22 additions and 19 deletions
|
|
@ -210,7 +210,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
|
||||||
case HUNTER_PET:
|
case HUNTER_PET:
|
||||||
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
||||||
SetSheath(SHEATH_STATE_MELEE);
|
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);
|
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||||
// this enables popup window (pet abandon, cancel)
|
// this enables popup window (pet abandon, cancel)
|
||||||
|
|
@ -409,7 +409,7 @@ void Pet::SavePetToDB(PetSaveMode mode)
|
||||||
<< uint32(m_charmInfo->GetReactState()) << ", "
|
<< uint32(m_charmInfo->GetReactState()) << ", "
|
||||||
<< uint32(mode) << ", '"
|
<< uint32(mode) << ", '"
|
||||||
<< name.c_str() << "', "
|
<< name.c_str() << "', "
|
||||||
<< uint32((GetByteValue(UNIT_FIELD_BYTES_2, 2) == UNIT_RENAME_ALLOWED)?0:1) << ", "
|
<< uint32(HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ? 0 : 1) << ", "
|
||||||
<< (curhealth < 1 ? 1 : curhealth) << ", "
|
<< (curhealth < 1 ? 1 : curhealth) << ", "
|
||||||
<< curmana << ", "
|
<< curmana << ", "
|
||||||
<< GetPower(POWER_HAPPINESS) << ", '";
|
<< GetPower(POWER_HAPPINESS) << ", '";
|
||||||
|
|
@ -784,7 +784,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
||||||
{
|
{
|
||||||
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
||||||
SetSheath(SHEATH_STATE_MELEE);
|
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));
|
SetUInt32Value(UNIT_MOD_CAST_SPEED, creature->GetUInt32Value(UNIT_MOD_CAST_SPEED));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
|
||||||
Pet* pet = _player->GetMap()->GetPet(petguid);
|
Pet* pet = _player->GetMap()->GetPet(petguid);
|
||||||
// check it!
|
// check it!
|
||||||
if( !pet || pet->getPetType() != HUNTER_PET ||
|
if( !pet || pet->getPetType() != HUNTER_PET ||
|
||||||
pet->GetByteValue(UNIT_FIELD_BYTES_2, 2) != UNIT_RENAME_ALLOWED ||
|
!pet->HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ||
|
||||||
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo() )
|
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -461,7 +461,7 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
|
||||||
if(_player->GetGroup())
|
if(_player->GetGroup())
|
||||||
_player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME);
|
_player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_NAME);
|
||||||
|
|
||||||
pet->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_NOT_ALLOWED);
|
pet->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||||
|
|
||||||
if(isdeclined)
|
if(isdeclined)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4446,7 +4446,10 @@ void Spell::EffectSummonPet(uint32 i)
|
||||||
NewSummon->SetName(new_name);
|
NewSummon->SetName(new_name);
|
||||||
}
|
}
|
||||||
else if(NewSummon->getPetType() == HUNTER_PET)
|
else if(NewSummon->getPetType() == HUNTER_PET)
|
||||||
NewSummon->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_NOT_ALLOWED);
|
{
|
||||||
|
NewSummon->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||||
|
NewSummon->SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_ABANDONED);
|
||||||
|
}
|
||||||
|
|
||||||
NewSummon->AIM_Initialize();
|
NewSummon->AIM_Initialize();
|
||||||
NewSummon->SetHealth(NewSummon->GetMaxHealth());
|
NewSummon->SetHealth(NewSummon->GetMaxHealth());
|
||||||
|
|
@ -6953,7 +6956,7 @@ void Spell::EffectRenamePet(uint32 /*eff_idx*/)
|
||||||
!((Creature*)unitTarget)->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
!((Creature*)unitTarget)->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unitTarget->SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED);
|
unitTarget->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::EffectPlayMusic(uint32 i)
|
void Spell::EffectPlayMusic(uint32 i)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue