Skip to content
Permalink
Browse files

Revert recent skinning/harvesting flag patches

This reverts commit 9be9e74.
This reverts commit df16cba.

9be9e74#commitcomment-37188928
  • Loading branch information
Warlockbugs committed Feb 8, 2020
1 parent c8f099e commit 337ba2202f83864254c9ed3338845ce54b8d2f6b
Showing with 3 additions and 31 deletions.
  1. +3 −31 src/game/Entities/Object.cpp
@@ -448,38 +448,10 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, UpdateMask* u
*data << uint32(0);
}

// Alter unit flags when required
else if (index == UNIT_FIELD_FLAGS)
// Gamemasters should be always able to select units - remove not selectable flag
else if (index == UNIT_FIELD_FLAGS && target->isGameMaster())
{
uint32 value = m_uint32Values[index];

// Gamemasters should be always able to select units - remove not selectable flag
if (target->isGameMaster())
value &= ~UNIT_FLAG_NOT_SELECTABLE;

// Conceal gathering profession loot hint for creatures when player doens't have appropriate skill for it
// Gamemasters should see this hint regardless of skill
if ((value & UNIT_FLAG_SKINNABLE) && !target->isGameMaster() && GetTypeId() == TYPEID_UNIT)
{
const uint32 flags = static_cast<const Creature*>(this)->GetCreatureInfo()->CreatureTypeFlags;

if (flags & (CREATURE_TYPEFLAGS_HERBLOOT | CREATURE_TYPEFLAGS_MININGLOOT | CREATURE_TYPEFLAGS_ENGINEERLOOT))
{
uint16 skillid;

if (flags & CREATURE_TYPEFLAGS_HERBLOOT)
skillid = SKILL_HERBALISM;
else if (flags & CREATURE_TYPEFLAGS_MININGLOOT)
skillid = SKILL_MINING;
else // (flags & CREATURE_TYPEFLAGS_ENGINEERLOOT)
skillid = SKILL_ENGINEERING;

if (!target->HasSkill(skillid))
value &= ~UNIT_FLAG_SKINNABLE;
}
}

*data << value;
*data << (m_uint32Values[index] & ~UNIT_FLAG_NOT_SELECTABLE);
}
// Hide lootable animation for unallowed players
// Handle tapped flag

0 comments on commit 337ba22

Please sign in to comment.
You can’t perform that action at this time.