diff --git a/common/emu_oplist.h b/common/emu_oplist.h index 29a20cb14..319517499 100644 --- a/common/emu_oplist.h +++ b/common/emu_oplist.h @@ -9,6 +9,7 @@ N(OP_AcceptNewTask), N(OP_AckPacket), N(OP_Action), N(OP_Action2), +N(OP_AddNimbusEffect), N(OP_AdventureData), N(OP_AdventureDetails), N(OP_AdventureFinish), diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 46aade124..4876b4211 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -551,6 +551,7 @@ struct BlockedBuffs_Struct /*86*/ uint16 Flags; }; +// same for adding struct RemoveNimbusEffect_Struct { /*00*/ uint32 spawnid; // Spawn ID diff --git a/utils/patches/patch_RoF.conf b/utils/patches/patch_RoF.conf index 339bfd800..f3d4249c0 100644 --- a/utils/patches/patch_RoF.conf +++ b/utils/patches/patch_RoF.conf @@ -341,6 +341,7 @@ OP_MobUpdate=0x6b5a OP_NPCMoveUpdate=0x5bd9 OP_CameraEffect=0x5712 OP_SpellEffect=0x72b6 +OP_AddNimbusEffect=0x2954 OP_RemoveNimbusEffect=0x3ba7 OP_AltCurrency=0x8fcb OP_AltCurrencyMerchantRequest=0x7e3e diff --git a/utils/patches/patch_RoF2.conf b/utils/patches/patch_RoF2.conf index e63e5e9e9..420fcec70 100644 --- a/utils/patches/patch_RoF2.conf +++ b/utils/patches/patch_RoF2.conf @@ -340,6 +340,7 @@ OP_MobUpdate=0x2c84 OP_NPCMoveUpdate=0x5892 OP_CameraEffect=0x127f OP_SpellEffect=0x5936 +OP_AddNimbusEffect=0xc693 OP_RemoveNimbusEffect=0x7b1e OP_AltCurrency=0x6b6d OP_AltCurrencyMerchantRequest=0x5409 diff --git a/utils/patches/patch_SoD.conf b/utils/patches/patch_SoD.conf index ed7a19715..0e8e36e02 100644 --- a/utils/patches/patch_SoD.conf +++ b/utils/patches/patch_SoD.conf @@ -345,6 +345,7 @@ OP_AltCurrencySell=0x7a21 OP_AltCurrencySellSelection=0x26d9 OP_AltCurrencyReclaim=0x712c OP_ShroudProgress=0x0296 +OP_AddNimbusEffect=0x6840 OP_RemoveNimbusEffect=0x5272 # C OP_Untargetable=0x5ea1 # 0x301d on UF? OP_IncreaseStats=0x71eb diff --git a/utils/patches/patch_SoF.conf b/utils/patches/patch_SoF.conf index 7ed41ff4a..cae177bfc 100644 --- a/utils/patches/patch_SoF.conf +++ b/utils/patches/patch_SoF.conf @@ -329,6 +329,7 @@ OP_AltCurrencyPurchase=0x3994 OP_AltCurrencySell=0x2ac3 OP_AltCurrencySellSelection=0x7d00 OP_AltCurrencyReclaim=0x1996 +OP_AddNimbusEffect=0x45e2 OP_RemoveNimbusEffect=0x5872 # C OP_InspectMessageUpdate=0x67e9 # C OP_OpenInventory=0x66c8 diff --git a/utils/patches/patch_UF.conf b/utils/patches/patch_UF.conf index af698d52a..6d8064029 100644 --- a/utils/patches/patch_UF.conf +++ b/utils/patches/patch_UF.conf @@ -346,6 +346,7 @@ OP_MobUpdate=0x4656 # Same as OP_SpawnPositionUpdate OP_NPCMoveUpdate=0x0f3e # OP_CameraEffect=0x6b0e # V OP_SpellEffect=0x57a3 # V +OP_AddNimbusEffect=0x6361 OP_RemoveNimbusEffect=0x2c77 # C OP_AltCurrency=0x659e OP_AltCurrencyMerchantRequest=0x214C diff --git a/zone/lua_mob.cpp b/zone/lua_mob.cpp index 18651edea..8b88ba12f 100644 --- a/zone/lua_mob.cpp +++ b/zone/lua_mob.cpp @@ -1686,6 +1686,11 @@ void Lua_Mob::DoKnockback(Lua_Mob caster, uint32 pushback, uint32 pushup) { self->DoKnockback(caster, pushback, pushup); } +void Lua_Mob::AddNimbusEffect(int effect_id) { + Lua_Safe_Call_Void(); + self->AddNimbusEffect(effect_id); +} + void Lua_Mob::RemoveNimbusEffect(int effect_id) { Lua_Safe_Call_Void(); self->RemoveNimbusEffect(effect_id); @@ -2367,6 +2372,7 @@ luabind::scope lua_register_mob() { .def("SetSlotTint", (void(Lua_Mob::*)(int,int,int,int))&Lua_Mob::SetSlotTint) .def("WearChange", (void(Lua_Mob::*)(int,int,uint32))&Lua_Mob::WearChange) .def("DoKnockback", (void(Lua_Mob::*)(Lua_Mob,uint32,uint32))&Lua_Mob::DoKnockback) + .def("AddNimbusEffect", (void(Lua_Mob::*)(int))&Lua_Mob::AddNimbusEffect) .def("RemoveNimbusEffect", (void(Lua_Mob::*)(int))&Lua_Mob::RemoveNimbusEffect) .def("IsFeared", (bool(Lua_Mob::*)(void))&Lua_Mob::IsFeared) .def("IsBlind", (bool(Lua_Mob::*)(void))&Lua_Mob::IsBlind) diff --git a/zone/lua_mob.h b/zone/lua_mob.h index c54deb6bc..493f5e1e8 100644 --- a/zone/lua_mob.h +++ b/zone/lua_mob.h @@ -323,6 +323,7 @@ public: void SetSlotTint(int material_slot, int red_tint, int green_tint, int blue_tint); void WearChange(int material_slot, int texture, uint32 color); void DoKnockback(Lua_Mob caster, uint32 pushback, uint32 pushup); + void AddNimbusEffect(int effect_id); void RemoveNimbusEffect(int effect_id); bool IsRunning(); void SetRunning(bool running); diff --git a/zone/mob.cpp b/zone/mob.cpp index 0bb043bc5..905ce2c4b 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -4994,6 +4994,18 @@ void Mob::SpreadVirus(uint16 spell_id, uint16 casterID) } } +void Mob::AddNimbusEffect(int effectid) +{ + SetNimbusEffect(effectid); + + auto outapp = new EQApplicationPacket(OP_AddNimbusEffect, sizeof(RemoveNimbusEffect_Struct)); + auto ane = (RemoveNimbusEffect_Struct *)outapp->pBuffer; + ane->spawnid = GetID(); + ane->nimbus_effect = effectid; + entity_list.QueueClients(this, outapp); + safe_delete(outapp); +} + void Mob::RemoveNimbusEffect(int effectid) { if (effectid == nimbus_effect1) diff --git a/zone/mob.h b/zone/mob.h index e0aecb95b..2642a96fb 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -377,6 +377,7 @@ public: inline virtual uint32 GetNimbusEffect1() const { return nimbus_effect1; } inline virtual uint32 GetNimbusEffect2() const { return nimbus_effect2; } inline virtual uint32 GetNimbusEffect3() const { return nimbus_effect3; } + void AddNimbusEffect(int effectid); void RemoveNimbusEffect(int effectid); inline const glm::vec3& GetTargetRingLocation() const { return m_TargetRing; } inline float GetTargetRingX() const { return m_TargetRing.x; }