Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-09-2008, 06:26 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default /melody

I was looking at a packet collect from Live using /melody this morning, and the key reasons it doesn't work in EQEmu are:

1. The client wants an OP_MemoriseSpell sent to it before OP_Action/OP_Damage. This is what triggers it to 'cast' the next song.

2. The client sends a zero length OP_ManaChange packet between each song, which the server currently responds to with an OP_Interrupt spell.

The following 'hack' enables /melody

Code:
Index: mob.h
===================================================================
--- mob.h       (revision 188)
+++ mob.h       (working copy)
@@ -1158,6 +1158,7 @@
        bool    m_hasRune;
        bool    m_hasSpellRune;
        bool    m_hasDeathSaveChance;
+       void    StopSong();

 private:
        void    _StopSong();            //this is not what you think it is
Index: client_packet.cpp
===================================================================
--- client_packet.cpp   (revision 188)
+++ client_packet.cpp   (working copy)
@@ -3052,7 +3052,8 @@
        if(app->size == 0) {
                // i think thats the sign to stop the songs
                if(IsBardSong(casting_spell_id))
-                       InterruptSpell(SONG_ENDS, 0x121);
+                       //InterruptSpell(SONG_ENDS, 0x121);
+                       StopSong();
                else
                        InterruptSpell(INTERRUPT_SPELL, 0x121);

Index: spells.cpp
===================================================================
--- spells.cpp  (revision 188)
+++ spells.cpp  (working copy)
@@ -1628,7 +1628,10 @@
                        CastToClient()->GetPTimers().Start((pTimerItemStart + itm->GetItem()->RecastType), itm->GetItem()->RecastDelay);
                }
        }
-
+
+       if(IsClient() && IsBardSong(spell_id))
+               this->CastToClient()->MemorizeSpell(slot, spell_id,memSpellSpellbar);
+
        if(IsNPC())
                CastToNPC()->AI_Event_SpellCastFinished(true, slot);

@@ -1660,7 +1663,9 @@
                mlog(SPELLS__BARDS, "Bard Song Pulse %d: Supposidly cast from an item. Killing song.", spell_id);
                return(false);
        }
-
+       if(IsClient())
+               this->CastToClient()->MemorizeSpell(slot, spell_id,memSpellSpellbar);
+
        //determine the type of spell target we have
        Mob *ae_center = NULL;
        CastAction_type CastAction;
@@ -4246,6 +4251,15 @@
        bardsong_timer.Disable();
 }

+void Mob::StopSong() {
+
+       ZeroCastingVars();
+       bardsong = 0;
+       bardsong_target_id = 0;
+       bardsong_slot = 0;
+       bardsong_timer.Disable();
+}
+
I say 'hack' because I'm not in my comfort zone in the spell code and I suspect my 'StopSong' may not be the correct way to handle things. I'm working on other stuff at the moment, so if someone else wants to pick this up and refine it, feel free
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:15 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3