Add Buff infrastructure to go through different logic paths from different patches (#5073)
Build / Linux (push) Waiting to run
Build / Windows (push) Waiting to run

This commit is contained in:
dannuic
2026-05-02 22:53:26 -06:00
committed by GitHub
parent c253734c57
commit 18df055f16
201 changed files with 2856 additions and 3105 deletions
+15 -15
View File
@@ -327,7 +327,7 @@ void handle_npc_death(
lua_pushinteger(L, Strings::ToInt(sep.arg[1]));
lua_setfield(L, -2, "damage");
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[2]);
const int32 spell_id = Strings::ToInt(sep.arg[2]);
if (IsValidSpell(spell_id)) {
Lua_Spell l_spell(&spells[spell_id]);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);
@@ -384,7 +384,7 @@ void handle_npc_cast(
) {
Seperator sep(data.c_str());
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell(IsValidSpell(spell_id) ? &spells[spell_id] : nullptr);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);
l_spell_o.push(L);
@@ -669,14 +669,14 @@ void handle_npc_spell_blocked(
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[1]));
lua_setfield(L, -2, "cast_spell_id");
const uint32 blocking_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 blocking_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_one(IsValidSpell(blocking_spell_id) ? &spells[blocking_spell_id] : nullptr);
luabind::adl::object l_spell_one_o = luabind::adl::object(L, l_spell_one);
l_spell_one_o.push(L);
lua_setfield(L, -2, "blocking_spell");
const uint32 cast_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 cast_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_two(IsValidSpell(cast_spell_id) ? &spells[cast_spell_id] : nullptr);
luabind::adl::object l_spell_two_o = luabind::adl::object(L, l_spell_two);
@@ -758,7 +758,7 @@ void handle_player_death(
lua_pushinteger(L, Strings::ToInt(sep.arg[1]));
lua_setfield(L, -2, "damage");
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[2]);
const int32 spell_id = Strings::ToInt(sep.arg[2]);
if (IsValidSpell(spell_id)) {
Lua_Spell l_spell(&spells[spell_id]);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);
@@ -1784,14 +1784,14 @@ void handle_player_spell_blocked(
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[1]));
lua_setfield(L, -2, "cast_spell_id");
const uint32 blocking_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 blocking_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_one(IsValidSpell(blocking_spell_id) ? &spells[blocking_spell_id] : nullptr);
luabind::adl::object l_spell_one_o = luabind::adl::object(L, l_spell_one);
l_spell_one_o.push(L);
lua_setfield(L, -2, "blocking_spell");
const uint32 cast_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 cast_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_two(IsValidSpell(cast_spell_id) ? &spells[cast_spell_id] : nullptr);
luabind::adl::object l_spell_two_o = luabind::adl::object(L, l_spell_two);
@@ -2083,7 +2083,7 @@ void handle_spell_event(
lua_State* L,
Mob* mob,
Client* client,
uint32 spell_id,
int32 spell_id,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
@@ -2132,7 +2132,7 @@ void handle_translocate_finish(
lua_State* L,
Mob* mob,
Client* client,
uint32 spell_id,
int32 spell_id,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
@@ -2184,7 +2184,7 @@ void handle_spell_null(
lua_State* L,
Mob* mob,
Client* client,
uint32 spell_id,
int32 spell_id,
std::string data,
uint32 extra_data,
std::vector<std::any> *extra_pointers
@@ -2460,7 +2460,7 @@ void handle_bot_cast(
) {
Seperator sep(data.c_str());
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell(IsValidSpell(spell_id) ? &spells[spell_id] : nullptr);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);
l_spell_o.push(L);
@@ -2524,7 +2524,7 @@ void handle_bot_death(
lua_pushinteger(L, Strings::ToInt(sep.arg[1]));
lua_setfield(L, -2, "damage");
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[2]);
const int32 spell_id = Strings::ToInt(sep.arg[2]);
if (IsValidSpell(spell_id)) {
Lua_Spell l_spell(&spells[spell_id]);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);
@@ -2907,14 +2907,14 @@ void handle_bot_spell_blocked(
lua_pushinteger(L, Strings::ToUnsignedInt(sep.arg[1]));
lua_setfield(L, -2, "cast_spell_id");
const uint32 blocking_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 blocking_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_one(IsValidSpell(blocking_spell_id) ? &spells[blocking_spell_id] : nullptr);
luabind::adl::object l_spell_one_o = luabind::adl::object(L, l_spell_one);
l_spell_one_o.push(L);
lua_setfield(L, -2, "blocking_spell");
const uint32 cast_spell_id = Strings::ToUnsignedInt(sep.arg[0]);
const int32 cast_spell_id = Strings::ToInt(sep.arg[0]);
Lua_Spell l_spell_two(IsValidSpell(cast_spell_id) ? &spells[cast_spell_id] : nullptr);
luabind::adl::object l_spell_two_o = luabind::adl::object(L, l_spell_two);
@@ -2993,7 +2993,7 @@ void handle_zone_death(
lua_pushinteger(L, Strings::ToInt(sep.arg[1]));
lua_setfield(L, -2, "damage");
const uint32 spell_id = Strings::ToUnsignedInt(sep.arg[2]);
const int32 spell_id = Strings::ToInt(sep.arg[2]);
if (IsValidSpell(spell_id)) {
Lua_Spell l_spell(&spells[spell_id]);
luabind::adl::object l_spell_o = luabind::adl::object(L, l_spell);