From 7decf74505aa965060ff11124bc460ebb498a36b Mon Sep 17 00:00:00 2001 From: Natedog2012 Date: Thu, 15 Jul 2021 19:00:50 -0500 Subject: [PATCH] Add Rank to lua Spell --- zone/lua_spell.cpp | 8 +++++++- zone/lua_spell.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/lua_spell.cpp b/zone/lua_spell.cpp index 18353efaa..c7730efff 100644 --- a/zone/lua_spell.cpp +++ b/zone/lua_spell.cpp @@ -474,6 +474,11 @@ int Lua_Spell::GetDamageShieldType() { return self->DamageShieldType; } +int Lua_Spell::GetRank() { + Lua_Safe_Call_Int(); + return self->rank; +} + luabind::scope lua_register_spell() { return luabind::class_("Spell") .def(luabind::constructor<>()) @@ -561,7 +566,8 @@ luabind::scope lua_register_spell() { .def("MaxDist", &Lua_Spell::GetMaxDist) .def("MaxDistMod", &Lua_Spell::GetMaxDistMod) .def("MinRange", &Lua_Spell::GetMinRange) - .def("DamageShieldType", &Lua_Spell::GetDamageShieldType); + .def("DamageShieldType", &Lua_Spell::GetDamageShieldType) + .def("Rank", &Lua_Spell::GetRank); } #endif diff --git a/zone/lua_spell.h b/zone/lua_spell.h index bfa5a19ed..e2def8a6a 100644 --- a/zone/lua_spell.h +++ b/zone/lua_spell.h @@ -107,6 +107,7 @@ public: float GetMaxDistMod(); float GetMinRange(); int GetDamageShieldType(); + int GetRank(); }; #endif