diff --git a/common/eq_constants.h b/common/eq_constants.h index b4aba72b4..057051ff6 100644 --- a/common/eq_constants.h +++ b/common/eq_constants.h @@ -437,9 +437,14 @@ static const uint8 SkillDamageTypes[EQ::skills::HIGHEST_SKILL + 1] = // change t #define INVALID_INDEX -1 static const uint32 MAX_SPELL_DB_ID_VAL = 65535; + static const uint32 DB_SPELL_CAZIC_TOUCH = 982; static const uint32 DB_SPELL_TOUCH_OF_VINITRAS = 2859; +static const uint32 DB_FACTION_GEM_CHOPPERS = 255; +static const uint32 DB_FACTION_HERETICS = 265; +static const uint32 DB_FACTION_KING_AKANON = 333; + enum ChatChannelNames : uint16 { ChatChannel_Guild = 0, diff --git a/zone/npc.cpp b/zone/npc.cpp index 9bea0ec67..325f8fb70 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -3368,3 +3368,35 @@ void NPC::ScaleNPC(uint8 npc_level) { npc_scale_manager->ResetNPCScaling(this); npc_scale_manager->ScaleNPC(this); } + +bool NPC::IsGuard() +{ + switch (GetRace()) { + case RT_GUARD: + if (GetTexture() == 1 || GetTexture() == 2) + return true; + break; + case RT_IKSAR_2: + if (GetTexture() == 1) + return true; + break; + case RT_GUARD_2: + case RT_GUARD_3: + case RT_GUARD_4: + case RT_HUMAN_3: + case RT_HALFLING_2: + case RT_ERUDITE_2: + case RT_BARBARIAN_2: + case RT_DARK_ELF_2: + case RT_TROLL_2: + case OGGOK_CITIZEN: + case RT_DWARF_2: + return true; + default: + break; + } + if (GetPrimaryFaction() == DB_FACTION_GEM_CHOPPERS || GetPrimaryFaction() == DB_FACTION_HERETICS || GetPrimaryFaction() == DB_FACTION_KING_AKANON) { //these 3 factions of guards use player races instead of their own races so we must define them by faction. + return true; + } + return false; +}