mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
fix(Spells/SpellInfoCorrections) Remove friendly mask on goblins (#18912)
Co-authored-by: Jelle Meeus <sogladev@gmail.com>
This commit is contained in:
@@ -4925,6 +4925,14 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1921)); // The Taunka
|
||||
factionTemplateEntry->hostileMask |= 8;
|
||||
|
||||
// Remove 1 from guards friendly mask, making able to attack players
|
||||
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1857)); // Area 52 Bruiser
|
||||
factionTemplateEntry->friendlyMask &= ~1;
|
||||
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1806)); // Netherstorm Agent
|
||||
factionTemplateEntry->friendlyMask &= ~1;
|
||||
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1812)); // K3 Bruiser
|
||||
factionTemplateEntry->friendlyMask &= ~1;
|
||||
|
||||
// Remove vehicles attr, making accessories selectable
|
||||
VehicleSeatEntry* vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(4689)); // Siege Engine, Accessory
|
||||
vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
|
||||
|
||||
@@ -572,6 +572,10 @@ public:
|
||||
if (!SpawnAssoc)
|
||||
return;
|
||||
|
||||
// check if they're hostile
|
||||
if (!(me->IsHostileTo(who) || who->IsHostileTo(me)))
|
||||
return;
|
||||
|
||||
if (me->IsValidAttackTarget(who))
|
||||
{
|
||||
Player* playerTarget = who->ToPlayer();
|
||||
|
||||
Reference in New Issue
Block a user