mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-14 12:12:34 -04:00
Core/Units: Reduce differences between branches part 1 - unit updatefield accessors
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user