[9209] Finish synchonization walk mode for pets.

* Re-sync at follow mode switches
* Support sync for creature pets

Also
* Attempt fix build at *nix
* Drop unused unut state mask with typo in name.
This commit is contained in:
VladimirMangos 2010-01-18 14:27:38 +03:00
parent 6a2e8064f1
commit e1d0c1cdba
9 changed files with 62 additions and 27 deletions

View file

@ -3524,8 +3524,7 @@ void Spell::EffectSummon(uint32 i)
spawnCreature->GetCharmInfo()->SetPetNumber(pet_number, false);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
spawnCreature->UpdateWalkModeForPets(((Player*)m_caster)->HasMovementFlag(MOVEMENTFLAG_WALK_MODE));
spawnCreature->UpdateWalkMode(m_caster);
spawnCreature->AIM_Initialize();
spawnCreature->InitPetCreateSpells();
@ -4393,8 +4392,7 @@ void Spell::EffectSummonPet(uint32 i)
NewSummon->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
NewSummon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
NewSummon->UpdateWalkModeForPets(((Player*)m_caster)->HasMovementFlag(MOVEMENTFLAG_WALK_MODE));
NewSummon->UpdateWalkMode(m_caster);
NewSummon->GetCharmInfo()->SetPetNumber(pet_number, true);
// this enables pet details window (Shift+P)