Indoor/Outdoor fix
Well, I'm dieing to get this one out, I know Qadar's at work and won't be back tell tonight, so he can correct me if I screw up - In a nutshell, this should make all outdoor spells work only outdoor, Sow and levitate included ;
First of all, you need a new column; Code:
alter table `zone` add column `castoutdoor` tinyint (4) DEFAULT '1' NOT NULL after `canlevitate`; Note: I was just looking at them, not sure if levitate works when left out, as it is also in this code (Qadar must have thought he left it out when he ported it over to 1106, or I can't find it). The changes in the source files are tagged with "//Qadar", all works fine, tested at my local test server. you need to have "#GM OFF" when you test this If anyone wants to make the fixes into something more presentable to the DEVS, please do! Download files here, use 1106, overwrite with these (/zone), and compile. Any credit for this goes to Qadar. In case you're wondering - Qadar is what inspired my buff character behind the bank at PoK - only the real Qadar has an eyepatch (nothing a little surgery couldn't fix) , and the real Qadar would have never made you pay for buffs (I added that so players would have something to spend their plat on). |
Almost forgot;
http://www.nahunta.org/~angelox/files/nerf.JPG |
Diff for those interested:
Code:
Index: zone.h |
Oh, levitate does not have indoor/outdoor cast restrictions. At least, not according to the spell data. Here is a list of spells this *should* effect, based on their spell data:
Code:
143 Sunbeam |
I'm thinking since Lev works in some places where Sow doesn't- it's on a different agenda, not to mention Lev will drop you on Zin to a no lev zone, and Sow will stay tell it drops.
|
Aye, PEQ has several zones as no lev. We take it on a one by one basis, until the environmenttype field in the spell data can be deciphered/implemented.
|
The code I wrote for the indoor/outdoor restrictions borrowed a lot from the code Magoth78 submitted here: ( thanks Magoth78 )
http://eqemulator.net/forums/showthr...779#post146779 I followed his example and just modified it a bit, as well as adding a few lines to spells.cpp to check if there was a indoor restriction on the spell. All the lev work is still 100% his, but I just included in mine. As his modifications are included, if the previous levitation restriction was not done already, it also depends on running the sql code he posted to add "canlevitate" to the zone db before adding the "castoutdoor" one. As this is the first time I have touched C code in about 10 years, I am a little rusty. It works, but cleanup or better naming of functions may be in order by someone more experienced than I. I just hope its a positive addition everyone can use. |
I'll be putting this and the lev thing in the official code soon enough with some other changes.
|
OMG YAY!!!
THANK YOU! Been wanting to be able to lev restrict and stuff for AGES! |
All times are GMT -4. The time now is 03:10 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.