Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-02-2016, 04:16 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Quote:
After testing some more,I found that bard's songs could cause bugs ("you missed a note" instead of "your spell fizzle"), not sure for tanks tomes but better remove it too ..
Not exactly sure what you mean by this statement.


Quote:
Also when you put 65535 as item.class for spells scroll it shows ingame on it with all classes and a bunch of 255 for those that can't use it.
`item`.`classes` is a bitmask of the allowed classes and not an actual class value.

By changing `item`.`class` .. you are altering what classes can 'access' the item..but, not what classes can use the spell. This would explain the '255'
values you are seeing and is not unexpected.

To properly create a bitmask (in this case,) you would take the class id and subtract 1 (since it is a 1-based index,) then left bit-shift 1 by that
amount. Finally, you would bitwise-or each value to attain the final result.

Code:
int final_bitmask = 0;
int warrior_id = 1, warrior_bit = 0;
int paladin_id = 3, paladin_bit = 0;
int shadowknight_id = 5, shadowknight_bit = 0;

warrior_bit = (1 << (warrior_id - 1)); // 1 << 0 = 1
paladin_bit = (1 << (paladin_id - 1)); // 1 << 2 = 4
shadowknight_bit = (1 << (shadowknight_bit - 1)); // 1 << 4 = 16

final_bitmask = (warrior_bit | paladin_bit | shadowknight_bit); // 1 | 4 | 16 = 21

[(final_bitmask == 21) = true]

Code:
update items, spells_new set classes=classes+4096 WHERE
items.scrolleffect = spells_new.id AND
items.classes <> 4096 AND
spells_new.classes13 = 255 AND
items.`Name` LIKE '%spell:%'
Scenario:

`item`.`classes` = 4097 (warrior and magician)

[update triggered because `classes` > 4096]
4097 + 4096 = 8193 (warrior and enchanter)


Also, by setting the item to be usable by class '4096' where `classes13` = 255, you only allow them access to the item, not the spell.

You would need to change `classes13`to a usable level for them to be able to use the actual spell and not just the item.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
 


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 09:49 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