Bards and thier code changes
Made a couple of code changes to try and improve bards.
To make the Singing Mastery AA skill work I changed to client_mods.cpp Line 1353 changed from Code:
if(spells[spell_id].skill == SINGING) Code:
if(IsClient()) ApplySpellsBonuses(buffs[i].spellid, buffs[i].casterlevel, newbon); to ApplySpellsBonuses(buffs[i].spellid, buffs[i].casterlevel, newbon, buffs[i].casterid); and line 336-348 from Code:
void Mob::ApplySpellsBonuses(int16 spell_id, int8 casterlevel, StatBonuses* newbon) Code:
void Mob::ApplySpellsBonuses(int16 spell_id, int8 casterlevel, StatBonuses* newbon) I did my test with buffs, and these changes made instruments and at least the singing mastery work as far as calculating numbers on the server. The client still has the wrong numbers. Also another strange thing I noticed is on the BardPulse method in spells.cpp when it sends the action packet the numbers on the client increase, they don't match the server numbers and they increase whether or not you have an instrument equiped. I don't know if this happens for everyone, and I know bards are always broken, so nothing new. I am guessing that the bonuses the server calculates is not the one the client uses and the client calculates its own. I don't know if anyone has anymore insite why the client woudl refuse to believe my drum is a drum but any tips would be appreciated. :???: |
Maybe it has something to do with having to equip the instruments in the secondary slot?
This is awesome, btw. :) Finally, some recognition for bards, hehe. |
The issue with it not appearing client side seems to be with the sending of the Action_Struct packet.
I looked through the code and found two points of interest: in in Mob::SpellOnTarget() Code:
action->spell = spell_id; Code:
action->spell = spell_id; |
Your right! Thanks I replaced the 0x0A and the 0x10 with
action->unknown06 = GetInstrumentMod(spell_id); and that did the trick! The numbers now match the server numbers as far as instrumnets mods go. Though they do seam a little of. I think how much you get per AA or the instrument mods is to high. if you have 3 skill in Singing mastery your singing songs get 6 TIMES as strong. I don't remember that on my eqlive bard. But at least instrument modifiers seam to be working. Thanks again. |
I am doing this at work so I haven't really had a chance to test it out but I am 90% sure that replacing GetInstrumentMod with:
Code:
if(GetClass() != BARD) |
Tested it the only change is where it adds in the extra points for singing and instrument mastery it should be
Code:
if(IsClient()) |
hey, overall good job spotting this hole in the bard code. I will get most of it in.
I dont think your AA changes are needed, since GetAA is a virtual function, theres no need to cast to client to get the right version of GetAA called... unless you can prove me wrong. |
All I know is when stepping through it, it called the Mob function instead of the client method. Wasn't binding to the right method, I haven't programmed much in C++ and consider myself a beginner in the language, so I can't really prove why you had to, just that I had to to make it work. Its very possible its something else that i might have done wrong.
Another Bard fix I tested in EQLive and crouching did not stop my singing so in client_packet.cpp Line #1689 I changed to Code:
if(!UseBardSpellLogic()) |
All times are GMT -4. The time now is 01:20 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.