Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-11-2010, 01:57 AM
Leere
Sarnak
 
Join Date: Sep 2008
Location: Home
Posts: 31
Default COMMITTED: /melody for Titanium

I can only confirm that this works with a Titanium client. The basic method should be no different for the other clients though, since I found the packet that let me get this to work from a UF capture.

In short, the server has to send a MemorizeSpell packet for the client to continue on with the /melody. I also had to remove all extra song ends messages so it didn't interrupt right away on the next song.

This also has the removal of the double messages for spells like Sense Animals. (Since the same packet is just sent to the target and caster, there is now a check to ensure that the target isn't the caster.)

Code:
--- zone\spells.cpp	Fri Apr  9 13:55:48 2010 (Rev1370)
+++ zone\spells.cpp
@@ -675,7 +675,7 @@
 		message = IsBardSong(spellid) ? SONG_ENDS_ABRUPTLY : INTERRUPT_SPELL;
 
 	// clients need some packets
-	if (IsClient())
+	if (IsClient() && message != SONG_ENDS)
 	{
 		// the interrupt message
 		outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
@@ -1053,6 +1053,7 @@
 		if(IsClient())
 		{
 			this->CastToClient()->CheckSongSkillIncrease(spell_id);
+			this->CastToClient()->MemorizeSpell(slot, spell_id, memSpellSpellbar);
 		}
 		// go again in 6 seconds
 		//this is handled with bardsong_timer
@@ -2620,7 +2621,7 @@
 	action->instrument_mod = GetInstrumentMod(spell_id);
 	action->buff_unknown = 0;
 	
-	if(spelltar->IsClient())	// send to target
+	if(spelltar != this && spelltar->IsClient())	// send to target
 		spelltar->CastToClient()->QueuePacket(action_packet);
 	if(IsClient())	// send to caster
 		CastToClient()->QueuePacket(action_packet);
@@ -2982,7 +2983,7 @@
 
 	if(!IsEffectInSpell(spell_id, SE_BindAffinity))
 	{
-		if(spelltar->IsClient())	// send to target
+		if(spelltar != this && spelltar->IsClient())	// send to target
 			spelltar->CastToClient()->QueuePacket(action_packet);
 		if(IsClient())	// send to caster
 			CastToClient()->QueuePacket(action_packet);
@@ -4455,21 +4456,6 @@
 //you should really know what your doing before you call this
 void Mob::_StopSong()
 {
-	if (IsClient() && (bardsong || IsBardSong(casting_spell_id)))
-	{
-		EQApplicationPacket* outapp = new EQApplicationPacket(OP_ManaChange, sizeof(ManaChange_Struct));
-		ManaChange_Struct* manachange = (ManaChange_Struct*)outapp->pBuffer;
-		manachange->new_mana = cur_mana;
-		if (!bardsong)
-			manachange->spell_id = casting_spell_id;
-		else
-			manachange->spell_id = bardsong;
-		manachange->stamina = CastToClient()->GetEndurance();
-		if (CastToClient()->Hungry())
-			manachange->stamina = 0;
-		CastToClient()->QueuePacket(outapp);
-		delete outapp;
-	}
 	bardsong = 0;
 	bardsong_target_id = 0;
 	bardsong_slot = 0;
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:38 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3