mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Make use of the targetable_with_hotkey flag for SoF+
This commit is contained in:
@@ -600,6 +600,9 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u
|
||||
if(npc_dup != nullptr)
|
||||
npca->GiveNPCTypeData(npc_dup);
|
||||
|
||||
if (IsClient())
|
||||
npca->no_target_hotkey = 1;
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
summon_count--;
|
||||
}
|
||||
@@ -696,6 +699,9 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
|
||||
if(npc_dup != nullptr)
|
||||
npca->GiveNPCTypeData(npc_dup);
|
||||
|
||||
if (IsClient())
|
||||
npca->no_target_hotkey = 1;
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
summon_count--;
|
||||
}
|
||||
@@ -883,6 +889,9 @@ void Mob::WakeTheDead(uint16 spell_id, Mob *target, uint32 duration)
|
||||
if(make_npc != nullptr)
|
||||
npca->GiveNPCTypeData(make_npc);
|
||||
|
||||
if (IsClient())
|
||||
npca->no_target_hotkey = 1;
|
||||
|
||||
entity_list.AddNPC(npca, true, true);
|
||||
|
||||
//the target of these swarm pets will take offense to being cast on...
|
||||
|
||||
@@ -4772,6 +4772,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
|
||||
npc_type->npc_id = 0; //NPC ID has to be 0, otherwise db gets all confuzzled.
|
||||
npc_type->class_ = merc_template->ClassID;
|
||||
npc_type->maxlevel = 0; //We should hard-set this to override scalerate's functionality in the NPC class when it is constructed.
|
||||
npc_type->no_target_hotkey = 1;
|
||||
|
||||
Merc* merc = new Merc(npc_type, c->GetX(), c->GetY(), c->GetZ(), 0);
|
||||
|
||||
|
||||
+2
-1
@@ -923,7 +923,8 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
|
||||
ns->spawn.invis = (invisible || hidden) ? 1 : 0; // TODO: load this before spawning players
|
||||
ns->spawn.NPC = IsClient() ? 0 : 1;
|
||||
ns->spawn.IsMercenary = (IsMerc() || no_target_hotkey) ? 1 : 0;
|
||||
ns->spawn.IsMercenary = IsMerc() ? 1 : 0;
|
||||
ns->spawn.targetable_with_hotkey = no_target_hotkey ? 0 : 1; // opposite logic!
|
||||
|
||||
ns->spawn.petOwnerId = ownerid;
|
||||
|
||||
|
||||
+1
-1
@@ -269,7 +269,7 @@ public:
|
||||
void AddLootDrop(const Item_Struct*dbitem, ItemList* itemlistconst, int16 charges, uint8 minlevel, uint8 maxlevel, bool equipit, bool wearchange = false);
|
||||
virtual void DoClassAttacks(Mob *target);
|
||||
void CheckSignal();
|
||||
inline bool IsTargetableWithHotkey() const { return no_target_hotkey; }
|
||||
inline bool IsNotTargetableWithHotkey() const { return no_target_hotkey; }
|
||||
int32 GetNPCHPRegen() const { return hp_regen + itembonuses.HPRegen + spellbonuses.HPRegen; }
|
||||
inline const char* GetAmmoIDfile() const { return ammo_idfile; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user