mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[12768] Initial work for unitFlags2
This commit is contained in:
parent
01a87311f5
commit
6996f8f221
3 changed files with 4 additions and 2 deletions
|
|
@ -355,12 +355,14 @@ bool Creature::UpdateEntry(uint32 Entry, Team team, const CreatureData* data /*=
|
||||||
SetAttackTime(RANGED_ATTACK, GetCreatureInfo()->rangeattacktime);
|
SetAttackTime(RANGED_ATTACK, GetCreatureInfo()->rangeattacktime);
|
||||||
|
|
||||||
uint32 unitFlags = GetCreatureInfo()->unit_flags;
|
uint32 unitFlags = GetCreatureInfo()->unit_flags;
|
||||||
|
uint32 unitFlags2 = GetCreatureInfo()->unit_flags2;
|
||||||
|
|
||||||
// we may need to append or remove additional flags
|
// we may need to append or remove additional flags
|
||||||
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT))
|
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT))
|
||||||
unitFlags |= UNIT_FLAG_IN_COMBAT;
|
unitFlags |= UNIT_FLAG_IN_COMBAT;
|
||||||
|
|
||||||
SetUInt32Value(UNIT_FIELD_FLAGS, unitFlags);
|
SetUInt32Value(UNIT_FIELD_FLAGS, unitFlags);
|
||||||
|
SetUInt32Value(UNIT_FIELD_FLAGS_2, unitFlags2);
|
||||||
|
|
||||||
// preserve all current dynamic flags if exist
|
// preserve all current dynamic flags if exist
|
||||||
uint32 dynFlags = GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
uint32 dynFlags = GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||||
|
|
|
||||||
|
|
@ -603,7 +603,7 @@ enum UnitFlags
|
||||||
UNIT_FLAG_UNK_31 = 0x80000000 // set skinnable icon and also changes color of portrait
|
UNIT_FLAG_UNK_31 = 0x80000000 // set skinnable icon and also changes color of portrait
|
||||||
};
|
};
|
||||||
|
|
||||||
// Value masks for UNIT_FIELD_FLAGS_2
|
// Value masks for UNIT_FIELD_FLAGS_2 (initialy is not implemented)
|
||||||
enum UnitFlags2
|
enum UnitFlags2
|
||||||
{
|
{
|
||||||
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
|
UNIT_FLAG2_FEIGN_DEATH = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12767"
|
#define REVISION_NR "12768"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue