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 08-09-2007, 10:17 PM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default Fix: Invis Vs Undead = Invis to anything

In faction.cpp

Change: Lines 445
if (invisible_undead && tnpc && !tnpc->SeeInvisibleUndead())
{
return FACTION_INDIFFERENT;
}

To:
if (invisible_undead && tnpc && !tnpc->SeeInvisibleUndead())
{
if (tnpc->GetBodyType() == BT_Undead || tnpc->GetBodyType() == BT_SummonedUndead)
{
return FACTION_INDIFFERENT;
}
}


Appears the issue wasn't checking body types like it should have been, making IVU the greatest invis any man (or woman) has ever seen!
Reply With Quote
  #2  
Old 08-10-2007, 11:17 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

This change isn't needed. IVU, like all other invis spells checks the db to see what sees through it and what doesn't. So long as your db is setup correctly, the spell will work correctly.

I just tested IVU on Grand Creation, with it on I was KOS to animals, giants, goblins, etc, but indifferent to Skellies and zombies. So it is working correctly, meaning the newest PEQ CVS will having working IVU.
Reply With Quote
  #3  
Old 08-10-2007, 12:51 PM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

Hi Cavedude,

I'm using angelox's db which must be missing something. Where in the DB does it specify the rules for what IVU affects? I'd rather add that in than having to change the source everytime there's an update.

Cheers

InKy
Reply With Quote
  #4  
Old 08-11-2007, 01:40 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

In the npc_types table set see_invis_undead to 1 if the mob can see through it, 0 if it can't. Likewise, you'd do the same for see_invis, see_hide, and see_improved_hide.
Reply With Quote
  #5  
Old 08-11-2007, 08:00 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

So every normal mob must have see invis undead set that is not undead? Seems a bit reactive?
Reply With Quote
  #6  
Old 08-11-2007, 09:21 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

It's far better to be able to control each mob's habits individually, especially in the invis spell area where there are plenty of exceptions. Plus, allowing all normal NPCs to be able to see through IVU is as simple as:

update npc_types set see_invis_undead = 1 where bodytype != '3' and bodytype != '8';
Reply With Quote
  #7  
Old 08-11-2007, 11:26 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

I agree that it's an easy step to adjust them all, it's just when producing potentially thousands of new npcs it's 1000 extra lines that could be unnecessary and easily forgotten. Since the spell is Invis Vs Undead it should rely specifically on bodytypes 3 and 8 else IVU turns itself into a normal invis spell (which is not what the name implies).

The only time I can think it would be useful is I had say a human that was secretly undead (for some storyline reason perhaps). But then I should still be setting it's bodytype to 3 for undead spells to function.
Reply With Quote
  #8  
Old 08-11-2007, 11:52 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

You're also forgetting undead NPCs which can see through IVU. That's really the true reason why this and all the other invis columns exist in the database, for the exceptions.
Reply With Quote
  #9  
Old 08-11-2007, 11:59 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

Yeah but those exceptions would still work with this
Reply With Quote
  #10  
Old 08-12-2007, 02:50 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Ah, I gotcha now. Yep, so long as the column in npc_types can still override this is a good change.
Reply With Quote
Reply


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