diff --git a/zone/lua_npc.cpp b/zone/lua_npc.cpp index dabc1c46f..869efb019 100644 --- a/zone/lua_npc.cpp +++ b/zone/lua_npc.cpp @@ -407,8 +407,18 @@ void Lua_NPC::SetSpellFocusHeal(int focus) { self->SetSpellFocusHeal(focus); } -float Lua_NPC::GetSlowMitigation() { +int Lua_NPC::GetSpellFocusDMG() { Lua_Safe_Call_Int(); + return self->GetSpellFocusDMG(); +} + +int Lua_NPC::GetSpellFocusHeal() { + Lua_Safe_Call_Int(); + return self->GetSpellFocusHeal(); +} + +float Lua_NPC::GetSlowMitigation() { + Lua_Safe_Call_Real(); return self->GetSlowMitigation(); } @@ -535,6 +545,8 @@ luabind::scope lua_register_npc() { .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) + .def("GetSpellFocusDMG", (void(Lua_NPC::*)(int))&Lua_NPC::GetSpellFocusDMG) + .def("GetSpellFocusHeal", (void(Lua_NPC::*)(int))&Lua_NPC::GetSpellFocusHeal) .def("GetSlowMitigation", (int(Lua_NPC::*)(void))&Lua_NPC::GetSlowMitigation) .def("GetAttackSpeed", (float(Lua_NPC::*)(void))&Lua_NPC::GetAttackSpeed) .def("GetAccuracyRating", (int(Lua_NPC::*)(void))&Lua_NPC::GetAccuracyRating) diff --git a/zone/lua_npc.h b/zone/lua_npc.h index 7db7f7e4b..2b201f323 100644 --- a/zone/lua_npc.h +++ b/zone/lua_npc.h @@ -107,6 +107,8 @@ public: void RemoveAISpell(int spell_id); void SetSpellFocusDMG(int focus); void SetSpellFocusHeal(int focus); + int GetSpellFocusDMG(); + int GetSpellFocusHeal(); float GetSlowMitigation(); float GetAttackSpeed(); int GetAccuracyRating(); diff --git a/zone/lua_spell.cpp b/zone/lua_spell.cpp index 597982770..e99b9ba84 100644 --- a/zone/lua_spell.cpp +++ b/zone/lua_spell.cpp @@ -419,6 +419,56 @@ bool Lua_Spell::GetAllowRest() { return self->AllowRest; } +bool Lua_Spell::GetInCombat() { + Lua_Safe_Call_Bool(); + return self->InCombat; +} + +bool Lua_Spell::GetOutOfCombat() { + Lua_Safe_Call_Bool(); + return self->OutofCombat; +} + +int Lua_Spell::GetAEMaxTargets() { + Lua_Safe_Call_Int(); + return self->aemaxtargets; +} + +int Lua_Spell::GetMaxTargets() { + Lua_Safe_Call_Int(); + return self->maxtargets; +} + +bool Lua_Spell::GetPersistDeath() { + Lua_Safe_Call_Bool(); + return self->persistdeath; +} + +float Lua_Spell::GetMinDist() { + Lua_Safe_Call_Real(); + return self->min_dist; +} + +float Lua_Spell::GetMinDistMod() { + Lua_Safe_Call_Real(); + return self->min_dist_mod; +} + +float Lua_Spell::GetMaxDist() { + Lua_Safe_Call_Real(); + return self->max_dist; +} + +float Lua_Spell::GetMaxDistMod() { + Lua_Safe_Call_Real(); + return self->max_dist_mod; +} + +float Lua_Spell::GetMinRange() { + Lua_Safe_Call_Real(); + return self->min_range; +} + int Lua_Spell::GetDamageShieldType() { Lua_Safe_Call_Int(); return self->DamageShieldType; @@ -501,6 +551,16 @@ luabind::scope lua_register_spell() { .def("PowerfulFlag", &Lua_Spell::GetPowerfulFlag) .def("CastRestriction", &Lua_Spell::GetCastRestriction) .def("AllowRest", &Lua_Spell::GetAllowRest) + .def("InCombat", &Lua_Spell::GetInCombat) + .def("OutOfCombat", &Lua_Spell::GetOutOfCombat) + .def("AEMaxTargets", &Lua_Spell::GetAEMaxTargets) + .def("MaxTargets", &Lua_Spell::GetMaxTargets) + .def("PersistDeath", &Lua_Spell::GetPersistDeath) + .def("MinDist", &Lua_Spell::GetMinDist) + .def("MinDistMod", &Lua_Spell::GetMinDistMod) + .def("MaxDist", &Lua_Spell::GetMaxDist) + .def("MaxDistMod", &Lua_Spell::GetMaxDistMod) + .def("MinRange", &Lua_Spell::GetMinRange) .def("DamageShieldType", &Lua_Spell::GetDamageShieldType); } diff --git a/zone/lua_spell.h b/zone/lua_spell.h index 9a8435cc5..bfa5a19ed 100644 --- a/zone/lua_spell.h +++ b/zone/lua_spell.h @@ -96,6 +96,16 @@ public: int GetPowerfulFlag(); int GetCastRestriction(); bool GetAllowRest(); + bool GetInCombat(); + bool GetOutOfCombat(); + int GetAEMaxTargets(); + int GetMaxTargets(); + bool GetPersistDeath(); + float GetMinDist(); + float GetMinDistMod(); + float GetMaxDist(); + float GetMaxDistMod(); + float GetMinRange(); int GetDamageShieldType(); }; diff --git a/zone/perl_npc.cpp b/zone/perl_npc.cpp index 0ea8a5340..c1f8d8828 100644 --- a/zone/perl_npc.cpp +++ b/zone/perl_npc.cpp @@ -2340,8 +2340,8 @@ XS(boot_NPC) newXSproto(strcpy(buf, "SetSpellFocusHeal"), XS_NPC_SetSpellFocusHeal, file, "$$"); newXSproto(strcpy(buf, "GetSpellFocusDMG"), XS_NPC_GetSpellFocusDMG, file, "$"); newXSproto(strcpy(buf, "GetSpellFocusHeal"), XS_NPC_GetSpellFocusHeal, file, "$"); - newXSproto(strcpy(buf, "GetSlowMitigation"), XS_NPC_GetAttackSpeed, file, "$"); - newXSproto(strcpy(buf, "GetAttackSpeed"), XS_NPC_GetSlowMitigation, file, "$"); + newXSproto(strcpy(buf, "GetSlowMitigation"), XS_NPC_GetSlowMitigation, file, "$"); + newXSproto(strcpy(buf, "GetAttackSpeed"), XS_NPC_GetAttackSpeed, file, "$"); newXSproto(strcpy(buf, "GetAccuracyRating"), XS_NPC_GetAccuracyRating, file, "$"); newXSproto(strcpy(buf, "GetSpawnKillCount"), XS_NPC_GetSpawnKillCount, file, "$"); newXSproto(strcpy(buf, "GetScore"), XS_NPC_GetScore, file, "$");