Skip to content

Commit

Permalink
Flags: Update UNKs from TC (#548)
Browse files Browse the repository at this point in the history
* Flags: Update UNKs from TC

* Flags: Mark non-implemented flags
  • Loading branch information
insunaa authored Oct 7, 2024
1 parent 41e8754 commit 018e87f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ struct boss_kologarnAI : public Scripted_NoMovementAI
{
m_pInstance = (instance_ulduar*)pCreature->GetInstanceData();
m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
m_creature->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_UNK15);
m_creature->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_CANNOT_TURN);
Reset();
}

Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3176,7 +3176,7 @@ void Player::InitStatsForLevel(bool reapplyMods)

// cleanup unit flags (will be re-applied if need at aura load).
RemoveFlag(UNIT_FIELD_FLAGS,
UNIT_FLAG_UNK_0 | UNIT_FLAG_SPAWNING | UNIT_FLAG_CLIENT_CONTROL_LOST | UNIT_FLAG_NOT_ATTACKABLE_1 |
UNIT_FLAG_SERVER_CONTROLLED | UNIT_FLAG_SPAWNING | UNIT_FLAG_CLIENT_CONTROL_LOST | UNIT_FLAG_NOT_ATTACKABLE_1 |
UNIT_FLAG_IMMUNE_TO_PLAYER | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_LOOTING |
UNIT_FLAG_PET_IN_COMBAT | UNIT_FLAG_SILENCED | UNIT_FLAG_PACIFIED |
UNIT_FLAG_STUNNED | UNIT_FLAG_IN_COMBAT | UNIT_FLAG_DISARMED |
Expand Down
41 changes: 21 additions & 20 deletions src/game/Entities/Unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ enum UnitVisibility
// Value masks for UNIT_FIELD_FLAGS
enum UnitFlags
{
UNIT_FLAG_UNK_0 = 0x00000001, // Movement checks disabled, likely paired with loss of client control packet. We use it to add custom cliffwalking to GM mode until actual usecases will be known.
UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // Movement checks disabled, likely paired with loss of client control packet. We use it to add custom cliffwalking to GM mode until actual usecases will be known.
UNIT_FLAG_SPAWNING = 0x00000002, // not attackable
UNIT_FLAG_CLIENT_CONTROL_LOST = 0x00000004, // Generic unspecified loss of control initiated by server script, movement checks disabled, paired with loss of client control packet.
UNIT_FLAG_PLAYER_CONTROLLED = 0x00000008, // players, pets, totems, guardians, companions, charms, any units associated with players
Expand All @@ -518,7 +518,7 @@ enum UnitFlags
UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8
UNIT_FLAG_PVP_DEPRECATED = 0x00001000, // changed in 3.0.3
UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1
UNIT_FLAG_UNK_14 = 0x00004000, // 2.0.8
UNIT_FLAG_CANNOT_SWIM = 0x00004000, // 2.0.8
UNIT_FLAG_SWIMMING = 0x00008000, // related to jerky movement in water?
UNIT_FLAG_UNTARGETABLE = 0x00010000, // is not targetable by attack or spell
UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok
Expand All @@ -541,24 +541,25 @@ enum UnitFlags
// Value masks for UNIT_FIELD_FLAGS_2
enum UnitFlags2
{
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_HIDE_BODY = 0x00000002, // Hides body and body armor. Weapons and shoulder and head armor still visible
UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004,
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_CLONED = 0x00000010, // Used in SPELL_AURA_MIRROR_IMAGE
UNIT_FLAG2_DO_NOT_FADE_IN = 0x00000020,
UNIT_FLAG2_FORCE_MOVE = 0x00000040,
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080, // also shield case
UNIT_FLAG2_UNK8 = 0x00000100,
UNIT_FLAG2_UNK9 = 0x00000200,
UNIT_FLAG2_DISARM_RANGED = 0x00000400,
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
UNIT_FLAG2_SPELL_CLICK_IN_GROUP = 0x00001000,
UNIT_FLAG2_SPELL_CLICK_DISABLED = 0x00002000,
UNIT_FLAG2_INTERACT_ANY_REACTION = 0x00004000,
UNIT_FLAG2_UNK15 = 0x00008000,
UNIT_FLAG2_UNK16 = 0x00010000,
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000,
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
UNIT_FLAG2_HIDE_BODY = 0x00000002, // Hides body and body armor. Weapons and shoulder and head armor still visible
UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004,
UNIT_FLAG2_COMPREHEND_LANG = 0x00000008,
UNIT_FLAG2_CLONED = 0x00000010, // Used in SPELL_AURA_MIRROR_IMAGE
UNIT_FLAG2_DO_NOT_FADE_IN = 0x00000020,
UNIT_FLAG2_FORCE_MOVE = 0x00000040,
UNIT_FLAG2_DISARM_OFFHAND = 0x00000080, // also shield case
UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, // NYI
UNIT_FLAG2_ALLOW_CHANGING_TALENTS = 0x00000200, // NYI
UNIT_FLAG2_DISARM_RANGED = 0x00000400,
UNIT_FLAG2_REGENERATE_POWER = 0x00000800,
UNIT_FLAG2_SPELL_CLICK_IN_GROUP = 0x00001000,
UNIT_FLAG2_SPELL_CLICK_DISABLED = 0x00002000,
UNIT_FLAG2_INTERACT_ANY_REACTION = 0x00004000,
UNIT_FLAG2_CANNOT_TURN = 0x00008000,
UNIT_FLAG2_UNK16 = 0x00010000,
UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // NYI
UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000,
};

/// Non Player Character flags
Expand Down
64 changes: 32 additions & 32 deletions src/game/Server/DBCEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,38 +559,38 @@ enum VehicleFlags

enum VehicleSeatFlags
{
SEAT_FLAG_HAS_ENTER_ANIM = 0x00000001, // "HasLowerAnimForEnter"
SEAT_FLAG_HAS_RIDE_ANIM = 0x00000002, // "HasLowerAnimForRide"
SEAT_FLAG_UNK3 = 0x00000004,
SEAT_FLAG_UNK4 = 0x00000008, // "ShouldUseVehicleSeatExitAnimationOnVoluntaryExit"
SEAT_FLAG_UNK5 = 0x00000010,
SEAT_FLAG_UNK6 = 0x00000020,
SEAT_FLAG_UNK7 = 0x00000040,
SEAT_FLAG_UNK8 = 0x00000080,
SEAT_FLAG_UNK9 = 0x00000100, // Note: only 5 seats are available with this flag in 3.3.5a; found only on flying dragons and harpoon guns
SEAT_FLAG_HIDE_PASSENGER = 0x00000200, // Passenger is hidden
SEAT_FLAG_ALLOW_TURNING = 0x00000400, // "AllowsTurning" | Note: allows the passenger to turn (change orientation) while boarded
SEAT_FLAG_CAN_CONTROL = 0x00000800, // Lua_UnitInVehicleControlSeat
SEAT_FLAG_CAN_CAST_MOUNT_SPELL = 0x00001000, // "Can Cast Mount Spell" | Note: there are no seats with this flag in 3.3.5a
SEAT_FLAG_UNCONTROLLED = 0x00002000, // "Uncontrolled"
SEAT_FLAG_CAN_ATTACK = 0x00004000, // Can attack, cast spells and use items from vehicle?
SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_FORCED_EXIT = 0x00008000, // "ShouldUseVehicleSeatExitAnimationOnForcedExit"
SEAT_FLAG_UNK14 = 0x00010000,
SEAT_FLAG_UNK15 = 0x00020000,
SEAT_FLAG_UNK16 = 0x00040000, // "HasVehicleExitAnimForVoluntaryExit"
SEAT_FLAG_UNK17 = 0x00080000, // "HasVehicleExitAnimForForcedExit"
SEAT_FLAG_NOT_SELECTABLE = 0x00100000,
SEAT_FLAG_UNK19 = 0x00200000, // Note: only 4 seats are available with this flag in 3.3.5a; found only on flying dragons
SEAT_FLAG_UNK20 = 0x00400000, // "RecHasVehicleEnterAnim"
// SEAT_FLAG_UNK21 = 0x00800000, // Lua_IsUsingVehicleControls | Note: there are no seats with this flag in 3.3.5a
SEAT_FLAG_UNK22 = 0x01000000, // "EnableVehicleZoom"
SEAT_FLAG_CAN_EXIT = 0x02000000, // Lua_CanExitVehicle
SEAT_FLAG_CAN_SWITCH = 0x04000000, // Lua_CanSwitchVehicleSeats
SEAT_FLAG_UNK23 = 0x08000000, // "HasStartWaitingForVehicleTransitionAnimEnter"
SEAT_FLAG_UNK24 = 0x10000000, // "HasStartWaitingForVehicleTransitionAnimExit"
SEAT_FLAG_CAN_CAST = 0x20000000, // Lua_UnitHasVehicleUI
SEAT_FLAG_UNK25 = 0x40000000,
SEAT_FLAG_UNK26 = 0x80000000, // "AllowsInteraction"
SEAT_FLAG_HAS_ENTER_ANIM = 0x00000001, // "HasLowerAnimForEnter"
SEAT_FLAG_HAS_RIDE_ANIM = 0x00000002, // "HasLowerAnimForRide"
SEAT_FLAG_UNK3 = 0x00000004,
SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_VOLUNTARY_EXIT = 0x00000008, // NYI "ShouldUseVehicleSeatExitAnimationOnVoluntaryExit"
SEAT_FLAG_UNK5 = 0x00000010,
SEAT_FLAG_UNK6 = 0x00000020,
SEAT_FLAG_UNK7 = 0x00000040,
SEAT_FLAG_UNK8 = 0x00000080,
SEAT_FLAG_UNK9 = 0x00000100, // Note: only 5 seats are available with this flag in 3.3.5a; found only on flying dragons and harpoon guns
SEAT_FLAG_HIDE_PASSENGER = 0x00000200, // Passenger is hidden
SEAT_FLAG_ALLOW_TURNING = 0x00000400, // "AllowsTurning" | Note: allows the passenger to turn (change orientation) while boarded
SEAT_FLAG_CAN_CONTROL = 0x00000800, // Lua_UnitInVehicleControlSeat
SEAT_FLAG_CAN_CAST_MOUNT_SPELL = 0x00001000, // "Can Cast Mount Spell" | Note: there are no seats with this flag in 3.3.5a
SEAT_FLAG_UNCONTROLLED = 0x00002000, // "Uncontrolled"
SEAT_FLAG_CAN_ATTACK = 0x00004000, // Can attack, cast spells and use items from vehicle?
SEAT_FLAG_SHOULD_USE_VEH_SEAT_EXIT_ANIM_ON_FORCED_EXIT = 0x00008000, // "ShouldUseVehicleSeatExitAnimationOnForcedExit"
SEAT_FLAG_UNK14 = 0x00010000,
SEAT_FLAG_UNK15 = 0x00020000,
SEAT_FLAG_HAS_VEH_EXIT_ANIM_VOLUNTARY_EXIT = 0x00040000, // NYI "HasVehicleExitAnimForVoluntaryExit"
SEAT_FLAG_HAS_VEH_EXIT_ANIM_FORCED_EXIT = 0x00080000, // NYI "HasVehicleExitAnimForForcedExit"
SEAT_FLAG_NOT_SELECTABLE = 0x00100000,
SEAT_FLAG_UNK19 = 0x00200000, // Note: only 4 seats are available with this flag in 3.3.5a; found only on flying dragons
SEAT_FLAG_REC_HAS_VEHICLE_ENTER_ANIM = 0x00400000, // NYI "RecHasVehicleEnterAnim"
SEAT_FLAG_IS_USING_VEHICLE_CONTROLS = 0x00800000, // NYI Lua_IsUsingVehicleControls | Note: there are no seats with this flag in 3.3.5a
SEAT_FLAG_ENABLE_VEHICLE_ZOOM = 0x01000000, // NYI "EnableVehicleZoom"
SEAT_FLAG_CAN_EXIT = 0x02000000, // Lua_CanExitVehicle
SEAT_FLAG_CAN_SWITCH = 0x04000000, // Lua_CanSwitchVehicleSeats
SEAT_FLAG_HAS_START_WAITING_FOR_VEH_TRANSITION_ANIM_ENTER = 0x08000000, // NYI "HasStartWaitingForVehicleTransitionAnimEnter"
SEAT_FLAG_HAS_START_WAITING_FOR_VEH_TRANSITION_ANIM_EXIT = 0x10000000, // NYI "HasStartWaitingForVehicleTransitionAnimExit"
SEAT_FLAG_CAN_CAST = 0x20000000, // Lua_UnitHasVehicleUI
SEAT_FLAG_UNK25 = 0x40000000,
VEHICLE_SEAT_FLAG_ALLOWS_INTERACTION = 0x80000000, // NYI "AllowsInteraction"
};

enum VehicleSeatFlagsB
Expand Down

0 comments on commit 018e87f

Please sign in to comment.