diff --git a/zone/npc.cpp b/zone/npc.cpp index 7fa179a1c..39783a73f 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -1141,59 +1141,6 @@ void NPC::Depop(bool start_spawn_timer) { } } -bool NPC::DatabaseCastAccepted(int spell_id) { - for (int i=0; i < EFFECT_COUNT; i++) { - switch(spells[spell_id].effect_id[i]) { - case SE_Stamina: { - if(IsEngaged() && GetHPRatio() < 100) - return true; - else - return false; - break; - } - case SE_CurrentHPOnce: - case SE_CurrentHP: { - if(GetHPRatio() < 100 && spells[spell_id].buff_duration == 0) - return true; - else - return false; - break; - } - - case SE_HealOverTime: { - if(GetHPRatio() < 100) - return true; - else - return false; - break; - } - case SE_DamageShield: { - return true; - } - case SE_NecPet: - case SE_SummonPet: { - if(GetPet()){ -#ifdef SPELLQUEUE - printf("%s: Attempted to make a second pet, denied.\n",GetName()); -#endif - return false; - } - break; - } - case SE_LocateCorpse: - case SE_SummonCorpse: { - return false; //Pfft, npcs don't need to summon corpses/locate corpses! - break; - } - default: - if(spells[spell_id].good_effect == BENEFICIAL_EFFECT && !(spells[spell_id].buff_duration == 0 && GetHPRatio() == 100) && !IsEngaged()) - return true; - return false; - } - } - return false; -} - bool NPC::SpawnZoneController() { diff --git a/zone/npc.h b/zone/npc.h index 5e7a5e266..f61536323 100644 --- a/zone/npc.h +++ b/zone/npc.h @@ -179,8 +179,6 @@ public: virtual void ThrowingAttack(Mob* other) { } int32 GetNumberOfAttacks() const { return attack_count; } void DoRangedAttackDmg(Mob* other, bool Launch = true, int16 damage_mod = 0, int16 chance_mod = 0, EQ::skills::SkillType skill = EQ::skills::SkillArchery, float speed = 4.0f, const char *IDFile = nullptr); - - bool DatabaseCastAccepted(int spell_id); bool IsFactionListAlly(uint32 other_faction); bool IsGuard(); FACTION_VALUE CheckNPCFactionAlly(int32 other_faction);