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)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2006, 05:24 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

gah, IsBeneficialSpell() is getting messy already.... but I havent seen a better solution, so we deal with it. A minor style thing, please do not use unbracketed {} if's which span more than one line, it can make code tricky to read.

I ended up rewritting a lot of the code to accomplish two things:
- Instead of checking for specific spell IDs in the temp pet function, I extended the temp pet interface to allow for the flexibility needed for this usage. (I disagreed with your statement that we do not set the eye's owner, did you have a concrete reason for doing that?)
- You have to be careful with memory when you create new NPCType objects, as the ones from database.GetNPCType come from shared memory, and you allocated a new one on the heap, you have to make sure to tell the NPC object about that. Look at the code to see the details.

SQL syntax fixed (same errors as last time), and ID changed for PEQ. BTW, the "official" raneg of IDs for pets is between 500 and 999.

Code:
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	323,1,644,0);
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	1720,1,644,0);
INSERT INTO aa_swarmpets (spell_id, `count`, npc_id, duration) VALUES (	960,1,644,0);

INSERT INTO npc_types (id,name,lastname,level,race,class,bodytype,hp,
gender,texture,helmtexture,size,hp_regen_rate,
mana_regen_rate,loottable_id,merchant_id,
npc_spells_id,npc_faction_id,mindmg,maxdmg,
npcspecialattks,aggroradius,face,
luclin_hairstyle,luclin_haircolor,luclin_eyecolor,  
luclin_eyecolor2,luclin_beardcolor,luclin_beard,
fixedz,d_meele_texture1,d_meele_texture2,runspeed,  
MR,CR,DR,FR,PR,see_invis,see_invis_undead,qglobal,  
AC,npc_aggro,spawn_limit,attack_speed,findable,
STR,STA,DEX,AGI,_INT,WIS,CHA)
 VALUES (644,'eye_of_','',1,108,1,63,1,2,0,0,4,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1.25,0,0,0,0,0,1,1,0,
0,0,0,0,0,0,0,0,0,0,0,0);
Reply With Quote
  #2  
Old 07-24-2006, 06:18 AM
EverHood
Restoring Necromancers to their former glory, one patch at a time
 
Join Date: Jul 2006
Posts: 6
Default

I didn't want to assign the eye an owner so that if the eye was hit by an AE spell it wouldn't add it's Owner to the AE casters hate list. Nothing that happens to the eye should reflect on the player that cast the eye and I was afraid giving the eye an OwnerID could trip code paths that it shouldn't or doesn't need to.
Reply With Quote
  #3  
Old 07-24-2006, 01:45 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

well hate works the other way... so theoretically the owner would get the caster of the AE added to its hate list, which would be correct if for some reason an NPC cast the eye, and you killed it... it would be mad at you. I think its better to set the owner and see what comes of it.
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:29 AM.


 

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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3