[Cleanup] Remove DatabaseCastAccepted() from zone/npc.cpp and zone/npc.h (#3449)

* [Cleanup] Remove DatabaseCastAccepted() from zone/npc.cpp and zone/npc.h

# Notes
- This is unused.

* Update npc.h
This commit is contained in:
Alex King 2023-06-24 13:57:21 -04:00 committed by GitHub
parent f2c4babd8d
commit c1122022b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 55 deletions

View File

@ -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()
{

View File

@ -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);