Add OP_AddNimbusEffect

This commit is contained in:
Michael Cook (mackal) 2017-10-09 00:04:43 -04:00
parent f566cba56a
commit 414cafdbed
11 changed files with 27 additions and 0 deletions

View File

@ -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),

View File

@ -551,6 +551,7 @@ struct BlockedBuffs_Struct
/*86*/ uint16 Flags;
};
// same for adding
struct RemoveNimbusEffect_Struct
{
/*00*/ uint32 spawnid; // Spawn ID

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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; }