Core/Entities: Add Unit::IsValidAssistTarget and Unit::IsValidAttackTarget functions for proper serverside checks of related entity flags.

This commit is contained in:
QAston
2011-09-16 22:17:48 +02:00
parent bf38cd8f3e
commit 31e755c291
5 changed files with 236 additions and 36 deletions
+32 -24
View File
@@ -2265,30 +2265,38 @@ enum CreatureFamily
enum CreatureTypeFlags
{
CREATURE_TYPEFLAGS_TAMEABLE = 0x000001, // Tameable by any hunter
CREATURE_TYPEFLAGS_GHOST = 0x000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow?
CREATURE_TYPEFLAGS_UNK3 = 0x000004,
CREATURE_TYPEFLAGS_UNK4 = 0x000008,
CREATURE_TYPEFLAGS_UNK5 = 0x000010,
CREATURE_TYPEFLAGS_UNK6 = 0x000020,
CREATURE_TYPEFLAGS_UNK7 = 0x000040,
CREATURE_TYPEFLAGS_DEAD_INTERACT = 0x000080, // Player can interact with the creature if its dead (not player dead)
CREATURE_TYPEFLAGS_HERBLOOT = 0x000100, // Can be looted by herbalist
CREATURE_TYPEFLAGS_MININGLOOT = 0x000200, // Can be looted by miner
CREATURE_TYPEFLAGS_UNK11 = 0x000400,
CREATURE_TYPEFLAGS_MOUNTED_COMBAT = 0x000800, // Creature can remain mounted when entering combat
CREATURE_TYPEFLAGS_AID_PLAYERS = 0x001000, // ? Can aid any player in combat if in range?
CREATURE_TYPEFLAGS_UNK14 = 0x002000,
CREATURE_TYPEFLAGS_UNK15 = 0x004000, // ? Possibly not in use
CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x008000, // Can be looted by engineer
CREATURE_TYPEFLAGS_EXOTIC = 0x010000, // Can be tamed by hunter as exotic pet
CREATURE_TYPEFLAGS_UNK18 = 0x020000, // ? Related to vehicles/pvp?
CREATURE_TYPEFLAGS_UNK19 = 0x040000, // ? Related to vehicle/siege weapons?
CREATURE_TYPEFLAGS_UNK20 = 0x080000,
CREATURE_TYPEFLAGS_UNK21 = 0x100000,
CREATURE_TYPEFLAGS_UNK22 = 0x200000,
CREATURE_TYPEFLAGS_UNK23 = 0x400000,
CREATURE_TYPEFLAGS_UNK24 = 0x800000 // ? First seen in 3.2.2. Related to banner/backpack of creature/companion?
CREATURE_TYPEFLAGS_TAMEABLE = 0x00000001, // Tameable by any hunter
CREATURE_TYPEFLAGS_GHOST = 0x00000002, // Creature are also visible for not alive player. Allow gossip interaction if npcflag allow?
CREATURE_TYPEFLAGS_UNK2 = 0x00000004,
CREATURE_TYPEFLAGS_UNK3 = 0x00000008,
CREATURE_TYPEFLAGS_UNK4 = 0x00000010,
CREATURE_TYPEFLAGS_UNK5 = 0x00000020,
CREATURE_TYPEFLAGS_UNK6 = 0x00000040,
CREATURE_TYPEFLAGS_DEAD_INTERACT = 0x00000080, // Player can interact with the creature if its dead (not player dead)
CREATURE_TYPEFLAGS_HERBLOOT = 0x00000100, // Can be looted by herbalist
CREATURE_TYPEFLAGS_MININGLOOT = 0x00000200, // Can be looted by miner
CREATURE_TYPEFLAGS_UNK10 = 0x00000400,
CREATURE_TYPEFLAGS_MOUNTED_COMBAT = 0x00000800, // Creature can remain mounted when entering combat
CREATURE_TYPEFLAGS_AID_PLAYERS = 0x00001000, // ? Can aid any player in combat if in range?
CREATURE_TYPEFLAGS_UNK13 = 0x00002000,
CREATURE_TYPEFLAGS_UNK14 = 0x00004000, // ? Possibly not in use
CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x00008000, // Can be looted by engineer
CREATURE_TYPEFLAGS_EXOTIC = 0x00010000, // Can be tamed by hunter as exotic pet
CREATURE_TYPEFLAGS_UNK17 = 0x00020000, // ? Related to vehicles/pvp?
CREATURE_TYPEFLAGS_UNK18 = 0x00040000, // ? Related to vehicle/siege weapons?
CREATURE_TYPEFLAGS_UNK19 = 0x00080000,
CREATURE_TYPEFLAGS_UNK20 = 0x00100000,
CREATURE_TYPEFLAGS_UNK21 = 0x00200000,
CREATURE_TYPEFLAGS_UNK22 = 0x00400000,
CREATURE_TYPEFLAGS_UNK23 = 0x00800000, // ? First seen in 3.2.2. Related to banner/backpack of creature/companion?
CREATURE_TYPEFLAGS_UNK24 = 0x01000000,
CREATURE_TYPEFLAGS_UNK25 = 0x02000000,
CREATURE_TYPEFLAGS_UNK26 = 0x04000000,
CREATURE_TYPEFLAGS_UNK27 = 0x08000000,
CREATURE_TYPEFLAGS_UNK28 = 0x10000000,
CREATURE_TYPEFLAGS_UNK29 = 0x20000000,
CREATURE_TYPEFLAGS_UNK30 = 0x40000000,
CREATURE_TYPEFLAGS_UNK31 = 0x80000000,
};
enum CreatureEliteType