From 81744281895e777b029fd6ef7abdce9c5c58c325 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 10 Jun 2015 23:10:00 -0400 Subject: [PATCH 1/2] Export SetPseudoRoot to Lua --- zone/lua_mob.cpp | 7 ++++++- zone/lua_mob.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 60a42760c..f4d7d64cb 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1851,6 +1851,10 @@ int Lua_Mob::CanBuffStack(int spell_id, int caster_level, bool fail_if_overwrite return self->CanBuffStack(spell_id, caster_level, fail_if_overwrite); } +void Lua_Mob::SetPseudoRoot(bool in) { + Lua_Safe_Call_Void(); + self->SetPseudoRoot(in); +} luabind::scope lua_register_mob() { return luabind::class_("Mob") @@ -2168,7 +2172,8 @@ luabind::scope lua_register_mob() { .def("BuffFadeBySlot", (void(Lua_Mob::*)(int))&Lua_Mob::BuffFadeBySlot) .def("BuffFadeBySlot", (void(Lua_Mob::*)(int,bool))&Lua_Mob::BuffFadeBySlot) .def("CanBuffStack", (int(Lua_Mob::*)(int,int))&Lua_Mob::CanBuffStack) - .def("CanBuffStack", (int(Lua_Mob::*)(int,int,bool))&Lua_Mob::CanBuffStack); + .def("CanBuffStack", (int(Lua_Mob::*)(int,int,bool))&Lua_Mob::CanBuffStack) + .def("SetPseudoRoot", (void(Lua_Mob::*)(bool))&Lua_Mob::SetPseudoRoot); } luabind::scope lua_register_special_abilities() { diff --git a/zone/lua_mob.h b/zone/lua_mob.h index 54c388ed4..023fedd2a 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -169,7 +169,7 @@ public: bool CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost); bool CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot); bool CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer, int timer_duration); - bool CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer, int timer_duration, + bool CastSpell(int spell_id, int target_id, int slot, int cast_time, int mana_cost, int item_slot, int timer, int timer_duration, int resist_adjust); bool SpellFinished(int spell_id, Lua_Mob target); bool SpellFinished(int spell_id, Lua_Mob target, int slot); @@ -352,6 +352,7 @@ public: void BuffFadeBySlot(int slot, bool recalc_bonuses); int CanBuffStack(int spell_id, int caster_level); int CanBuffStack(int spell_id, int caster_level, bool fail_if_overwrite); + void SetPseudoRoot(bool in); }; #endif From 8dccc8bf90fbd66b0b99bbc8fe3ad2a6b332c605 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 10 Jun 2015 23:52:56 -0400 Subject: [PATCH 2/2] Fix Pseudo Rooted for runspeed --- zone/mob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/mob.cpp b/zone/mob.cpp index 1591cc057..b107565bc 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -615,7 +615,7 @@ int Mob::_GetWalkSpeed() const { } int Mob::_GetRunSpeed() const { - if (IsRooted() || IsStunned() || IsMezzed()) + if (IsRooted() || IsStunned() || IsMezzed() || IsPseudoRooted()) return 0; int aa_mod = 0;