mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Add Support to define a valid HP range for NPC casting
These will allow us to define a valid HP range (HP of the caster) that an NPC will cast a spell. For example NPC casting a defensive spell at
This commit is contained in:
+7
-1
@@ -420,7 +420,12 @@ void Lua_NPC::ModifyNPCStat(const char *stat, const char *value) {
|
||||
|
||||
void Lua_NPC::AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust);
|
||||
self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, 0, 0);
|
||||
}
|
||||
|
||||
void Lua_NPC::AddAISpell(int priority, int spell_id, int type, int mana_cost, int recast_delay, int resist_adjust, int min_hp, int max_hp) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->AddSpellToNPCList(priority, spell_id, type, mana_cost, recast_delay, resist_adjust, min_hp, max_hp);
|
||||
}
|
||||
|
||||
void Lua_NPC::RemoveAISpell(int spell_id) {
|
||||
@@ -585,6 +590,7 @@ luabind::scope lua_register_npc() {
|
||||
.def("SetSwarmTarget", (void(Lua_NPC::*)(int))&Lua_NPC::SetSwarmTarget)
|
||||
.def("ModifyNPCStat", (void(Lua_NPC::*)(const char*,const char*))&Lua_NPC::ModifyNPCStat)
|
||||
.def("AddAISpell", (void(Lua_NPC::*)(int,int,int,int,int,int))&Lua_NPC::AddAISpell)
|
||||
.def("AddAISpell", (void(Lua_NPC::*)(int,int,int,int,int,int,int,int))&Lua_NPC::AddAISpell)
|
||||
.def("RemoveAISpell", (void(Lua_NPC::*)(int))&Lua_NPC::RemoveAISpell)
|
||||
.def("SetSpellFocusDMG", (void(Lua_NPC::*)(int))&Lua_NPC::SetSpellFocusDMG)
|
||||
.def("SetSpellFocusHeal", (void(Lua_NPC::*)(int))&Lua_NPC::SetSpellFocusHeal)
|
||||
|
||||
Reference in New Issue
Block a user