Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2009-10-28 04:58:48 +03:00
commit f2d0f6f868
256 changed files with 52987 additions and 617 deletions

View file

@ -633,8 +633,17 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
// remove custom flag before sending
uint32 appendValue = m_uint32Values[ index ] & ~UNIT_NPC_FLAG_GUARD;
if (GetTypeId() == TYPEID_UNIT && !target->canSeeSpellClickOn((Creature*)this))
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
if (GetTypeId() == TYPEID_UNIT)
{
if (!target->canSeeSpellClickOn((Creature*)this))
appendValue &= ~UNIT_NPC_FLAG_SPELLCLICK;
if (appendValue & UNIT_NPC_FLAG_TRAINER)
{
if (!((Creature*)this)->isCanTrainingOf(target, false))
appendValue &= ~(UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_TRAINER_CLASS | UNIT_NPC_FLAG_TRAINER_PROFESSION);
}
}
*data << uint32(appendValue);
}