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

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2004, 03:03 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default PBAE and distance checks

I was trying to put in Vox's breath (Frosty Death, spell#952 -- or Frosty Death2, spell#1356), and the breath never would go off. After turning spell debugging on I saw what was happening: the entry in spells_us.txt had a range of 0. I assume most if not all of the PBAE spells have a range of 0 since range isn't applicable with a pbae. I was able to get the breath to go off only if I /summoned her on top of me.

I made this change to the MobAI.cpp file so that if the spell is targettype 4 (pbae) then the distance check doesn't have to pass:

The change is in line 84 of zone/MobAI.cpp. (As of the 6/21/04 release it's on line 84 -- dunno if that's the case in later CVS's)

Change from:
Code:
dist <= spells[AIspells[i].spellid].range
to:
Code:
(dist <= spells[AIspells[i].spellid].range || spells[AIspells[i].spellid].targettype == 4)
If you wanna change the debug messages so they now accurately show the new logic:

Line 92, add this to the end of the line:
Code:
<< "||targettype[" << spells[AIspells[i].spellid].targettype << "]==4"
and change line 206 to read:
Code:
cout << "Mob::AICastSpell: NotCasting: spellid=" << AIspells[i].spellid << ", tar=" << tar->GetName() << ",tar=" << tar->GetName() << ", dist[" << dist << "]<=" << spells[AIspells[i].spellid].range << "||targettype[" << spells[AIspells[i].spellid].targettype << "]==4" << ", mana_cost[" << mana_cost << "]<=" << GetMana() << ", cancast[" << AIspells[i].time_cancast << "]<=" << Timer::GetCurrentTime() << endl;
(Damn that's a long line :P)

After that, Vox started AE'ing quite nicely... much to the dismay of cocky young adventurers everywhere :lol:
Reply With Quote
  #2  
Old 07-09-2004, 03:11 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Very cool indeed. You can come check it out on PEQTGC classic server if you like )
Reply With Quote
  #3  
Old 07-18-2004, 11:47 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

This doesn't really fix the underlying problem, but it's a good workaround. I think the code should be modified to use the AE Range field in spells_us.txt for pbae, as that's the value that determines the radius of the AE effect.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #4  
Old 07-19-2004, 01:46 AM
sotonin
Demi-God
 
Join Date: May 2004
Posts: 1,177
Default

Agreed. This should be fixed. But for the time being. All our uber mobs on PEQTGC are aeing. which makes for some interesting fights )
Reply With Quote
  #5  
Old 07-19-2004, 12:48 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Well that's definitely a good thing to hear. I know lots of folks had problems a long while ago with mobs not AEing properly. Nice to see it's been fixed.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
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 10:22 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3