По поводу: Убиваем моба, делаем логаут, загружаемся, смотрим, труп моба который до логаута был IsFriendlyTo, стал IsHostileTo.
Если не ошибаюсь, то просматривать надо, этих два места ?
1) Player.cpp
PHP код:
bool Player::isAllowedToLoot(Creature* creature)
{
// never tapped by any (mob solo kill)
if (!creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED))
return false;
if (Player* recipient = creature->GetLootRecipient())
{
if (recipient == this)
return true;
if (Group* otherGroup = recipient->GetGroup())
{
Group* thisGroup = GetGroup();
if (!thisGroup)
return false;
return thisGroup == otherGroup;
}
return false;
}
else
// prevent other players from looting if the recipient got disconnected
return !creature->HasLootRecipient();
}
2) Object.cpp
PHP код:
// Gamemasters should be always able to select units - remove not selectable flag
else if (index == UNIT_FIELD_FLAGS && target->isGameMaster())
{
*data << (m_uint32Values***91;index***93; & ~UNIT_FLAG_NOT_SELECTABLE);
}
// hide lootable animation for unallowed players
else if (index == UNIT_DYNAMIC_FLAGS && GetTypeId() == TYPEID_UNIT)
{
if (!target->isAllowedToLoot((Creature*)this))
*data << (m_uint32Values***91;index***93; & ~(UNIT_DYNFLAG_LOOTABLE | UNIT_DYNFLAG_TAPPED_BY_PLAYER));
else
{
// flag only for original loot recipent
if (target->GetObjectGuid() == ((Creature*)this)->GetLootRecipientGuid())
*data << m_uint32Values***91;index***93;;
else
*data << (m_uint32Values***91;index***93; & ~(UNIT_DYNFLAG_TAPPED | UNIT_DYNFLAG_TAPPED_BY_PLAYER));
}
}
else
{
// send in current format (float as float, uint32 as uint32)
*data << m_uint32Values***91;index***93;;
}