mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 15:31:33 +00:00
[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:
parent
f2c4babd8d
commit
c1122022b9
53
zone/npc.cpp
53
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()
|
bool NPC::SpawnZoneController()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -179,8 +179,6 @@ public:
|
|||||||
virtual void ThrowingAttack(Mob* other) { }
|
virtual void ThrowingAttack(Mob* other) { }
|
||||||
int32 GetNumberOfAttacks() const { return attack_count; }
|
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);
|
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 IsFactionListAlly(uint32 other_faction);
|
||||||
bool IsGuard();
|
bool IsGuard();
|
||||||
FACTION_VALUE CheckNPCFactionAlly(int32 other_faction);
|
FACTION_VALUE CheckNPCFactionAlly(int32 other_faction);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user