Core/Units: Reduce differences between branches part 1 - unit updatefield accessors

This commit is contained in:
Shauren
2022-03-29 11:30:49 +02:00
parent c02b829788
commit d611925dc7
232 changed files with 1587 additions and 1436 deletions

View File

@@ -305,7 +305,7 @@ SpellInfo const* ScriptedAI::SelectSpell(Unit* target, uint32 school, uint32 mec
return nullptr;
// Silenced so we can't cast
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
if (me->HasUnitFlag(UNIT_FLAG_SILENCED))
return nullptr;
// Using the extended script system we first create a list of viable spells
@@ -471,13 +471,13 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
}
if (mainHand >= 0)
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(mainHand));
me->SetVirtualItem(0, uint32(mainHand));
if (offHand >= 0)
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(offHand));
me->SetVirtualItem(1, uint32(offHand));
if (ranged >= 0)
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(ranged));
me->SetVirtualItem(2, uint32(ranged));
}
void ScriptedAI::SetCombatMovement(bool allowMovement)