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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2008, 04:20 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default EVENT_CAST_ON : Missing chunk of code

When EVEN_CAST_ON has been added a portion of the code has not been integrated, the one passing the "spell_id" to the Perl script :

Version 1108 :
Code:
		case EVENT_ZONE:{
			ExportVar(packagename.c_str(), "target_zone_id", data);
			break;
		}

		//nothing special about these events
		case EVENT_DEATH:
		case EVENT_SPAWN:
		case EVENT_ATTACK:
		case EVENT_SLAY:
		case EVENT_AGGRO:
		case EVENT_ENTER:
		case EVENT_EXIT:
		case EVENT_ENTERZONE:
		case EVENT_LEVEL_UP:
		case EVENT_KILLED_MERIT:
		case EVENT_CAST_ON:
			break;
"My" version (as it was proposed) :
Code:
		case EVENT_ZONE:{
			ExportVar(packagename.c_str(), "target_zone_id", data);
			break;
		}

		case EVENT_CAST_ON:{
			ExportVar(packagename.c_str(), "spell_id", data);
			break;
		}

		//nothing special about these events
		case EVENT_DEATH:
		case EVENT_SPAWN:
		case EVENT_ATTACK:
		case EVENT_SLAY:
		case EVENT_AGGRO:
		case EVENT_ENTER:
		case EVENT_EXIT:
		case EVENT_ENTERZONE:
		case EVENT_LEVEL_UP:		
		case EVENT_KILLED_MERIT:		
			break;
Adding this change allows checking the spell ID cast on the NPC from the Perl script, a valuable information. Can this change be done by a developer ?
Reply With Quote
  #2  
Old 05-20-2008, 04:44 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I already fixed it locally, it got missed on the merge or something initially I dunno.
Reply With Quote
  #3  
Old 05-21-2008, 11:01 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

How's this work? If an NPC is casted on with a spell by a player? Im assuming it returns which spell was used, such as if the mob was rooted etc. Does the type of spell matter, dec or benifit? Could be useful in quest.
Reply With Quote
  #4  
Old 05-21-2008, 01:27 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default

It triggers the event, and in $spell_id (in Perl) you get the ID of the spell the NPC has been hit with. If you need more info about the spell you have to query for it (dunno if/how it can be done from Perl, possibly). The event is fired whether or not the NPC resists, is immune etc. It means the Spell is on the target.

Here is how you will be able to use it once KLS commits the missing part, to update a quest globals when a specific NPC is hit by a Courage (context : a cleric guildmaster quested the player with buffing this guard, the event sets the globals, and the NPC checks the globals before rewarding the PC for his action :
Code:
sub EVENT_CAST_ON
{
  if($spell_id == 202)  # Courage
  {
    quest::say("Bzzzzt !");
    quest::setglobal("A_Bit_of_Clericing", "Guard Buffed", 5, "F");
  }
}
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:52 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